This commit is contained in:
counterweight 2025-07-24 18:04:49 +02:00
parent 40d559a989
commit aa526dd3f5
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
2 changed files with 24 additions and 8 deletions

16
Makefile Normal file
View file

@ -0,0 +1,16 @@
APP_DB_VOLUME=app-db-data
DW_DB_VOLUME=dw-db-data
COMPOSE_FILE=docker-compose.yml
.PHONY: start stop reset
start:
docker compose -f $(COMPOSE_FILE) up -d
stop:
docker compose -f $(COMPOSE_FILE) down
reset: stop
@echo "Removing volumes..."
docker volume rm -f $(APP_DB_VOLUME) $(DW_DB_VOLUME)
@echo "Volumes removed. You can now start fresh with 'make start'"

View file

@ -5,11 +5,11 @@ services:
image: postgres:17 image: postgres:17
container_name: app-db container_name: app-db
environment: environment:
POSTGRES_USER: app POSTGRES_USER: ${POSTGRES_APP_USER}
POSTGRES_PASSWORD: app123 POSTGRES_PASSWORD: ${POSTGRES_APP_PASSWORD}
POSTGRES_DB: app_db POSTGRES_DB: ${POSTGRES_APP_DB}
ports: ports:
- "5432:5432" - "${POSTGRES_APP_PORT}:5432"
volumes: volumes:
- app-db-data:/var/lib/postgresql/data - app-db-data:/var/lib/postgresql/data
@ -17,11 +17,11 @@ services:
image: postgres:17 image: postgres:17
container_name: dw-db container_name: dw-db
environment: environment:
POSTGRES_USER: dw POSTGRES_USER: ${POSTGRES_DW_USER}
POSTGRES_PASSWORD: dw123 POSTGRES_PASSWORD: ${POSTGRES_DW_PASSWORD}
POSTGRES_DB: dw_db POSTGRES_DB: ${POSTGRES_DW_DB}
ports: ports:
- "5433:5432" - "${POSTGRES_DW_PORT}:5432"
volumes: volumes:
- dw-db-data:/var/lib/postgresql/data - dw-db-data:/var/lib/postgresql/data