Skip to content

Commit 33f2528

Browse files
authored
Merge pull request #474 from hollanbm/docs/update-docker-compose
Upgrade to pg18, add healthchecks to containers
2 parents d9b2739 + 75cc737 commit 33f2528

1 file changed

Lines changed: 18 additions & 4 deletions

File tree

docker-compose.yml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ version: '3'
22

33
services:
44
jellystat-db:
5-
image: postgres:15.14
5+
image: postgres:18.1
66
shm_size: '1gb'
77
container_name: jellystat-db
88
restart: unless-stopped
@@ -15,7 +15,14 @@ services:
1515
POSTGRES_USER: postgres
1616
POSTGRES_PASSWORD: mypassword
1717
volumes:
18-
- postgres-data:/var/lib/postgresql/data
18+
- postgres-data:/var/lib/postgresql
19+
healthcheck:
20+
test:
21+
- CMD-SHELL
22+
- pg_isready --dbname=postgres --username=postgres
23+
interval: 10s
24+
timeout: 5s
25+
retries: 5
1926

2027
jellystat:
2128
image: cyfershepard/jellystat:latest
@@ -38,8 +45,15 @@ services:
3845
ports:
3946
- "3000:3000"
4047
depends_on:
41-
- jellystat-db
42-
48+
jellystat-db:
49+
condition: service_healthy
50+
healthcheck:
51+
test: wget --no-verbose --tries=1 --spider http://localhost:3000/auth/isConfigured || exit 1
52+
interval: 60s
53+
timeout: 30s
54+
retries: 5
55+
start_period: 30s
56+
4357
networks:
4458
default:
4559

0 commit comments

Comments
 (0)