chore: implement semantic versioning with docker image tagging

This commit is contained in:
2026-03-31 16:34:30 -07:00
parent 777d3a93bf
commit 779f9f4e7c
7 changed files with 775 additions and 36 deletions
+25 -34
View File
@@ -1,66 +1,57 @@
# Production Docker Compose Configuration
# Usage: docker-compose up -d
services:
app:
build:
context: .
target: runner
image: dhg.lol:5000/euchre-camp:0.1.0.dev
container_name: euchre-camp-app
ports:
- "3000:3000"
environment:
# Database Configuration
- DATABASE_PROVIDER=postgresql
- DATABASE_URL=postgresql://euchre_camp:euchrepassword@postgresql:5432/euchre_camp
- DATABASE_SHADOW_URL=postgresql://euchre_camp:euchrepassword@postgresql:5432/euchre_camp_shadow
- DATABASE_URL=postgresql://euchre_camp:password@db:5432/euchre_camp
- DATABASE_SHADOW_URL=postgresql://euchre_camp:password@db:5432/euchre_camp_shadow
# Better Auth Configuration
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-your-secret-key-change-in-production}
- BETTER_AUTH_SECRET=${BETTER_AUTH_SECRET:-change-this-secret-in-production}
- BETTER_AUTH_URL=${BETTER_AUTH_URL:-http://localhost:3000}
# Application Configuration
- NODE_ENV=${NODE_ENV:-production}
- NODE_ENV=production
# Trusted Origins for Better Auth
- TRUSTED_ORIGINS=${TRUSTED_ORIGINS:-http://localhost:3000,http://127.0.0.1:3000}
# Version tracking
- IMAGE_VERSION=0.1.0.dev
depends_on:
postgresql:
condition: service_healthy
volumes:
# Persist uploaded files and static content
- app_data:/app/public/uploads
- db
restart: unless-stopped
networks:
- euchre-network
postgresql:
db:
image: postgres:15-alpine
container_name: euchre-camp-postgres
container_name: euchre-camp-db
ports:
- "5432:5432"
environment:
- POSTGRES_DB=euchre_camp
- POSTGRES_USER=euchre_camp
- POSTGRES_PASSWORD=euchrepassword
ports:
- "5432:5432"
- POSTGRES_PASSWORD=password
volumes:
- postgres_data:/var/lib/postgresql/data
- euchre_camp_db_data:/var/lib/postgresql/data
- ./scripts/init-postgres.sh:/docker-entrypoint-initdb.d/init-postgres.sh
healthcheck:
test: ["CMD-SHELL", "pg_isready -U euchre_camp -d euchre_camp"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
restart: unless-stopped
networks:
- euchre-network
volumes:
postgres_data:
driver: local
app_data:
euchre_camp_db_data:
driver: local
networks: