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:
parent
1259bbcccc
commit
bb5313b403
16
docker-compose.yml
Normal file
16
docker-compose.yml
Normal 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/'
|
Loading…
x
Reference in New Issue
Block a user