-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (70 loc) · 2.34 KB
/
Copy pathdocker-compose.yml
File metadata and controls
74 lines (70 loc) · 2.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
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}
TASKIST_ConnectionStrings__AppContext: "Server=db,1433;Database=${MSSQL_DATABASE:-Taskist};User Id=sa;Password=${MSSQL_SA_PASSWORD};TrustServerCertificate=True;"
depends_on:
db:
condition: service_healthy
restart: "no"
web:
build:
context: .
dockerfile: Dockerfile
environment:
ASPNETCORE_ENVIRONMENT: ${ASPNETCORE_ENVIRONMENT:-Production}
TASKIST_ConnectionStrings__AppContext: "Server=db,1433;Database=${MSSQL_DATABASE:-Taskist};User Id=sa;Password=${MSSQL_SA_PASSWORD};TrustServerCertificate=True;"
TASKIST_Security__EncryptionKey: ${TASKIST_SECURITY_ENCRYPTIONKEY:?set TASKIST_SECURITY_ENCRYPTIONKEY in .env}
# the sample stack serves plain HTTP, so secure-only cookies would block sign-in.
# set this to true once you put Taskist behind TLS.
TASKIST_Security__RequireHttpsCookies: ${TASKIST_REQUIRE_HTTPS_COOKIES:-false}
ports:
- "${TASKIST_PORT:-8080}:8080"
volumes:
- taskist-keys:/app/App_Data/DataProtectionKeys
- taskist-uploads:/app/wwwroot/uploads
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:
taskist-uploads: