version: "3.0"
networks:
internal:
external: false
volumes:
laurelindb_data:
driver: local
laurelinredis_data:
driver: local
services:
laurelindb:
image: postgres:alpine
container_name: laurelindb
restart: always
networks:
- internal
ports:
- 5432:5432
volumes:
- laurelindb_data:/var/lib/postgresql/data
environment:
POSTGRES_USER: laurelin
POSTGRES_PASSWORD: laurelin
POSTGRES_DB: laurelin
laurelinredis:
image: redis:7.0.8-alpine
container_name: laurelinredis
restart: always
networks:
- internal
ports:
- 6379:6379
volumes:
- laurelinredis_data:/data
# save the state every 60 seconds,
# but only if at least 1 write operation was made in that time
command: redis-server --save 60 1 --loglevel warning