-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
63 lines (59 loc) · 1.34 KB
/
docker-compose.yaml
File metadata and controls
63 lines (59 loc) · 1.34 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
version: "3.8"
services:
status-page:
build:
context: .
dockerfile: Dockerfile
image: goldpulpy/status-page:latest
container_name: status-page-app
ports:
- ${CONTAINER_PORT:-5000}:${PORT:-5000}
env_file:
- .env
restart: unless-stopped
mem_limit: 512m
networks:
- status-page
cpus: 0.5
stop_grace_period: 30s
depends_on:
postgres:
condition: service_healthy
healthcheck:
test:
[
"CMD-SHELL",
"wget -qO- http://127.0.0.1:${PORT:-5000}/health || exit 1",
]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
postgres:
image: postgres:17-alpine
container_name: status-page-postgres
restart: unless-stopped
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
TZ: ${TZ:-UTC}
volumes:
- postgres_data:/var/lib/postgresql/data
networks:
- status-page
mem_limit: 512m
cpus: 0.5
stop_grace_period: 30s
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
postgres_data:
name: status-page-postgres
networks:
status-page:
name: status-page
driver: bridge