feat(service): add Docker Compose configuration for database

Introduce a docker-compose.yml file to manage the PostgreSQL database container. This setup includes environment variables, port configuration, and volume mapping for persistent data storage.
This commit is contained in:
Mathis H (Avnyr) 2024-10-17 17:03:28 +02:00
parent 1259bbcccc
commit bb5313b403
Signed by: Mathis
GPG Key ID: DD9E0666A747D126

16
docker-compose.yml Normal file
View File

@ -0,0 +1,16 @@
version: '3'
services:
database:
container_name: "app-db"
image: 'postgres:latest'
env_file:
- .env
ports:
- "${POSTGRES_PORT}:5432"
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DATABASE}
volumes:
- './db-data/:/var/lib/postgresql/data/'