setup local dev env

This commit is contained in:
2026-03-10 17:13:23 +01:00
parent b27db93a90
commit f4d3fade9b
61 changed files with 6695 additions and 228 deletions

View File

@@ -1,20 +1,64 @@
services:
postgres:
image: postgres:18
campaign-service:
build:
context: .
dockerfile: backend/campaign-service/Dockerfile
restart: unless-stopped
env_file:
- path: .env
required: false
environment:
POSTGRES_DB: campaign_manager
POSTGRES_USER: campaign_manager
POSTGRES_PASSWORD: devpassword
USERS_DATABASE_URL: ${USERS_DATABASE_URL:-postgres://cm_campaign_app:devpassword@postgres:5432/cm_users}
CAMPAIGN_DATABASE_URL: ${CAMPAIGN_DATABASE_URL:-postgres://cm_campaign_app:devpassword@postgres:5432/cm_campaign}
JWT_SECRET: ${JWT_SECRET:-change-me-to-a-long-random-secret}
PORT: ${CAMPAIGN_PORT:-3000}
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U campaign_manager"]
interval: 5s
timeout: 5s
retries: 5
- "3000:3000"
networks:
- dev-infra
- internal
volumes:
postgres_data:
content-service:
build:
context: .
dockerfile: backend/content-service/Dockerfile
restart: unless-stopped
env_file:
- path: .env
required: false
environment:
CONTENT_DATABASE_URL: ${CONTENT_DATABASE_URL:-postgres://cm_content_app:devpassword@postgres:5432/cm_content}
JWT_SECRET: ${JWT_SECRET:-change-me-to-a-long-random-secret}
PORT: ${CONTENT_PORT:-3001}
ports:
- "3001:3001"
networks:
- dev-infra
- internal
web:
build:
context: .
dockerfile: web/Dockerfile
restart: unless-stopped
env_file:
- path: .env
required: false
environment:
CAMPAIGN_API_BASE: ${CAMPAIGN_API_BASE:-http://campaign-service:3000/v1}
CONTENT_API_BASE: ${CONTENT_API_BASE:-http://content-service:3001/v1}
PORT: ${WEB_PORT:-5173}
HOST: 0.0.0.0
ports:
- "${WEB_PORT:-5173}:${WEB_PORT:-5173}"
depends_on:
- campaign-service
- content-service
networks:
- internal
networks:
dev-infra:
external: true
internal:
driver: bridge