Change docker conf for cypress

This commit is contained in:
antoine-de
2023-09-12 13:49:57 +02:00
committed by Andreani Jean
parent 02ba0efe8d
commit f37dc950cb
2 changed files with 21 additions and 10 deletions

View File

@@ -1,5 +1,5 @@
services:
geovisio-api:
api:
image: geovisio/api:develop
command: api
restart: always
@@ -55,7 +55,7 @@ services:
GEOVISIO_CLIENT_SECRET: what_a_secret
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
KEYCLOAK_FRONTEND_URL: http://geovisio-api:5000/api/auth/login
KEYCLOAK_FRONTEND_URL: http://api:5000/api/auth/login
KC_HTTP_PORT: 8183
ports:
- '8183:8183'

View File

@@ -6,33 +6,44 @@ services:
- $PROJECT_DIR:/src
working_dir: /src
command: >
sh -c "yarn install
&& echo "VITE_API_URL=http://api.geovisio.localtest.me:5123" > .env
&& echo "VITE_ENV=dev" >> .env
sh -c "apk add --update --no-cache curl
&& yarn install
&& yarn start"
environment:
PORT: 5173
VITE_API_URL: http://api.geovisio.localtest.me:5000
VITE_ENV: dev
depends_on:
geovisio-api:
api:
condition: service_healthy
auth:
condition: service_healthy
ports:
- 5173:5173
healthcheck:
test: curl --fail http://localhost:5173
timeout: 10s
interval: 1s
retries: 20
start_period: 1s
networks:
keycloak: {}
geovisio: {}
web: {}
web:
aliases:
- front.localtest.me
e2e:
image: cypress/included:cypress-12.17.3-node-18.16.1-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
volumes:
- $PROJECT_DIR:/src
working_dir: /src
environment:
- CYPRESS_baseUrl=http://web:5173
- CYPRESS_api_url=http://api.geovisio.localtest.me:5123
- CYPRESS_baseUrl=http://front.localtest.me:5173/
- CYPRESS_api_url=http://api.geovisio.localtest.me:5000/
command: sleep 2 && yarn add --dev cypress && ./node_modules/.bin/cypress install && yarn test:e2e
depends_on:
web:
condition: service_started
condition: service_healthy
networks:
keycloak: {}
geovisio: {}