-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml.template
48 lines (44 loc) · 1.59 KB
/
docker-compose.yml.template
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
# ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
# ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
# THIS IS A GENERATED FILE MANAGED BY CI/CD AND WILL GET
# UPDATED FOR EVERY RELEASE.
# ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
# ~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-
services:
{{ .serviceName }}:
image: {{ .image }}
restart: always
networks:
- traefik
- postgres
labels:
- 'traefik.enable=true'
- 'traefik.http.routers.{{ .traefikRouterName }}.rule=Host(\`{{ .host }}\`)'
- 'traefik.http.routers.{{ .traefikRouterName }}.entrypoints=websecure'
- 'traefik.http.routers.{{ .traefikRouterName }}.tls.certresolver=letsencrypt'
- 'traefik.http.services.{{ .traefikRouterName }}.loadbalancer.server.port=3000'
secrets:
- source: {{ .db_url_secret }}
target: db_url
- cn_prod_aws_access_key_id
- cn_prod_aws_secret_access_key
entrypoint:
[
'/bin/sh',
'-c',
'export BODY_SIZE_LIMIT=5000000; export DATABASE_URL=\$\$(cat /run/secrets/db_url) ; export AWS_ACCESS_KEY_ID=\$\$(cat /run/secrets/cn_prod_aws_access_key_id) ; export AWS_SECRET_ACCESS_KEY=\$\$(cat /run/secrets/cn_prod_aws_secret_access_key) ;node build',
]
secrets:
cn_staging_db_url:
file: /etc/secrets/cn_staging_db_url.txt
cn_prod_db_url:
file: /etc/secrets/cn_prod_db_url.txt
cn_prod_aws_access_key_id:
file: /etc/secrets/cn_prod_aws_access_key_id.txt
cn_prod_aws_secret_access_key:
file: /etc/secrets/cn_prod_aws_secret_access_key.txt
networks:
traefik:
external: true
postgres:
external: true