update: generalize docker deployment

This commit is contained in:
rasmusq
2025-12-21 16:14:46 +01:00
parent 79bdda7476
commit c668b9377d
5 changed files with 24 additions and 135 deletions
+21
View File
@@ -0,0 +1,21 @@
services:
database:
image: postgres:16-alpine
container_name: wishlist-postgres-test
restart: unless-stopped
ports:
- 5432:5432
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
POSTGRES_DB: ${POSTGRES_DB}
volumes:
- db-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"]
interval: 10s
timeout: 5s
retries: 5
volumes:
db-data: