-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
47 lines (44 loc) · 1 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
version: "3.8"
services:
pg_trunk:
image: pg_trunk
container_name: pg_trunk
build:
context: .
target: application
volumes:
- ".:/pg_trunk"
- ".data/root:/root"
ports:
- "3500:3500"
tty: true
depends_on:
- postgres
restart: unless-stopped
nginx:
image: nginx:1.21.5
container_name: pg_trunk_nginx
ports:
- "8000:80"
volumes:
- "./conf/nginx.conf:/etc/nginx/conf.d/default.conf"
restart: unless-stopped
postgres:
image: postgres:14.1
container_name: pg_trunk_postgres
volumes:
- ".data/db:/var/lib/postgresql/data"
command: postgres -c shared_preload_libraries=pg_stat_statements
environment:
- POSTGRES_DB=trunk
- POSTGRES_USER=trunk
- POSTGRES_PASSWORD=trunk
ports:
- "5432:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready --quiet || exit 1"]
interval: 1m
timeout: 30s
retries: 10
start_period: 40s
restart: unless-stopped