-
Notifications
You must be signed in to change notification settings - Fork 134
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
45 lines (42 loc) · 1.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
45 lines (42 loc) · 1.13 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
# Local development services for SubTrackr backend.
#
# Usage:
# docker compose up -d
# npm run server:start
#
# Environment (optional .env):
# DB_HOST=localhost DB_PORT=5432 DB_NAME=subtrackr DB_USER=postgres DB_PASSWORD=postgres
# REDIS_HOST=localhost REDIS_PORT=6379
services:
redis:
image: redis:7-alpine
container_name: subtrackr-redis
ports:
- '${REDIS_PORT:-6379}:6379'
command: ['redis-server', '--save', '', '--appendonly', 'no']
healthcheck:
test: ['CMD', 'redis-cli', 'ping']
interval: 5s
timeout: 3s
retries: 5
volumes:
- redis-data:/data
postgres:
image: postgres:16-alpine
container_name: subtrackr-postgres
ports:
- '${DB_PORT:-5432}:5432'
environment:
POSTGRES_DB: ${DB_NAME:-subtrackr}
POSTGRES_USER: ${DB_USER:-postgres}
POSTGRES_PASSWORD: ${DB_PASSWORD:-postgres}
healthcheck:
test: ['CMD-SHELL', 'pg_isready -U ${DB_USER:-postgres} -d ${DB_NAME:-subtrackr}']
interval: 5s
timeout: 3s
retries: 5
volumes:
- postgres-data:/var/lib/postgresql/data
volumes:
redis-data:
postgres-data: