Fix local cypress running

This commit is contained in:
antoine-de
2023-09-18 15:19:00 +02:00
committed by Andreani Jean
parent f37dc950cb
commit 482372fccb
2 changed files with 18 additions and 7 deletions

View File

@@ -4,7 +4,7 @@ services:
command: api
restart: always
ports:
- 5123:5000
- 5000:5000
depends_on:
db:
condition: service_healthy
@@ -17,15 +17,16 @@ services:
API_FORCE_AUTH_ON_UPLOAD: 'true'
OAUTH_CLIENT_ID: geovisio
OAUTH_CLIENT_SECRET: what_a_secret
OAUTH_OIDC_URL: http://keycloak.localtest.me:8183/realms/geovisio
OAUTH_OIDC_URL: http://localhost:8183/realms/geovisio
OAUTH_PROVIDER: oidc
FLASK_SECRET_KEY: a_very_secret_key_never_to_be_used_in_production
FLASK_SESSION_COOKIE_DOMAIN: localtest.me
healthcheck:
test: python -c "import requests; requests.get('http://localhost:5000/api').raise_for_status()"
interval: 5s
timeout: 5s
retries: 10
extra_hosts:
- 'localhost:host-gateway'
networks:
keycloak: {}
@@ -51,11 +52,11 @@ services:
auth:
command: start-dev --import-realm
environment:
GEOVISIO_BASE_URL: http://api.geovisio.localtest.me:5123
GEOVISIO_BASE_URL: http://localhost:5000
GEOVISIO_CLIENT_SECRET: what_a_secret
KEYCLOAK_ADMIN: admin
KEYCLOAK_ADMIN_PASSWORD: password
KEYCLOAK_FRONTEND_URL: http://api:5000/api/auth/login
KEYCLOAK_FRONTEND_URL: http://localhost:5000/api/auth/login
KC_HTTP_PORT: 8183
ports:
- '8183:8183'

View File

@@ -11,7 +11,7 @@ services:
&& yarn start"
environment:
PORT: 5173
VITE_API_URL: http://api.geovisio.localtest.me:5000
VITE_API_URL: http://api.localtest.me:5000
VITE_ENV: dev
depends_on:
api:
@@ -39,7 +39,7 @@ services:
working_dir: /src
environment:
- CYPRESS_baseUrl=http://front.localtest.me:5173/
- CYPRESS_api_url=http://api.geovisio.localtest.me:5000/
- CYPRESS_api_url=http://api.localtest.me:5000/
command: sleep 2 && yarn add --dev cypress && ./node_modules/.bin/cypress install && yarn test:e2e
depends_on:
web:
@@ -49,5 +49,15 @@ services:
geovisio: {}
web: {}
api:
environment:
OAUTH_OIDC_URL: http://keycloak.localtest.me:8183/realms/geovisio
FLASK_SESSION_COOKIE_DOMAIN: localtest.me
auth:
environment:
GEOVISIO_BASE_URL: http://api.localtest.me:5000
KEYCLOAK_FRONTEND_URL: http://api.localtest.me:5000/api/auth/login
networks:
web: {}