39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
|
|
version: '3.8'
|
||
|
|
|
||
|
|
services:
|
||
|
|
sqlserver:
|
||
|
|
image: mcr.microsoft.com/mssql/server:2022-latest
|
||
|
|
environment:
|
||
|
|
ACCEPT_EULA: "Y"
|
||
|
|
SA_PASSWORD: "YourStrong@Password123"
|
||
|
|
MSSQL_PID: "Developer"
|
||
|
|
ports:
|
||
|
|
- "1433:1433"
|
||
|
|
volumes:
|
||
|
|
- sqlserver_data:/var/opt/mssql
|
||
|
|
- ./Backend/Sql:/docker-entrypoint-initdb.d
|
||
|
|
healthcheck:
|
||
|
|
test: /opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P "YourStrong@Password123" -Q "SELECT 1" || exit 1
|
||
|
|
interval: 10s
|
||
|
|
timeout: 3s
|
||
|
|
retries: 10
|
||
|
|
start_period: 30s
|
||
|
|
|
||
|
|
backend:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: Backend/Dockerfile
|
||
|
|
ports:
|
||
|
|
- "5000:8080"
|
||
|
|
environment:
|
||
|
|
- ASPNETCORE_ENVIRONMENT=Development
|
||
|
|
- ConnectionStrings__DefaultConnection=Server=sqlserver;Database=PruebaGentle;User Id=sa;Password=YourStrong@Password123;TrustServerCertificate=true;
|
||
|
|
- JwtSettings__Secret=ThisIsA32CharacterLongSecretKey!!
|
||
|
|
- JwtSettings__ExpirationHours=24
|
||
|
|
depends_on:
|
||
|
|
sqlserver:
|
||
|
|
condition: service_healthy
|
||
|
|
|
||
|
|
volumes:
|
||
|
|
sqlserver_data:
|