-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
77 lines (75 loc) · 2.44 KB
/
docker-compose.yml
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
68
69
70
71
72
73
74
75
76
77
version: "3.8"
volumes:
sqlserver_data:
services:
database:
container_name: database
image: mcr.microsoft.com/mssql/server:2022-latest
ports:
- "1433:1433"
environment:
MSSQL_SA_PASSWORD: "Sa_Password:1q2w#ERT!"
ACCEPT_EULA: "Y"
volumes: # this will persist your data. delete your local './sqlserver_data' folder while this isn't running to reset
- sqlserver_data:/var/opt/mssql
restart: always
healthcheck:
test: ["CMD-SHELL", "/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P 'Sa_Password:1q2w#ERT!' -Q 'SELECT 1' || exit 1"]
interval: 10s
retries: 10
start_period: 10s
timeout: 3s
database.configurator:
image: mcr.microsoft.com/mssql/server:2022-latest
volumes:
- ./script:/docker-entrypoint-initdb.d
depends_on:
database:
condition: service_healthy
command: >
bash -c '
/opt/mssql-tools/bin/sqlcmd -S database -U sa -P "Sa_Password:1q2w#ERT!" -d master -i docker-entrypoint-initdb.d/data_setup.sql;
echo "All done!";'
frontend:
container_name: frontend
entrypoint:
- "sh"
- "-c"
- "chown -R root . && npm ci && npm run start"
environment:
NODE_ENV: development
REACT_APP_API_URL: http://localhost:3001
hostname: frontend
image: registry.access.redhat.com/ubi8/nodejs-18-minimal@sha256:74af9dc2b620022c77fcd712b811f64a03c1444ff1e9b9596a242b2edf3cf96f
links:
- backend
ports:
- "3000:3000"
volumes:
- ./frontend:/app:z
- /app/node_modules
user: root
working_dir: "/app"
backend:
container_name: backend
# entrypoint:
# - "sh"
# - "-c"
# - "npm i && npm run start"
hostname: backend
image: backend
build:
dockerfile: webapi\Dockerfile
# image: registry.access.redhat.com/ubi8/nodejs-18-minimal@sha256:74af9dc2b620022c77fcd712b811f64a03c1444ff1e9b9596a242b2edf3cf96f
links:
- database
ports:
- "3001:8080"
# volumes:
# - ./backend:/app:z
# - /app/node_modules
# user: root
# working_dir: "/app"
# depends_on:
# database:
# condition: service_healthy