-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
67 lines (63 loc) · 1.74 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#
# @author devstudy
# @see http://devstudy.net
# @see https://docs.docker.com/compose/compose-file/
#
# docker-compose build
# docker-compose up
# docker-compose down
version: '3.7'
services:
blog-postgres:
image: postgres:9.5-alpine
container_name: blog-postgres
restart: always
environment:
- POSTGRES_USER=blog
- POSTGRES_PASSWORD=password
- POSTGRES_DB=blog
ports:
- 5432:5432
volumes:
- ./docker/postgres/:/docker-entrypoint-initdb.d/:ro
networks:
- blog-private-network
blog-web-server:
restart: always
build:
context: ./
dockerfile: docker/blog-web-server.dockerfile
image: devstudy/blog-web-server:1.0
container_name: blog-web-server
environment:
# Database settings:
- dbUrl=jdbc:postgresql://blog-postgres/blog
- dbUser=blog
- dbPassword=password
# App settings:
- appHost=http://localhost
# Email settings:
- smtpServer=smtp.gmail.com
- smtpPort=465
- smtpUsername=${DEVSTUDY_BLOG_SMTP_USERNAME}
- smtpPassword=${DEVSTUDY_BLOG_SMTP_PASSWORD}
# Google Plus
- googlePlusClientId=${DEVSTUDY_BLOG_GOOGLE_PLUS_ID:-1051029463557-h4cd4mlqrjkkoaef92t6aftdbacco9am.apps.googleusercontent.com}
# Remote debugging
- JPDA_ADDRESS=8000
- JPDA_TRANSPORT=dt_socket
ports:
- 80:8080
- 8765:8000
volumes:
- ./docker/media/:/opt/tomcat/webapps/ROOT/media
networks:
- blog-private-network
depends_on:
- blog-postgres
command: sh -c '/wait-for-service-up.sh blog-postgres:5432 -- catalina.sh jpda run'
networks:
blog-private-network:
driver: bridge