didier/docker-compose.yml

29 lines
755 B
YAML

version: '3.9'
services:
postgres:
image: postgres:14
container_name: didier
restart: always
environment:
- POSTGRES_DB=${POSTGRES_DB:-didier_dev}
- POSTGRES_USER=${POSTGRES_USER:-postgres}
- POSTGRES_PASSWORD=${POSTGRES_PASS:-postgres}
ports:
- "${POSTGRES_PORT:-5432}:${POSTGRES_PORT:-5432}"
volumes:
- postgres:/var/lib/postgresql/data
mongo:
image: mongo:5.0
restart: always
environment:
- MONGO_INITDB_ROOT_USERNAME=${MONGO_USER:-root}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_PASS:-root}
- MONGO_INITDB_DATABASE=${MONGO_DB:-didier_dev}
ports:
- "${MONGO_PORT:-27017}:${MONGO_PORT:-27017}"
volumes:
- mongo:/data/db
volumes:
postgres:
mongo: