-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (38 loc) · 1.1 KB
/
docker-compose.yml
File metadata and controls
40 lines (38 loc) · 1.1 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
# Docker Compose configuration for Corpsim services: PostgreSQL and Redis
# This configuration is intended for local development and testing purposes.
# It sets up PostgreSQL and Redis with appropriate environment variables, volumes, and health checks.
services:
postgres:
image: postgres:16
container_name: corpsim-postgres
restart: unless-stopped
environment:
POSTGRES_DB: ${POSTGRES_DB:-corpsim}
POSTGRES_USER: ${POSTGRES_USER:-user}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-password}
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-user} -d ${POSTGRES_DB:-corpsim}"]
interval: 5s
timeout: 3s
retries: 20
redis:
image: redis:7
container_name: corpsim-redis
restart: unless-stopped
ports:
- "6379:6379"
command: ["redis-server", "--appendonly", "yes"]
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 20
volumes:
pgdata:
redisdata: