-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathdocker-compose.yml
48 lines (43 loc) · 1.14 KB
/
docker-compose.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
services:
postgres:
image: postgres:16.3
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "postgres"]
interval: 30s
timeout: 10s
retries: 5
migration:
image: mhchah/negar-backend:latest
# build:
# context: .
# dockerfile: Dockerfile
depends_on:
postgres:
condition: service_healthy
environment:
CONNECTION_STRING: Host=postgres;Database=postgres;Username=postgres;Password=postgres;
# command: ["cat", "appsettings.json"]
command: ["dotnet", "./RelationAnalysis.Migrations.dll"]
app:
image: mhchah/negar-backend:latest
# build:
# context: .
# dockerfile: Dockerfile
depends_on:
migration:
condition: service_completed_successfully
environment:
ASPNETCORE_ENVIRONMENT: Development
CONNECTION_STRING: Host=postgres;Database=postgres;Username=postgres;Password=postgres;
ports:
- "8080:8080"
volumes:
pgdata: