mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 10:42:08 +00:00
add docker config
This commit is contained in:
57
docker-compose.dev.yaml
Normal file
57
docker-compose.dev.yaml
Normal file
@@ -0,0 +1,57 @@
|
||||
services:
|
||||
sqlserver:
|
||||
image: mcr.microsoft.com/mssql/server:2022-latest
|
||||
platform: linux/amd64
|
||||
container_name: dev-env-sqlserver
|
||||
environment:
|
||||
ACCEPT_EULA: "Y"
|
||||
SA_PASSWORD: "${SA_PASSWORD}"
|
||||
MSSQL_PID: "Developer"
|
||||
ports:
|
||||
- "1433:1433"
|
||||
volumes:
|
||||
- sqlserverdata:/var/opt/mssql
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "/opt/mssql-tools18/bin/sqlcmd -S localhost -U sa -P '${SA_PASSWORD}' -C -Q 'SELECT 1' || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 12
|
||||
start_period: 30s
|
||||
networks:
|
||||
- devnet
|
||||
|
||||
api.core:
|
||||
image: api.core
|
||||
container_name: dev-env-api-core
|
||||
depends_on:
|
||||
sqlserver:
|
||||
condition: service_healthy
|
||||
build:
|
||||
context: ./src/Core
|
||||
dockerfile: API/API.Core/Dockerfile
|
||||
args:
|
||||
BUILD_CONFIGURATION: Release
|
||||
APP_UID: 1000
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "8081:8081"
|
||||
environment:
|
||||
ASPNETCORE_ENVIRONMENT: "Development"
|
||||
ASPNETCORE_URLS: "http://0.0.0.0:8080"
|
||||
DOTNET_RUNNING_IN_CONTAINER: "true"
|
||||
DB_CONNECTION_STRING: "${DB_CONNECTION_STRING}"
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- devnet
|
||||
volumes:
|
||||
- nuget-cache:/root/.nuget/packages
|
||||
|
||||
volumes:
|
||||
sqlserverdata:
|
||||
driver: local
|
||||
nuget-cache:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
devnet:
|
||||
driver: bridge
|
||||
Reference in New Issue
Block a user