-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.production.yml
80 lines (79 loc) · 1.81 KB
/
docker-compose.production.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
version: '3'
services:
db:
image: mcr.microsoft.com/azure-sql-edge:1.0.7
user: root
environment:
ACCEPT_EULA: Y
SA_PASSWORD: StrongDbPassword123
expose:
- 1433
healthcheck:
test: ["CMD", "/opt/mssql-tools/bin/sqlcmd", "-U", "sa", "-P", "StrongDbPassword123", "-Q", "SELECT 1"]
interval: 2m
retries: 2
restart: "on-failure"
volumes:
- db-data:/var/opt/mssql/
networks:
- net
backend:
build:
context: backend
dockerfile: Dockerfile
expose:
- 80
depends_on:
db:
condition: service_healthy
environment:
JWT_TOKEN_KEY: The-Jedlik-Secret-Key
JWT_TOKEN_ISSUER: KevinAndDavid
JWT_TOKEN_AUDIENCE: reverse-proxy
JWT_TOKEN_EXPIRATION_DAY: 7
FRONTEND_URL: reverse-proxy
ASPNETCORE_ENVIRONMENT: Production
DB_SERVER: db
DB_DATABASE: JedlikVizsgaremek
DB_ID: sa
DB_PASSWORD: StrongDbPassword123
VIRTUAL_HOST: store.kevins.works
VIRTUAL_PATH: /api
LETSENCRYPT_HOST: store.kevins.works
restart: "on-failure"
deploy:
replicas: 3
update_config:
parallelism: 1
delay: 180s
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost/api/healthchecker"]
interval: 2m
timeout: 10s
retries: 2
volumes:
- backend-images:/app/wwwroot/api/Images/
networks:
- net
frontend:
build:
context: frontend
dockerfile: Dockerfile
expose:
- 80
depends_on:
backend:
condition: service_healthy
environment:
VIRTUAL_HOST: store.kevins.works
VIRTUAL_PATH: /
LETSENCRYPT_HOST: store.kevins.works
restart: "on-failure"
networks:
- net
volumes:
db-data:
backend-images:
networks:
net:
external: true