-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
61 lines (53 loc) · 1.63 KB
/
docker-compose.yml
File metadata and controls
61 lines (53 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
version: '3.4'
services:
middt_sample_blazorserver:
image: ${DOCKER_REGISTRY-}middtsampleblazorserver
build:
context: .
dockerfile: Sample/Middt.Sample.BlazorServer/Dockerfile
depends_on: [middt_sample_api]
middt_sample_api:
image: ${DOCKER_REGISTRY-}middtsampleapi
build:
context: .
dockerfile: Sample/Middt.Sample.Api/Dockerfile
mq:
image: "rabbitmq:3.9-management"
ports:
- "5672:5672"
- "15672:15672"
redis_master:
image: "redis:latest"
ports:
- "6379:6379"
db_server:
image: mcr.microsoft.com/mssql/server
environment:
- ACCEPT_EULA=Y
- MSSQL_SA_PASSWORD=yourStrong(!)Password
- MSSQL_TCP_PORT=1433
volumes:
- ./data:/scripts/
ports:
- "1433:1433"
#entrypoint: /bin/bash
command:
- /bin/bash
- -c
- |
/opt/mssql/bin/sqlservr &
pid=$$!
echo "Waiting for MS SQL to be available"
/opt/mssql-tools/bin/sqlcmd -l 30 -S localhost -h-1 -V1 -U sa -P $$MSSQL_SA_PASSWORD -Q "SET NOCOUNT ON SELECT \"YAY WE ARE UP\" , @@servername"
is_up=$$?
while [ $$is_up -ne 0 ] ; do
echo -e $$(date)
/opt/mssql-tools/bin/sqlcmd -l 30 -S localhost -h-1 -V1 -U sa -P $$MSSQL_SA_PASSWORD -Q "SET NOCOUNT ON SELECT \"YAY WE ARE UP\" , @@servername"
is_up=$$?
sleep 5
done
for foo in /scripts/*.sql
do /opt/mssql-tools/bin/sqlcmd -U sa -P $$MSSQL_SA_PASSWORD -l 30 -e -i $$foo
done
echo "All scripts have been executed. Waiting for MS SQL(pid $$pid) to terminate."
wait $$pid