Skip to content

Commit 49113d8

Browse files
JasminMuslexiv0re
andauthored
Update QMS docker-compose.yaml so it can view and download PDF files (hcengineering#6507)
Signed-off-by: Jasmin <[email protected]> Co-authored-by: Alexey Zinoviev <[email protected]>
1 parent f87b0e2 commit 49113d8

File tree

15 files changed

+156
-45
lines changed

15 files changed

+156
-45
lines changed

Diff for: .github/workflows/main.yml

+3
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,9 @@ jobs:
407407
run: node common/scripts/install-run-rush.js docker:build -p 20
408408
env:
409409
DOCKER_CLI_HINTS: false
410+
- name: Configure /etc/hosts
411+
run: |
412+
sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts
410413
- name: Prepare server
411414
run: |
412415
cd ./qms-tests

Diff for: README.md

+7-2
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,17 @@ Alternatively, you can just execute:
127127
sh ./scripts/create-workspace.sh
128128
```
129129
130-
Accessing the URL http://localhost:8087 will lead you to the app in production mode.
130+
Add the following line to your /etc/hosts file
131+
132+
```
133+
127.0.0.1 host.docker.internal
134+
```
135+
136+
Accessing the URL http://host.docker.internal:8087 will lead you to the app in development mode.
131137
132138
Limitations:
133139
134140
- Local installation does not support sending emails, thus disabling functionalities such as password recovery and email notifications.
135-
- Integrations with Telegram, Gmail, and other content sources are exclusively available as Docker containers, sourced from private repositories. However, these integrations are fully functional and can be utilized with the platform.
136141
137142
## Run in development mode
138143

Diff for: dev/branding.json

+14
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
"language": "en",
1414
"lastNameFirst": "true"
1515
},
16+
"host.docker.internal:8087": {
17+
"key": "huly-docker",
18+
"title": "Huly",
19+
"protocol": "http",
20+
"language": "en",
21+
"lastNameFirst": "true"
22+
},
1623
"localhost:8081": {
1724
"key": "tracex-dev",
1825
"title": "TraceX",
@@ -25,6 +32,13 @@
2532
"protocol": "http",
2633
"language": "en"
2734
},
35+
"host.docker.internal:8088": {
36+
"key": "tracex-docker",
37+
"title": "Huly",
38+
"protocol": "http",
39+
"language": "en",
40+
"lastNameFirst": "true"
41+
},
2842
"example.localhost": {
2943
"key": "example",
3044
"title": "Example",

Diff for: dev/docker-compose.yaml

+16-16
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ services:
7474
- ACCOUNT_PORT=3000
7575
- SERVER_SECRET=secret
7676
- MONGO_URL=${MONGO_URL}
77-
- TRANSACTOR_URL=ws://host.docker.internal:3333;ws://localhost:3333
77+
- TRANSACTOR_URL=ws://host.docker.internal:3333
7878
- SES_URL=
7979
- STORAGE_CONFIG=${STORAGE_CONFIG}
8080
- FRONT_URL=http://host.docker.internal:8087
8181
- RESERVED_DB_NAMES=telegram,gmail,github
8282
- MODEL_ENABLED=*
8383
- LAST_NAME_FIRST=true
84-
- ACCOUNTS_URL=http://localhost:3000
84+
- ACCOUNTS_URL=http://host.docker.internal:3000
8585
- BRANDING_PATH=/var/cfg/branding.json
8686
# - INIT_SCRIPT_URL=https://raw.githubusercontent.com/hcengineering/init/main/script.yaml
8787
# - INIT_WORKSPACE=onboarding
@@ -102,10 +102,10 @@ services:
102102
# - WS_OPERATION=create
103103
- SERVER_SECRET=secret
104104
- MONGO_URL=mongodb://mongodb:27017?compressors=snappy
105-
- TRANSACTOR_URL=ws://transactor:3333;ws://localhost:3333
105+
- TRANSACTOR_URL=ws://transactor:3333;ws://host.docker.internal:3333
106106
- SES_URL=
107107
- STORAGE_CONFIG=${STORAGE_CONFIG}
108-
- FRONT_URL=http://localhost:8087
108+
- FRONT_URL=http://host.docker.internal:8087
109109
- RESERVED_DB_NAMES=telegram,gmail,github
110110
- MODEL_ENABLED=*
111111
- ACCOUNTS_URL=http://host.docker.internal:3000
@@ -151,22 +151,22 @@ services:
151151
- SERVER_SECRET=secret
152152
- MONGO_URL=${MONGO_URL}
153153
- 'MONGO_OPTIONS={"appName":"front","maxPoolSize":1}'
154-
- ACCOUNTS_URL=http://localhost:3000
154+
- ACCOUNTS_URL=http://host.docker.internal:3000
155155
- UPLOAD_URL=/files
156156
- ELASTIC_URL=http://host.docker.internal:9200
157-
- GMAIL_URL=http://localhost:8088
158-
- CALENDAR_URL=http://localhost:8095
159-
- TELEGRAM_URL=http://localhost:8086
160-
- REKONI_URL=http://localhost:4004
161-
- COLLABORATOR_URL=ws://localhost:3078
157+
- GMAIL_URL=http://host.docker.internal:8088
158+
- CALENDAR_URL=http://host.docker.internal:8095
159+
- TELEGRAM_URL=http://host.docker.internal:8086
160+
- REKONI_URL=http://host.docker.internal:4004
161+
- COLLABORATOR_URL=ws://host.docker.internal:3078
162162
- STORAGE_CONFIG=${STORAGE_CONFIG}
163-
- GITHUB_URL=http://localhost:3500
164-
- PRINT_URL=http://localhost:4005
165-
- SIGN_URL=http://localhost:4006
166-
- ANALYTICS_COLLECTOR_URL=http://localhost:4017
163+
- GITHUB_URL=http://host.docker.internal:3500
164+
- PRINT_URL=http://host.docker.internal:4005
165+
- SIGN_URL=http://host.docker.internal:4006
166+
- ANALYTICS_COLLECTOR_URL=http://host.docker.internal:4017
167167
- DESKTOP_UPDATES_URL=https://dist.huly.io
168168
- DESKTOP_UPDATES_CHANNEL=dev
169-
- BRANDING_URL=http://localhost:8087/branding.json
169+
- BRANDING_URL=http://host.docker.internal:8087/branding.json
170170
restart: unless-stopped
171171
transactor:
172172
image: hardcoreeng/transactor
@@ -197,7 +197,7 @@ services:
197197
- METRICS_FILE=metrics.txt
198198
- STORAGE_CONFIG=${STORAGE_CONFIG}
199199
- REKONI_URL=http://host.docker.internal:4004
200-
- FRONT_URL=http://localhost:8087
200+
- FRONT_URL=http://host.docker.internal:8087
201201
# - APM_SERVER_URL=http://apm-server:8200
202202
- SES_URL=''
203203
- ACCOUNTS_URL=http://host.docker.internal:3000

Diff for: qms-tests/.env

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"
1+
STORAGE_CONFIG="minio|minio?accessKey=minioadmin&secretKey=minioadmin"
2+
MONGO_URL=mongodb://mongodb:27018?compressors=snappy

Diff for: qms-tests/branding-test.json

+43
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,49 @@
4242
}
4343
]
4444
},
45+
"host.docker.internal:8083": {
46+
"key": "tracex-docker",
47+
"title": "TraceX",
48+
"protocol": "http",
49+
"languages": "en",
50+
"defaultLanguage": "en",
51+
"defaultApplication": "documents",
52+
"defaultSpace": "documents:space:QualityDocuments",
53+
"defaultSpecial": "",
54+
"lastNameFirst": "true",
55+
"initWorkspace": "init-ws-qms",
56+
"links": [
57+
{
58+
"rel": "shortcut icon",
59+
"type": "image/x-icon",
60+
"href": "/tracex/favicon.ico"
61+
},
62+
{
63+
"rel": "icon",
64+
"type": "image/svg+xml",
65+
"sizes": "any",
66+
"href": "/tracex/favicon.svg"
67+
},
68+
{
69+
"rel": "icon",
70+
"type": "image/png",
71+
"sizes": "16x16",
72+
"href": "/tracex/favicon_16.png"
73+
},
74+
{
75+
"rel": "icon",
76+
"type": "image/png",
77+
"sizes": "32x32",
78+
"href": "/tracex/favicon_32.png"
79+
},
80+
{
81+
"rel": "icon",
82+
"type": "image/png",
83+
"sizes": "192x192",
84+
"href": "/tracex/favicon_192.png"
85+
}
86+
]
87+
},
4588
"localhost:8080": {
4689
"key": "tracex-dev",
4790
"title": "TraceX",

Diff for: qms-tests/docker-compose.yaml

+45-12
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ services:
5050
- ACCOUNT_PORT=3003
5151
- SERVER_SECRET=secret
5252
- MONGO_URL=mongodb://mongodb:27018
53-
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
53+
- TRANSACTOR_URL=ws://transactor:3334;ws://host.docker.internal:3334
5454
- STORAGE_CONFIG=${STORAGE_CONFIG}
5555
- MODEL_ENABLED=*
5656
- BRANDING_PATH=/var/cfg/branding-test.json
@@ -64,7 +64,7 @@ services:
6464
environment:
6565
- SERVER_SECRET=secret
6666
- MONGO_URL=mongodb://mongodb:27018
67-
- TRANSACTOR_URL=ws://transactor:3334;ws://localhost:3334
67+
- TRANSACTOR_URL=ws://transactor:3334;ws://host.docker.internal:3334
6868
- STORAGE_CONFIG=${STORAGE_CONFIG}
6969
- MODEL_ENABLED=*
7070
- ACCOUNTS_URL=http://account:3003
@@ -88,17 +88,19 @@ services:
8888
environment:
8989
- SERVER_PORT=8083
9090
- SERVER_SECRET=secret
91-
- ACCOUNTS_URL=http://localhost:3003
91+
- ACCOUNTS_URL=http://host.docker.internal:3003
9292
- MONGO_URL=mongodb://mongodb:27018
9393
- UPLOAD_URL=/files
9494
- ELASTIC_URL=http://elastic:9200
95-
- GMAIL_URL=http://localhost:8088
96-
- CALENDAR_URL=http://localhost:8095
95+
- GMAIL_URL=http://host.docker.internal:8088
96+
- CALENDAR_URL=http://host.docker.internal:8095
9797
- REKONI_URL=http://rekoni:4005
98-
- TELEGRAM_URL=http://localhost:8086
99-
- COLLABORATOR_URL=ws://localhost:3079
98+
- TELEGRAM_URL=http://host.docker.internal:8086
99+
- COLLABORATOR_URL=ws://host.docker.internal:3079
100100
- STORAGE_CONFIG=${STORAGE_CONFIG}
101-
- BRANDING_URL=http://localhost:8083/branding-test.json
101+
- BRANDING_URL=http://host.docker.internal:8083/branding-test.json
102+
- PRINT_URL=http://host.docker.internal:4005
103+
- SIGN_URL=http://host.docker.internal:4006
102104
transactor:
103105
image: hardcoreeng/transactor
104106
pull_policy: never
@@ -122,8 +124,8 @@ services:
122124
- METRICS_FILE=metrics.txt
123125
- STORAGE_CONFIG=${STORAGE_CONFIG}
124126
- REKONI_URL=http://rekoni:4005
125-
- FRONT_URL=http://localhost:8083
126-
- UPLOAD_URL=http://localhost:8083/files
127+
- FRONT_URL=http://host.docker.internal:8083
128+
- UPLOAD_URL=http://host.docker.internal:8083/files
127129
- ACCOUNTS_URL=http://account:3003
128130
- LAST_NAME_FIRST=true
129131
- ELASTIC_INDEX_NAME=local_storage_index
@@ -147,11 +149,42 @@ services:
147149
rekoni:
148150
image: hardcoreeng/rekoni-service
149151
restart: on-failure
152+
print:
153+
image: hardcoreeng/print
154+
restart: unless-stopped
150155
ports:
151-
- 4005:4004
156+
- 4005:4005
157+
environment:
158+
- SECRET=secret
159+
- MONGO_URL=${MONGO_URL}
160+
- MONGO_OPTIONS={"appName":"print","maxPoolSize":1}
161+
- STORAGE_CONFIG=${STORAGE_CONFIG}
162+
deploy:
163+
resources:
164+
limits:
165+
memory: 300M
166+
sign:
167+
image: hardcoreeng/sign
168+
restart: unless-stopped
169+
ports:
170+
- 4006:4006
171+
volumes:
172+
- ../services/sign/pod-sign/debug/certificate.p12:/var/cfg/certificate.p12
173+
- ../services/sign/pod-sign/debug/branding.json:/var/cfg/branding.json
174+
environment:
175+
- SECRET=secret
176+
- MONGO_URL=${MONGO_URL}
177+
- MONGO_OPTIONS={"appName":"sign","maxPoolSize":1}
178+
- MINIO_ENDPOINT=minio
179+
- MINIO_ACCESS_KEY=minioadmin
180+
- ACCOUNTS_URL=http://host.docker.internal:3000
181+
- MINIO_SECRET_KEY=minioadmin
182+
- CERTIFICATE_PATH=/var/cfg/certificate.p12
183+
- SERVICE_ID=sign-service
184+
- BRANDING_PATH=/var/cfg/branding.json
152185
deploy:
153186
resources:
154187
limits:
155-
memory: 1024M
188+
memory: 300M
156189
volumes:
157190
files:

Diff for: qms-tests/sanity/.env

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
PLATFORM_URI='http://localhost:8083'
2-
PLATFORM_TRANSACTOR='ws://localhost:3334'
1+
PLATFORM_URI='http://host.docker.internal:8083'
2+
PLATFORM_TRANSACTOR='ws://host.docker.internal:3334'
33
PLATFORM_USER='user1'
44
PLATFORM_USER_SECOND='user2'
55
REGULAR_USER='user3'

Diff for: qms-tests/sanity/package.json

+4-4
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
"format": "format tests",
2020
"ci": "playwright install --with-deps chromium",
2121
"test": "",
22-
"uitest": "cross-env LOCAL_URL=http://localhost:3003/ DEV_URL= playwright test -c ./tests/playwright.config.ts",
22+
"uitest": "cross-env LOCAL_URL=http://host.docker.internal:3003/ DEV_URL= playwright test -c ./tests/playwright.config.ts",
2323
"staging-uitest": "cross-env PLATFORM_URI=https://front.hc.engineering/ playwright test -c ./tests/playwright.config.ts --grep @staging",
24-
"dev-uitest": "cross-env PLATFORM_URI=http://localhost:8080 PLATFORM_TRANSACTOR=ws://localhost:3333 SETTING=storage-dev.json SETTING_SECOND=storageSecond-dev.json DEV_URL=http://localhost:8080/account playwright test -c ./tests/playwright.config.ts",
24+
"dev-uitest": "cross-env PLATFORM_URI=http://localhost:8080 PLATFORM_TRANSACTOR=ws://host.docker.internal:3333 SETTING=storage-dev.json SETTING_SECOND=storageSecond-dev.json DEV_URL=http://localhost:8080/account playwright test -c ./tests/playwright.config.ts",
2525
"debug": "playwright test -c ./tests/playwright.config.ts --debug --headed",
26-
"dev-debug": "cross-env PLATFORM_URI=http://localhost:8080 PLATFORM_TRANSACTOR=ws://localhost:3333 SETTING=storage-dev.json SETTING_SECOND=storageSecond-dev.json playwright test -c ./tests/playwright.config.ts --debug --headed",
27-
"codegen": "playwright codegen --load-storage storage.json http://localhost:8083/workbench/sanity-ws/",
26+
"dev-debug": "cross-env PLATFORM_URI=http://localhost:8080 PLATFORM_TRANSACTOR=ws://host.docker.internal:3333 SETTING=storage-dev.json SETTING_SECOND=storageSecond-dev.json playwright test -c ./tests/playwright.config.ts --debug --headed",
27+
"codegen": "playwright codegen --load-storage storage.json http://host.docker.internal:8083/workbench/sanity-ws/",
2828
"dev-codegen": "cross-env playwright codegen --load-storage storage-dev.json http://localhost:8080/workbench/sanity-ws/",
2929
"allure:generate": "allure generate allure-results -o allure-report --clean"
3030
},

Diff for: qms-tests/sanity/storage.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cookies": [],
33
"origins": [
44
{
5-
"origin": "http://localhost:8083",
5+
"origin": "http://host.docker.internal:8083",
66
"localStorage": [
77
{
88
"name": "login:metadata:LoginEmail",
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"name": "login:metadata:LoginEndpoint",
17-
"value": "ws://localhost:3334"
17+
"value": "ws://host.docker.internal:3334"
1818
},
1919
{
2020
"name": "#platform.notification.logging",

Diff for: qms-tests/sanity/storageQaraManager.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cookies": [],
33
"origins": [
44
{
5-
"origin": "http://localhost:8083",
5+
"origin": "http://host.docker.internal:8083",
66
"localStorage": [
77
{
88
"name": "login:metadata:LoginEmail",
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"name": "login:metadata:LoginEndpoint",
17-
"value": "ws://localhost:3334"
17+
"value": "ws://host.docker.internal:3334"
1818
},
1919
{
2020
"name": "#platform.notification.logging",

Diff for: qms-tests/sanity/storageSecond.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cookies": [],
33
"origins": [
44
{
5-
"origin": "http://localhost:8083",
5+
"origin": "http://host.docker.internal:8083",
66
"localStorage": [
77
{
88
"name": "login:metadata:LoginEmail",
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"name": "login:metadata:LoginEndpoint",
17-
"value": "ws://localhost:3334"
17+
"value": "ws://host.docker.internal:3334"
1818
},
1919
{
2020
"name": "#platform.notification.logging",

Diff for: qms-tests/sanity/storageThird.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cookies": [],
33
"origins": [
44
{
5-
"origin": "http://localhost:8083",
5+
"origin": "http://host.docker.internal:8083",
66
"localStorage": [
77
{
88
"name": "login:metadata:LoginEmail",
@@ -14,7 +14,7 @@
1414
},
1515
{
1616
"name": "login:metadata:LoginEndpoint",
17-
"value": "ws://localhost:3334"
17+
"value": "ws://host.docker.internal:3334"
1818
},
1919
{
2020
"name": "#platform.notification.logging",

0 commit comments

Comments
 (0)