forked from farcasterxyz/hub-monorepo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
43 lines (41 loc) · 1.09 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
services:
postgres:
image: 'postgres:16-alpine'
restart: unless-stopped
ports:
- '6541:5432' # Use a port unlikely to be in use so the example "Just Works"
environment:
- POSTGRES_DB=shuttle
- POSTGRES_USER=shuttle
- POSTGRES_PASSWORD=password
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
# Need to specify name/user to avoid `FATAL: role "root" does not exist` errors in logs
test: [ 'CMD-SHELL', 'env', 'pg_isready', '--dbname', '$$POSTGRES_DB', '-U', '$$POSTGRES_USER' ]
interval: 10s
timeout: 10s
retries: 3
networks:
- shuttle-network
redis:
image: 'redis:7.2-alpine'
restart: unless-stopped
command: --save 1 1 --loglevel warning --maxmemory-policy noeviction
volumes:
- redis-data:/data
ports:
- '16379:6379'
healthcheck:
test: [ 'CMD-SHELL', 'redis-cli', 'ping' ]
interval: 10s
timeout: 10s
retries: 3
start_period: 5s
networks:
- shuttle-network
volumes:
postgres-data:
redis-data:
networks:
shuttle-network: