-
Notifications
You must be signed in to change notification settings - Fork 42
/
docker-compose.prod.yml
49 lines (45 loc) · 1.06 KB
/
docker-compose.prod.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
name: csharp_prod
services:
backend:
image: ${COMPOSE_PROJECT_NAME}
build:
context: .
environment:
ASPNETCORE_ENVIRONMENT: Production
volumes:
- ./src/Hng.Web/appsettings.Production.json:/app/appsettings.Production.json
depends_on:
- postgres
- redis
restart: unless-stopped
deploy:
resources:
limits:
cpus: '0.17'
memory: 170M
reservations:
cpus: '0.08'
memory: 85M
nginx:
image: nginx:latest
ports:
- "6002:80"
depends_on:
- backend
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf
restart: unless-stopped
postgres:
image: postgres:latest
environment:
POSTGRES_DB: ${POSTGRES_DB:-${COMPOSE_PROJECT_NAME}}
POSTGRES_USER: ${POSTGRES_USER:-${COMPOSE_PROJECT_NAME}}
POSTGRES_PASSWORD: ${POSTGRES_PROD_PASSWORD:-password}
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
redis:
image: redis:latest
restart: unless-stopped
volumes:
postgres_data: