Created
March 5, 2024 20:43
-
-
Save marcin-burak/a03794603aea9c7af4a3d77ada07dda4 to your computer and use it in GitHub Desktop.
Minimal SQL Server docker compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.4' | |
services: | |
web: | |
image: ${DOCKER_REGISTRY-}<PROJECT> | |
build: | |
context: . | |
dockerfile: src/<PROJECT>/Dockerfile | |
environment: | |
- SqlServer__ConnectionString=Server=sqlserver,1433;Database=<DATABASE_NAME>;User=sa;Password=P@ssw0rd;TrustServerCertificate=true; | |
networks: | |
- sql | |
depends_on: | |
- sql | |
sql: | |
image: mcr.microsoft.com/mssql/server:2022-latest | |
environment: | |
- ACCEPT_EULA=Y | |
- MSSQL_SA_PASSWORD=P@ssw0rd | |
ports: | |
- 1433:1433 | |
volumes: | |
- sqlvolume:/var/opt/mssql | |
networks: | |
database: | |
aliases: | |
- sqlserver | |
volumes: | |
sqlvolume: | |
networks: | |
database: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment