-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
114 lines (107 loc) · 2.88 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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
version: "3.1"
services:
redis:
image: redis:alpine
# ports:
# - 6379:6379
networks:
webnet:
# deploy:
# replicas: 2
# update_config:
# parallelism: 2
# delay: 10s
# restart_policy:
# condition: on-failure
db:
image: ${POSTGRES_TAG}
ports:
- ${POSTGRES_PORT}:5432
volumes:
- PGDATA:/var/lib/postgresql/data
networks:
webnet:
environment:
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_DB: ${POSTGRES_DB}
PGDATA: ${PGDATA}
deploy:
replicas: 1
resources:
limits:
cpus: "1"
memory: 1g
restart_policy:
condition: on-failure
app:
image: ${NODE_TAG}
working_dir: /home/app
environment:
# google credentials
GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS}
FIREBASE_API_KEY: ${FIREBASE_API_KEY}
STORAGE_BUCKET: ${STORAGE_BUCKET}
FIREBASE_PROJECT_ID: ${FIREBASE_PROJECT_ID}
#sendgrid email
SENDGRID_API_KEY: ${SENDGRID_API_KEY}
SENDGRID_SENDER_EMAIL: ${SENDGRID_SENDER_EMAIL}
SENDGRID_ACCOUNT_ACTIVATION_TEMPLATE: ${SENDGRID_ACCOUNT_ACTIVATION_TEMPLATE}
SENDGRID_ACCOUNT_DEACTIVATION_TEMPLATE: ${SENDGRID_ACCOUNT_DEACTIVATION_TEMPLATE}
SENDGRID_WELCOME_TEMPLATE: ${SENDGRID_WELCOME_TEMPLATE}
command: yarn run start:docker:debug
depends_on:
- db
- redis
ports:
- ${APP_PORT}:3000
- 9228:9229 #debugger port disable in production
- 5556:5555 #prisma studio disable in production
volumes:
- ./:/home/app
networks:
webnet:
deploy:
replicas: 1
# resources:
# limits:
# cpus: "1"
# memory: 1g
restart_policy:
condition: on-failure
webserver:
image: nginx:mainline-alpine
ports:
- "80:80"
- "443:443"
volumes:
- ./webserver/web-root:/var/www/html
- ./webserver/nginx-conf/local.conf:/etc/nginx/conf.d/default.conf
- /etc/ssl/private/nginx-selfsigned.key://etc/ssl/private/nginx-selfsigned.key
- /etc/ssl/certs/nginx-selfsigned.crt:/etc/ssl/certs/nginx-selfsigned.crt
depends_on:
- app
networks:
webnet:
deploy:
replicas: 1
# resources:
# limits:
# cpus: "1"
# memory: 1g
restart_policy:
condition: on-failure
# certbot:
# image: certbot/certbot
# volumes:
# - ./webserver/certbot/certbot-etc:/etc/letsencrypt
# - ./webserver/certbot/certbot-var:/var/lib/letsencrypt
# - ./webserver/web-root:/var/www/html
# depends_on:
# - webserver
# command: certonly --webroot --webroot-path=/var/www/html --email ${DOMAINS_EMAIL} --agree-tos --no-eff-email ${CERTBOT_ENV} ${DOMAINS}
networks:
webnet:
volumes:
PGDATA:
#PGSHADOWDATA: