-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-prod.yaml
50 lines (50 loc) · 1.03 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
version: '3.8'
services:
db:
container_name: 'postgres-service'
image: postgres
restart: always
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 10s
timeout: 5s
retries: 5
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: local
volumes:
- postgres-data:/var/lib/postgresql/data
- /backup:/backup
expose:
- 5432
server:
container_name: 'server-service'
build:
context: .
dockerfile: Dockerfile
restart: on-failure
stdin_open: true
depends_on:
db:
condition: service_healthy
expose:
- 8080
environment:
- PORT=8080
env_file:
- .env.server
nginx:
container_name: 'nginx-service'
build:
context: .
dockerfile: nginx.Dockerfile
ports:
- '80:80'
- '443:443'
volumes:
- ./config:/config
- /etc/letsencrypt:/etc/letsencrypt:ro
- /tmp/acme_challenge:/tmp/acme_challenge
restart: always
volumes:
postgres-data: