Last active
June 30, 2022 12:30
-
-
Save ggreenleaf/f402ea09f38c7e6f398489adb920c55c to your computer and use it in GitHub Desktop.
SqlServer and azureite blob emulator docker compose with volumes
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
SQLSERVER_SA_PASSWORD=%%placeholder%% | |
SQLSERVER_DATA_PATH=/path/to/some/local/dir/data | |
SQLSERVER_LOG_PATH=/path/to/some/local/dir/log | |
SQLSERVER_SECRETS_PATH=/path/to/some/local/dir/secret | |
AZURITE_DATA_PATH=/path/to/some/local/dir/azurite | |
MIGRATION_CONNECTION_STRING=%%Placeholder%% |
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
services: | |
sqlserver: | |
image: mcr.microsoft.com/mssql/server:2022-latest | |
ports: | |
- 1433:1433 | |
volumes: | |
- ${SQLSERVER_DATA_PATH}:/var/opt/mssql/data | |
- ${SQLSERVER_LOG_PATH}:/var/opt/mssql/log | |
- ${SQLSERVER_SECRETS_PATH}:/var/opt/mssql/secrets | |
environment: | |
- ACCEPT_EULA=Y | |
- SA_PASSWORD=${SQLSERVER_SA_PASSWORD} | |
azurite: | |
image: mcr.microsoft.com/azure-storage/azurite | |
ports: | |
- 10000:10000 | |
- 10001:10001 | |
- 10002:10002 | |
volumes: | |
- ${AZURITE_DATA_PATH}:/data | |
app-migrations: | |
build: './db/' | |
image: app-migration | |
depends_on: | |
- sqlserver | |
environment: | |
- MIGRATION_CONNECTION_STRING=${MIGRATION_CONNECTION_STRING} |
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
FROM erikbra/grate:latest | |
ENV MIGRATION_CONNECTION_STRING="" | |
WORKDIR /app | |
COPY ./migrations ./migrations | |
RUN mkdir /app/migration-output | |
ENTRYPOINT ./grate -f=migrations -c="$MIGRATION_CONNECTION_STRING" --outputPath=./migration-output --schema=RoundhousE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment