-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
98 lines (91 loc) · 2.82 KB
/
docker-compose.dev.yml
File metadata and controls
98 lines (91 loc) · 2.82 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
version: "3.7"
services:
postgres:
container_name: postgres_container
image: postgres
environment:
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-thisisecndbpassword}
PGDATA: /data/postgres
volumes:
- postgres:/data/postgres
ports:
- "5432:5432"
#networks:
#- postgres
restart: unless-stopped
nginx:
restart: always
image: nginx
container_name: api_nginx
ports:
- '80:80'
- '443:443'
extra_hosts:
- "host.docker.internal:host-gateway"
volumes:
- web-root:/var/www/certbot
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- dhparam:/etc/ssl/certs
- ./nginx/default.prod.conf:/etc/nginx/conf.d/default.prod.conf.template
environment:
DOMAIN: ${DOMAIN}
WEB_API_PORT: ${WEB_API_PORT}
REDIS_BULLBOARD_PORT: ${REDIS_BULLBOARD_PORT}
REDIS_BULL_NGINX_PATH: ${REDIS_BULL_NGINX_PATH}
command: /bin/bash -c "envsubst < /etc/nginx/conf.d/default.prod.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
certbot:
image: certbot/certbot
container_name: certbot
volumes:
- certbot-etc:/etc/letsencrypt
- certbot-var:/var/lib/letsencrypt
- web-root:/var/www/certbot
depends_on:
- nginx
# command: certonly --webroot --webroot-path=/var/www/certbot --email email --agree-tos --no-eff-email --staging -d -d
# command: certonly --webroot --webroot-path=/var/www/certbot --email ${CERT_EMAIL} --agree-tos --no-eff-email --force-renewal -d ${DOMAIN}
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
web_api:
build:
dockerfile: Dockerfile.web-api.prod
context: ./
container_name: web_api
restart: unless-stopped
volumes:
- .:/app
command: /bin/bash -c "cd /app/packages/ecn-web-api/ && yarn build && node ./dist/main.js"
redis_bullboard:
build:
dockerfile: Dockerfile.redis-bullboard.prod
context: ./
container_name: redis_bullboard
restart: unless-stopped
environment:
REDIS_BULLBOARD_PORT: ${REDIS_BULLBOARD_PORT}
REDIS_BULL_NGINX_PATH: ${REDIS_BULL_NGINX_PATH}
REDIS_BULLBOARD_USERNAME: ${REDIS_BULLBOARD_USERNAME}
REDIS_BULLBOARD_PASSWORD: ${REDIS_BULLBOARD_PASSWORD}
REDIS_HOST: ${REDIS_HOST}
volumes:
- .:/app
command: /bin/bash -c "cd /app/packages/ecn-redis-bullboard/ && node ./index.js"
redis:
image: redis
container_name: tutorial_redis
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- redisdata:/data
ports:
- 6379:6379
command: --slave-read-only no
volumes:
redisdata:
web-root:
certbot-etc:
certbot-var:
dhparam:
postgres:
# pgadmin: