-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
53 lines (49 loc) · 1.25 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
version: "3.9"
networks:
backend:
driver: bridge
volumes:
backend:
driver: local
services:
database:
container_name: ToDoDatabase
build:
context: ./Assets
dockerfile: BuildDatabase.Dockerfile
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U admin -d ToDoDatabase" ]
interval: 3s
timeout: 5s
retries: 5
environment:
POSTGRES_DB: ToDoDatabase
POSTGRES_USER: admin
POSTGRES_PASSWORD: admin-password
ports:
- "5432:5432"
restart: unless-stopped
volumes:
- backend:/var/lib/postgresql/data
networks:
- backend
api:
container_name: ToDoAPI
build:
context: .
dockerfile: ./Assets/BuildAPI.Dockerfile
environment:
DATABASE_CONNECTION_STRING: "Server=database;Port=5432;Database=ToDoDatabase;User Id=admin;Password=admin-password;"
JWT_KEY: "31a852972fe45b91b1363645dc6a5eb168574056cea7cda3fcb0ef2062e363bb5751ba62259184d7aae1a9ff40737154af509f2cfdf91351d051b7fecc464f6b"
JWT_ISSUER: "JWT_AUTH_SERVER"
JWT_AUDIENCE: "TODO_API_BACK"
ports:
- "7282:80"
restart: unless-stopped
depends_on:
database:
condition: service_healthy
volumes:
- backend:/API
networks:
- backend