-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
68 lines (63 loc) · 1.68 KB
/
docker-compose.yaml
File metadata and controls
68 lines (63 loc) · 1.68 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
62
63
64
65
66
67
version: '3.8'
networks:
smartsystems_vn:
driver: bridge
services:
api:
container_name: smartsystems-identity-server-api
restart: always
build:
dockerfile: Dockerfile
context: ./FastAPI-Server/
platforms:
- linux/arm64
ports:
- "8000:80"
depends_on:
- mssql
networks:
- smartsystems_vn
environment:
- ENVIRONMENT=${ENVIRONMENT:-dev}
command: uvicorn main:api --host 0.0.0.0 --port 80 --reload
client:
container_name: smartsystems-identity-server-client
restart: always
build:
dockerfile: Dockerfile
context: ./React-Client/
platforms:
- linux/arm64
ports:
- "3000:3000"
depends_on:
- mssql
- api
networks:
- smartsystems_vn
environment:
- ENVIRONMENT=${ENVIRONMENT:-dev}
mssql:
image: mcr.microsoft.com/azure-sql-edge:latest
ports:
- 1433:1433
environment:
- ACCEPT_EULA=1
- SA_PASSWORD=Passw@rd
volumes:
- ./SQLDB:/var/opt/mssql/DDL
networks:
- smartsystems_vn
command:
- /bin/bash
- -c
- |
# Launch MSSQL and send to background
/opt/mssql/bin/sqlservr &
# Wait 30 seconds for it to be available
sleep 60
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Passw@rd -i /var/opt/mssql/DDL/IdentitySQL_init.sql
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Passw@rd -i /var/opt/mssql/DDL/IdentityTables_init.sql
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Passw@rd -i /var/opt/mssql/DDL/TestData_init.sql
# So that the container doesn't shut down, sleep this thread
sleep infinity