38 lines
856 B
YAML
38 lines
856 B
YAML
services:
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
container_name: redis
|
|
command: >
|
|
redis-server
|
|
--requirepass CNXpuhMdxXHo7ZK8bhtXDvgXVZcjRn
|
|
--appendonly yes
|
|
--appendfsync everysec
|
|
--maxmemory 256mb
|
|
--maxmemory-policy volatile-lru
|
|
--tcp-keepalive 60
|
|
--timeout 300
|
|
--loglevel notice
|
|
ports:
|
|
- 6379:6379
|
|
volumes:
|
|
- ./data/redis:/data
|
|
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 |