forked from ytgov/internal-data-portal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.development.yml
133 lines (125 loc) · 3.33 KB
/
docker-compose.development.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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
x-default-environment: &default-environment
TZ: "UTC"
NODE_ENV: development
DB_HOST: db
DB_USER: sa
DB_NAME: idp_development
DB_PASS: &default-db-password DevPwd99!
DB_PORT: &default-db-port 1433
FRONTEND_URL: "http://localhost:8080"
VITE_APPLICATION_NAME: "Internal Data Portal"
VITE_API_BASE_URL: "http://localhost:3000"
VITE_AUTH0_CLIENT_ID: "ZHjPOeCwYBov6eR1lxGOVYhYi4VPV8eU"
VITE_AUTH0_AUDIENCE: "testing"
VITE_AUTH0_DOMAIN: "https://dev-0tc6bn14.eu.auth0.com"
RELEASE_TAG: "${RELEASE_TAG:-development}"
GIT_COMMIT_HASH: "${GIT_COMMIT_HASH:-not-set}"
MAIL_HOST: "mail"
MAIL_PORT: 1025
MAIL_FROM: "idp.development@yukon.ca"
services:
api:
build:
context: ./api
dockerfile: development.Dockerfile
env_file:
- ./api/.env.development
environment:
<<: *default-environment
tty: true # allows attaching debugger, equivalent of docker exec -t
# stdin_open: true # equivalent of docker exec -i
ports:
- "3000:3000"
volumes:
- ./api:/usr/src/api
- ./.gitignore:/usr/src/.gitignore
- ./.prettierrc.yaml:/usr/src/.prettierrc.yaml
depends_on:
db:
condition: service_healthy
web:
build:
context: ./web
dockerfile: development.Dockerfile
environment:
<<: *default-environment
ports:
- "8080:8080"
volumes:
- ./web:/usr/src/web
- ./.gitignore:/usr/src/.gitignore
- ./.prettierrc.yaml:/usr/src/.prettierrc.yaml
depends_on:
- api
test_api:
build:
context: ./api
dockerfile: development.Dockerfile
command: /bin/true
env_file:
- ./api/.env.development
environment:
<<: *default-environment
NODE_ENV: test
DB_NAME: idp_test
tty: true
volumes:
- ./api:/usr/src/api
depends_on:
db:
condition: service_healthy
test_web:
build:
context: ./web
dockerfile: development.Dockerfile
command: /bin/true
environment:
<<: *default-environment
NODE_ENV: test
tty: true
volumes:
- ./web:/usr/src/web
db:
image: mcr.microsoft.com/mssql/server:2022-CU13-ubuntu-22.04
user: root
environment:
<<: *default-environment
DB_HOST: "localhost"
MSSQL_SA_PASSWORD: *default-db-password
ACCEPT_EULA: "Y"
ports:
- "1433:1433"
volumes:
- db_data:/var/opt/mssql/data
healthcheck:
# Ensures that server is started and that "idp_development" database is in an "online" state.
# https://docs.microsoft.com/en-us/sql/relational-databases/system-catalog-views/sys-databases-transact-sql?view=sql-server-2017
test: |
sh -c '
/opt/mssql-tools/bin/sqlcmd \
-h -1 \
-t 1 \
-U sa \
-P "$$MSSQL_SA_PASSWORD" \
-Q "SET NOCOUNT ON; Select SUM(state) from sys.databases WHERE name = '$$DB_NAME'"
'
interval: 5s
timeout: 10s
retries: 3
start_period: 5s
mail:
image: maildev/maildev
ports:
- "1080:1080" # Web UI
- "1025:1025" # SMTP
# For easily generating large PlantUML diagrams
# Not relevant to production environment.
# Accessible at http://localhost:9999
plantuml:
image: plantuml/plantuml-server:jetty
ports:
- 9999:8080
environment:
PLANTUML_LIMIT_SIZE: 8192
volumes:
db_data: