Added docker compose with postgres db

This commit is contained in:
2023-11-19 19:59:40 +03:00
parent e466e55bef
commit f424d6ffe6
2 changed files with 31 additions and 0 deletions

20
docker-compose.yml Normal file
View File

@@ -0,0 +1,20 @@
version: '3.9'
services:
db:
container_name: neuro_db
image: postgres:alpine
environment:
- POSTGRES_USER=${DATABASE_USER}
- POSTGRES_PASSWORD=${DATABASE_PASSWORD}
- POSTGRES_DB=${DATABASE_NAME}
- PGDATA=/var/lib/postgresql/data/pgdata
ports:
- "${DATABASE_PORT}:5432"
env_file:
- ./backend/.env
volumes:
- neuro_postgres_db:/var/lib/postgresql/data
volumes:
neuro_postgres_db:
driver: local