-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.prod.yaml
54 lines (50 loc) · 1.19 KB
/
docker-compose.prod.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
version: "3.9"
volumes:
database:
driver: "local"
api:
driver: "local"
networks:
backend:
driver: "bridge"
services:
database:
build:
context: ./Assets
dockerfile: Database.prod.Dockerfile
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U admin -d ecommerce" ]
interval: 3s
timeout: 5s
retries: 5
environment:
POSTGRES_DB: ecommerce
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin-password
ports:
- "5432:5432"
restart: unless-stopped
volumes:
- database:/var/lib/postgresql/data
networks:
- backend
api:
build:
context: .
dockerfile: ./Assets/Api.prod.Dockerfile
environment:
DATABASE_CONNECTION_STRING: "Server=database;Port=5432;Database=ecommerce;User Id=admin;Password=admin-password;"
JWT_SUBJECT: "ECOMMERCE_SUBJECT"
JWT_ISSUER: "ECOMMERCE_ISSUER"
JWT_AUDIENCE: "ECOMMERCE_BACKEND"
JWT_KEY: "9a5835502c69a59d42d5438316d3d43cd2fb0bdd789b3de98f1d0d58e25dbaa5"
ports:
- "5182:80"
restart: unless-stopped
depends_on:
database:
condition: service_healthy
volumes:
- api:/Api
networks:
- backend