42 lines
1.6 KiB
YAML
42 lines
1.6 KiB
YAML
# 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 by setting `ConnectionStrings:SqlServer` in
|
|
# `src/API/Baya.Web.Api/appsettings.Development.json` (or as an environment variable).
|
|
# `dotnet user-secrets` is NOT used in this repo — the `<UserSecretsId>` was removed, so that store is
|
|
# never read. See docs/rules/shared/code-quality.md §6 for the configuration model.
|
|
#
|
|
# docker compose up -d
|
|
# # then set ConnectionStrings:SqlServer as above, 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:
|
|
db:
|
|
image: mcr.microsoft.com/mssql/server:2022-latest
|
|
container_name: balinyaar-sqlserver
|
|
environment:
|
|
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:
|