2026-06-09 06:41:28 +03:30
|
|
|
# One-command local dev: Postgres (pgvector) + the web and worker roles of the single image.
|
|
|
|
|
# docker compose -f docker/docker-compose.yml up --build
|
|
|
|
|
name: teamup
|
|
|
|
|
|
|
|
|
|
services:
|
|
|
|
|
postgres:
|
|
|
|
|
# Pulled via the Nexus Docker proxy (reachable from Iran); upstream is docker.io/pgvector/pgvector.
|
|
|
|
|
image: mirror.soroushasadi.com/pgvector/pgvector:pg17
|
|
|
|
|
environment:
|
|
|
|
|
POSTGRES_DB: teamup
|
|
|
|
|
POSTGRES_USER: teamup
|
|
|
|
|
POSTGRES_PASSWORD: teamup
|
|
|
|
|
ports:
|
2026-06-09 07:07:07 +03:30
|
|
|
# Host port is configurable to avoid clashes with other local Postgres instances.
|
|
|
|
|
- "${POSTGRES_HOST_PORT:-5432}:5432"
|
2026-06-09 06:41:28 +03:30
|
|
|
volumes:
|
|
|
|
|
- pgdata:/var/lib/postgresql/data
|
|
|
|
|
- ./postgres-init.sh:/docker-entrypoint-initdb.d/01-init-vector.sh:ro
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U teamup -d teamup"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 5
|
|
|
|
|
start_period: 20s
|
|
|
|
|
|
|
|
|
|
web:
|
|
|
|
|
build:
|
|
|
|
|
context: ..
|
|
|
|
|
dockerfile: docker/Dockerfile
|
|
|
|
|
environment:
|
|
|
|
|
ASPNETCORE_ENVIRONMENT: Development
|
|
|
|
|
ASPNETCORE_HTTP_PORTS: "8080"
|
|
|
|
|
RUN_MODE: web
|
|
|
|
|
ConnectionStrings__Postgres: "Host=postgres;Port=5432;Database=teamup;Username=teamup;Password=teamup"
|
|
|
|
|
# The web role applies migrations; the worker waits (EF's DB-wide lock makes it safe either way).
|
|
|
|
|
Database__ApplyMigrationsOnStartup: "true"
|
|
|
|
|
ports:
|
2026-06-09 07:07:07 +03:30
|
|
|
- "${WEB_HOST_PORT:-8080}:8080"
|
2026-06-09 06:41:28 +03:30
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
|
|
worker:
|
|
|
|
|
build:
|
|
|
|
|
context: ..
|
|
|
|
|
dockerfile: docker/Dockerfile
|
|
|
|
|
environment:
|
|
|
|
|
ASPNETCORE_ENVIRONMENT: Development
|
|
|
|
|
RUN_MODE: worker
|
|
|
|
|
ConnectionStrings__Postgres: "Host=postgres;Port=5432;Database=teamup;Username=teamup;Password=teamup"
|
|
|
|
|
Database__ApplyMigrationsOnStartup: "false"
|
|
|
|
|
depends_on:
|
|
|
|
|
postgres:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
pgdata:
|