@@ -6,106 +6,87 @@ services:
66 options :
77 max-size : " 10m"
88 max-file : " 3"
9- build :
10- context : ../
11- dockerfile : apps/portal-front/Dockerfile
12- cache_from :
13- - type=registry,ref=filigran/portal-front:cache-${IMAGE_TAGS}
14- - type=registry,ref=filigran/portal-front:main
15- - type=registry,ref=filigran/portal-front:development
16- depends_on :
17- portal-api :
18- condition : service_healthy
9+ image : filigran/portal-front:${IMAGE_TAGS}
10+ extra_hosts :
11+ - " host.docker.internal:host-gateway"
1912 healthcheck :
20- test : ["CMD", "wget", "-qO-", "http://portal-front:3000 /health"]
13+ test : ["CMD", "wget", "-qO-", "http://localhost:3002 /health"]
2114 interval : 10s
2215 timeout : 5s
2316 retries : 10
24- environment :
25- - SERVER_HTTP_API=http://portal-api:4001
26-
27- portal-front-test :
28- container_name : portal-front-test
29- logging :
30- driver : " json-file"
31- options :
32- max-size : " 10m"
33- max-file : " 3"
34- build :
35- context : ../
36- dockerfile : apps/portal-front/test.Dockerfile
37- cache_from :
38- - type=registry,ref=filigran/portal-front:cache-${IMAGE_TAGS}
39- - type=registry,ref=filigran/portal-front:main
40- - type=registry,ref=filigran/portal-front:development
41- environment :
42- - SERVER_HTTP_API=http://portal-api:4001
43- volumes :
44- - " ./coverage:/app/apps/portal-front/coverage"
45- portal-api-test :
46- container_name : portal-api-test
47- logging :
48- driver : " json-file"
49- options :
50- max-size : " 10m"
51- max-file : " 3"
52- build :
53- context : ../
54- dockerfile : apps/portal-api/test.Dockerfile
55- cache_from :
56- - type=registry,ref=filigran/portal-api:cache-${IMAGE_TAGS}
57- - type=registry,ref=filigran/portal-api:main
58- - type=registry,ref=filigran/portal-api:development
5917 depends_on :
60- portal-postgres :
61- condition : service_healthy
62- portal-minio :
18+ portal-api :
6319 condition : service_healthy
6420 environment :
65- - DATABASE_HOST=portal-postgres
66- - DATABASE_PORT=5432
67- - DATABASE_USER=portal
68- - DATABASE_BASE=postgres
69- - DATABASE_PASSWORD=portal-password
70- 71- - ADMIN_PASSWORD=admin
72- - NODE_ENV=development
73- - MINIO_BUCKET_NAME=xtmhubbucket
74- - MINIO_ENDPOINT=portal-minio
75- - MINIO_PORT=9000
76- - MINIO_ACCESS_KEY=minio
77- - MINIO_SECRET_KEY=password
78- - MINIO_USE_SSL=false
79- volumes :
80- - " ./coverage:/app/apps/portal-api/coverage"
21+ - PORT=3002
22+ - SERVER_HTTP_API=http://localhost:4002
23+ #
24+ # portal-front-test:
25+ # container_name: portal-front-test
26+ # logging:
27+ # driver: "json-file"
28+ # options:
29+ # max-size: "10m"
30+ # max-file: "3"
31+ # build:
32+ # context: ../
33+ # dockerfile: apps/portal-front/test.Dockerfile
34+ # cache_from:
35+ # - type=registry,ref=filigran/portal-front:cache-${IMAGE_TAGS}
36+ # - type=registry,ref=filigran/portal-front:main
37+ # - type=registry,ref=filigran/portal-front:development
38+ # environment:
39+ # - SERVER_HTTP_API=http://portal-api:4001
40+ # volumes:
41+ # - "./coverage:/app/apps/portal-front/coverage"
42+ # portal-api-test:
43+ # container_name: portal-api-test
44+ # logging:
45+ # driver: "json-file"
46+ # options:
47+ # max-size: "10m"
48+ # max-file: "3"
49+ # build:
50+ # context: ../
51+ # dockerfile: apps/portal-api/test.Dockerfile
52+ # cache_from:
53+ # - type=registry,ref=filigran/portal-api:cache-${IMAGE_TAGS}
54+ # - type=registry,ref=filigran/portal-api:main
55+ # - type=registry,ref=filigran/portal-api:development
56+ # environment:
57+ # - DATABASE_HOST=postgres
58+ # - DATABASE_PORT=5432
59+ # - DATABASE_USER=portal
60+ # - DATABASE_BASE=postgres
61+ # - DATABASE_PASSWORD=portal-password
62+ 63+ # - ADMIN_PASSWORD=admin
64+ # - NODE_ENV=development
65+ # - MINIO_BUCKET_NAME=xtmhubbucket
66+ # - MINIO_ENDPOINT=minio
67+ # - MINIO_PORT=9000
68+ # - MINIO_ACCESS_KEY=minio
69+ # - MINIO_SECRET_KEY=password
70+ # - MINIO_USE_SSL=false
71+ # volumes:
72+ # - "./coverage:/app/apps/portal-api/coverage"
8173 portal-api :
8274 container_name : portal-api
8375 logging :
8476 driver : " json-file"
8577 options :
8678 max-size : " 10m"
8779 max-file : " 3"
88- build :
89- context : ../
90- dockerfile : apps/portal-api/Dockerfile
91- cache_from :
92- - type=registry,ref=filigran/portal-api:cache-${IMAGE_TAGS}
93- - type=registry,ref=filigran/portal-api:main
94- - type=registry,ref=filigran/portal-api:development
80+ image : filigran/portal-api:${IMAGE_TAGS}
81+ network_mode : " host"
9582 healthcheck :
96- test : ["CMD", "wget", "-qO-", "http://portal-api:4001 /health"]
83+ test : ["CMD", "wget", "-qO-", "http://localhost:4002 /health"]
9784 interval : 10s
9885 timeout : 5s
9986 retries : 10
100- depends_on :
101- portal-postgres :
102- condition : service_healthy
103- portal-minio :
104- condition : service_healthy
105- portal-elasticsearch :
106- condition : service_healthy
10787 environment :
108- - DATABASE_HOST=portal-postgres
88+ - PORT=4002
89+ - DATABASE_HOST=localhost
10990 - DATABASE_PORT=5432
11091 - DATABASE_USER=portal
11192 - DATABASE_BASE=test_database
@@ -114,56 +95,17 @@ services:
11495 - ADMIN_PASSWORD=admin
11596 - DATA_SEEDING=true
11697 - MINIO_BUCKET_NAME=xtmhubbucket
117- - MINIO_ENDPOINT=portal- minio
98+ - MINIO_ENDPOINT=minio
11899 - MINIO_PORT=9000
119100 - MINIO_ACCESS_KEY=portal
120101 - MINIO_SECRET_KEY=changeme
121102 - MINIO_USE_SSL=false
122103 - NODE_ENV=development
123104 - VITEST_MODE=true
124105 - START_DEV_SERVER=true
125- - ELASTIC_HOST=portal-elasticsearch
106+ - ELASTIC_HOST=localhost
126107 - ELASTIC_PORT=9200
127- - BASE_URL_FRONT=http://portal-front:3000
128-
129- portal-postgres :
130- container_name : portal-postgres
131- logging :
132- driver : " json-file"
133- options :
134- max-size : " 10m"
135- max-file : " 3"
136- image : postgres:17.2
137- environment :
138- - POSTGRES_USER=portal
139- - POSTGRES_PASSWORD=portal-password
140- - POSTGRES_DB=test_database
141- - PGDATA=/data/postgres
142- healthcheck :
143- test : ["CMD-SHELL", "pg_isready", "-d", "test_database"]
144- interval : 10s
145- timeout : 5s
146- retries : 10
147-
148- portal-elasticsearch :
149- image : docker.elastic.co/elasticsearch/elasticsearch:8.18.3
150- container_name : portal-elasticsearch
151- logging :
152- driver : " json-file"
153- options :
154- max-size : " 10m"
155- max-file : " 3"
156- environment :
157- - discovery.type=single-node
158- - xpack.ml.enabled=false
159- - xpack.security.enabled=false
160- - " ES_JAVA_OPTS=-Xms256m -Xmx256m"
161- healthcheck :
162- test : [ "CMD-SHELL", "curl --silent --fail localhost:9200/_cluster/health?wait_for_status=yellow&timeout=5s || exit 1" ]
163- interval : 10s
164- timeout : 5s
165- retries : 10
166-
108+ - BASE_URL_FRONT=http://portal-front:3002
167109
168110 portal-minio :
169111 container_name : portal-minio
@@ -189,25 +131,18 @@ services:
189131 options :
190132 max-size : " 10m"
191133 max-file : " 3"
192- build :
193- context : ../
194- dockerfile : apps/portal-e2e-tests/Dockerfile
195- cache_from :
196- - type=registry,ref=filigran/portal-e2e-tests:cache-${IMAGE_TAGS}
197- - type=registry,ref=filigran/portal-e2e-tests:main
198- - type=registry,ref=filigran/portal-e2e-tests:development
134+ image : filigran/portal-e2e-tests:${IMAGE_TAGS}
135+ network_mode : " host"
199136 depends_on :
200137 portal-front :
201138 condition : service_healthy
202139 portal-api :
203140 condition : service_healthy
204- portal-minio :
205- condition : service_healthy
206141 environment :
207- - E2E_BASE_URL=http://portal-front:3000
208- - E2E_API_URL=http://portal-api:4001
142+ - E2E_BASE_URL=http://portal-front:3002
143+ - E2E_API_URL=http://portal-api:4002
209144 - POSTGRES_USER=portal
210- - DATABASE_HOST=portal-postgres
145+ - DATABASE_HOST=localhost
211146 - POSTGRES_DB=test_database
212147 - POSTGRES_PASSWORD=portal-password
213148 - DATABASE_PORT=5432
0 commit comments