docker-compose.yml
Rama develop · réplica de lectura del repositorio original.
name: taskist
services:
db:
image: mcr.microsoft.com/mssql/server:2022-latest
environment:
ACCEPT_EULA: "Y"
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD:?set MSSQL_SA_PASSWORD in .env}
MSSQL_PID: Developer
ports:
- "${MSSQL_PORT:-1433}:1433"
volumes:
- taskist-db:/var/opt/mssql
healthcheck:
test:
[
"CMD-SHELL",
"/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P \"$$MSSQL_SA_PASSWORD\" -C -Q 'SELECT 1' || exit 1",
]
interval: 10s
timeout: 5s
retries: 12
start_period: 30s
# applies migrations and seed data, then exits
migrate:
build:
context: .
dockerfile: Dockerfile.migrate
environment:
MSSQL_HOST: db
MSSQL_SA_PASSWORD: ${MSSQL_SA_PASSWORD}
MSSQL_DATABASE: ${MSSQL_DATABASE:-Taskist}
SEED_DATA: ${SEED_DATA:-true}
SEED_DUMMY_DATA: ${SEED_DUMMY_DATA:-false}
depends_on:
db:
condition: service_healthy
restart: "no"
web:
build:
context: .
dockerfile: Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
ConnectionStrings__AppContext: "Server=db,1433;Database=${MSSQL_DATABASE:-Taskist};User Id=sa;Password=${MSSQL_SA_PASSWORD};TrustServerCertificate=True;"
App__BaseUrl: ${APP_BASE_URL:-http://localhost:8080/}
# the sample stack serves plain HTTP, so secure-only sign-in cookies would block sign-in.
# set this to true once you put Taskist behind TLS.
Security__RequireHttpsCookies: ${TASKIST_REQUIRE_HTTPS_COOKIES:-false}
# enable when a reverse proxy terminates TLS in front of this container
Security__ForwardedHeaders__Enabled: ${TASKIST_FORWARDED_HEADERS:-false}
Security__ForwardedHeaders__KnownNetworks__0: ${TASKIST_PROXY_NETWORK:-172.16.0.0/12}
# optional error tracking; see SENTRY_* in .env.example
Sentry__Enabled: ${SENTRY_ENABLED:-false}
Sentry__Dsn: ${SENTRY_DSN:-}
Sentry__Environment: ${SENTRY_ENVIRONMENT:-}
Sentry__TracesSampleRate: ${SENTRY_TRACES_SAMPLE_RATE:-0}
ports:
- "${TASKIST_PORT:-8080}:8080"
volumes:
- taskist-keys:/app/App_Data/DataProtectionKeys
depends_on:
db:
condition: service_healthy
migrate:
condition: service_completed_successfully
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:8080/login || exit 1"]
interval: 15s
timeout: 5s
retries: 5
start_period: 40s
restart: unless-stopped
volumes:
taskist-db:
taskist-keys: