refinement phase 0
This commit is contained in:
+35
-20
@@ -1,22 +1,37 @@
|
||||
version: "3.9" # optional since v1.27.0
|
||||
# Local development database for the Balinyaar API.
|
||||
#
|
||||
# Brings up a throwaway SQL Server 2022 (Developer edition) on localhost:1433 so a developer with no
|
||||
# access to any remote database can boot the API. On first run Program.cs applies all EF migrations and
|
||||
# seeds roles + an admin user + a sandbox gateway against this empty instance.
|
||||
#
|
||||
# The SA password below is a well-known DEV-ONLY value: it is NOT a secret, is used only on localhost,
|
||||
# and never reaches a deployed environment. Point the API at this instance via `dotnet user-secrets`
|
||||
# (see dev/post-phase/refinement/RUNBOOK.md) — never by editing a committed appsettings*.json.
|
||||
#
|
||||
# docker compose up -d
|
||||
# # then set ConnectionStrings:SqlServer via user-secrets (see the runbook), then `dotnet run`
|
||||
#
|
||||
# The API itself runs on the host via `dotnet run` (not in a container) for the local-dev loop — this
|
||||
# compose file intentionally provisions only the database.
|
||||
|
||||
services:
|
||||
web_api:
|
||||
image: bobby-baya
|
||||
container_name: bobby-baya-app
|
||||
environment:
|
||||
"ASPNETCORE_URLS": "https://+;http://+"
|
||||
"ASPNETCORE_Kestrel__Certificates__Default__Password": "Strong@Password"
|
||||
"ASPNETCORE_Kestrel__Certificates__Default__Path": "/https/baya.pfx"
|
||||
ports:
|
||||
- "5000:80"
|
||||
- "5001:443"
|
||||
volumes:
|
||||
- ~/.aspnet/https:/https
|
||||
sql:
|
||||
image: "mcr.microsoft.com/mssql/server:2022-latest"
|
||||
container_name: sql_server2022
|
||||
ports: # not actually needed, because the two services are on the same network
|
||||
- "1435:1433"
|
||||
db:
|
||||
image: mcr.microsoft.com/mssql/server:2022-latest
|
||||
container_name: balinyaar-sqlserver
|
||||
environment:
|
||||
- ACCEPT_EULA=y
|
||||
- SA_PASSWORD=A&VeryComplex123Password
|
||||
ACCEPT_EULA: "Y"
|
||||
MSSQL_PID: "Developer"
|
||||
MSSQL_SA_PASSWORD: "Balinyaar_Dev1433"
|
||||
ports:
|
||||
- "1433:1433"
|
||||
volumes:
|
||||
- balinyaar-mssql-data:/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: 10
|
||||
start_period: 30s
|
||||
|
||||
volumes:
|
||||
balinyaar-mssql-data:
|
||||
|
||||
Reference in New Issue
Block a user