Use Azure SQL Edge for development (#1709)

This commit is contained in:
Oscar Hinton
2021-11-24 19:08:36 +01:00
committed by GitHub
parent fa3f1ad0ce
commit 0ae9e28884
4 changed files with 25 additions and 9 deletions

16
dev/migrate.ps1 Normal file → Executable file
View File

@@ -1,4 +1,18 @@
#!/usr/bin/env pwsh
# Creates the vault_dev database, and runs all the migrations.
docker-compose --profile mssql exec mssql bash /mnt/helpers/run_migrations.sh @args
# Due to azure-edge-sql not containing the mssql-tools on ARM, we manually use
# the mssql-tools container which runs under x86_64. We should monitor this
# in the future and investigate if we can migrate back.
# docker-compose --profile mssql exec mssql bash /mnt/helpers/run_migrations.sh @args
docker run `
-v "$(pwd)/helpers/mssql:/mnt/helpers" `
-v "$(pwd)/../util/Migrator:/mnt/migrator/" `
-v "$(pwd)/.data/mssql:/mnt/data" `
--env-file .env `
--network=bitwardenserver_default `
--rm `
-it `
mcr.microsoft.com/mssql-tools `
/mnt/helpers/run_migrations.sh @args