forked from mccsoft/backend-frontend-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
99 lines (93 loc) · 3 KB
/
docker-compose.yaml
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
version: '3.9'
services:
postgres:
image: postgres:13.3
container_name: postgres_templateapp
restart: always
networks:
- internal
environment:
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
ports:
- "${POSTGRES_EXTERNAL_PORT:-5432}:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
profiles:
- db
web:
image: "${IMAGE_URL}"
container_name: web_templateapp
restart: always
networks:
- internal
- load-balancer
environment:
- VIRTUAL_HOST=${VIRTUAL_HOST}
- LETSENCRYPT_HOST=${VIRTUAL_HOST}
- LETSENCRYPT_EMAIL=${EMAIL}
- ConnectionStrings__DefaultConnection=${CONNECTION_STRING}
- OpenId__SigningCertificate__Base64Certificate=${OpenId__SigningCertificate__Base64Certificate}
- OpenId__SigningCertificate__Password=${OpenId__SigningCertificate__Password}
- OpenId__EncryptionCertificate__Base64Certificate=${OpenId__EncryptionCertificate__Base64Certificate}
- OpenId__EncryptionCertificate__Password=${OpenId__EncryptionCertificate__Password}
- Hangfire__DashboardPassword=${Hangfire__DashboardPassword}
- DefaultUser__Password=${DefaultUser__Password}
- REACT_APP_SENTRY_DSN=${Sentry__Dsn}
- Sentry__Dsn=${Sentry__Dsn}
- Serilog__Remote__Server=${Serilog__Remote__Server}
- Serilog__Remote__Port=${Serilog__Remote__Port}
- Serilog__Remote__Token=${Serilog__Remote__Token}
- Serilog__Remote__InstanceName=${Serilog__Remote__InstanceName}
- Serilog__Elastic__Url=${Serilog__Elastic__Url}
- Serilog__Elastic__User=${Serilog__Elastic__User}
- Serilog__Elastic__Password=${Serilog__Elastic__Password}
- SignUrl__Secret=${SignUrl__Secret}
volumes:
- ./deafult_file_storage:/files:rw
nginx-proxy:
image: nginxproxy/nginx-proxy
container_name: nginx-proxy_templateapp
restart: always
networks:
- load-balancer
ports:
- "${HTTP_PORT:-80}:80"
- "${HTTPS_PORT:-443}:443"
volumes:
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- certs:/etc/nginx/certs:ro
- ./nginx/logs:/var/log/nginx:rw
- ./nginx/conf.d/proxy.conf:/etc/nginx/conf.d/proxy.conf:ro
- ./nginx/conf.d/compression.conf:/etc/nginx/conf.d/compression.conf:ro
- ./nginx/vhost.d/default_location:/etc/nginx/vhost.d/default_location:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
profiles:
- nginx
acme:
image: nginxproxy/acme-companion
container_name: acme_templateapp
restart: always
depends_on:
- "nginx-proxy"
volumes:
- acme:/etc/acme.sh:rw
- vhost:/etc/nginx/vhost.d:rw
- html:/usr/share/nginx/html:rw
- certs:/etc/nginx/certs:rw
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
- DEFAULT_EMAIL=${EMAIL}
- NGINX_PROXY_CONTAINER=nginx-proxy_templateapp
profiles:
- nginx
networks:
load-balancer:
external: true
internal:
volumes:
acme:
vhost:
html:
certs:
postgres_data: