-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
76 lines (71 loc) · 1.93 KB
/
docker-compose.yaml
File metadata and controls
76 lines (71 loc) · 1.93 KB
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
version: "3.9"
services:
postgres:
image: postgres:17
container_name: template_postgres
mem_limit: 500m
mem_reservation: 300m
environment:
POSTGRES_DB: server
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- "127.0.0.1:5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 10s
timeout: 5s
retries: 5
api:
build:
context: .
dockerfile: Dockerfile.api
container_name: template_api
mem_limit: 1g
mem_reservation: 600m
depends_on:
postgres:
condition: service_healthy
ports:
- "5124:5124"
environment:
ConnectionStrings__DefaultConnection: "Host=postgres;Port=5432;Database=server;Username=postgres;Password=postgres;Timeout=300"
ASPNETCORE_ENVIRONMENT: Development
worker:
build:
context: .
dockerfile: Dockerfile.worker
container_name: template_worker
mem_limit: 300m
mem_reservation: 200m
depends_on:
postgres:
condition: service_healthy
api:
condition: service_started
environment:
ConnectionStrings__DefaultConnection: "Host=postgres;Port=5432;Database=server;Username=postgres;Password=postgres;Timeout=300"
ASPNETCORE_ENVIRONMENT: Development
# telegram:
# build:
# context: .
# dockerfile: Dockerfile.telegram
# container_name: template_telegram
# mem_limit: 500m
# mem_reservation: 300m
# depends_on:
# postgres:
# condition: service_healthy
# api:
# condition: service_started
# worker:
# condition: service_started
# ports:
# - "5125:5125"
# environment:
# ConnectionStrings__DefaultConnection: "Host=postgres;Port=5432;Database=server;Username=postgres;Password=postgres;Timeout=300"
# ASPNETCORE_ENVIRONMENT: Development
volumes:
postgres_data: