31 lines
697 B
YAML
31 lines
697 B
YAML
services:
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
container_name: redis
|
|
command:
|
|
- redis-server --appendonly yes
|
|
- redis-server --requirepass CNXpuhMdxXHo7ZK8bhtXDvgXVZcjRn
|
|
ports:
|
|
- 6379:6379
|
|
volumes:
|
|
- ./data:/redis
|
|
restart: always
|
|
|
|
postgres:
|
|
image: postgres:latest
|
|
container_name: postgres
|
|
#restart: always
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
- POSTGRES_PASSWORD=postgres
|
|
- PGDATA=/var/lib/postgresql/data/pgdata
|
|
volumes:
|
|
- ./data/postgres:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 10
|
|
start_period: 10s |