Skip to content

Commit

Permalink
[WIP]: feat(mode-dev-docker): add a mode dev for geonature-frontend
Browse files Browse the repository at this point in the history
Add a `docker-compose.dev.yml` file that may be used for dev mode.

Launch the stack with the following command:
`docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d`

[WIP]:
- Fix Traefik routing rules for dev mode
  • Loading branch information
VincentCauchois committed Apr 24, 2024
1 parent b5eb241 commit fe2445c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
services:
geonature-frontend:
build:
context: .
dockerfile: build/Dockerfile-geonature-frontend
target: source-extra
args:
GEONATURE_FRONTEND_IMAGE: ghcr.io/pnx-si/geonature-frontend:latest
working_dir: /build/src/app
command: npm run start -- --host 0.0.0.0
expose:
- 4200
volumes:
- ./sources/GeoNature/frontend/src:/build/src
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ services:
- API_ENDPOINT="${GEONATURE_BACKEND_PROTOCOL}://${GEONATURE_BACKEND_HOSTPORT}${GEONATURE_BACKEND_PREFIX}"
labels:
- "traefik.enable=true"
- "traefik.http.routers.geonature.rule=Host(`${GEONATURE_FRONTEND_HOST}`) && PathPrefix(`${GEONATURE_FRONTEND_PREFIX}`)"
- "traefik.http.routers.geonature.rule=Host(`${GEONATURE_FRONTEND_HOST}`) && ( PathPrefix(`${GEONATURE_FRONTEND_PREFIX}`) || PathPrefix(`/{file:[^/]+\\.[^/]+}`) || PathPrefix(`/assets/config.json`))"
- "traefik.http.routers.geonature.entrypoints=websecure"
- "traefik.http.routers.geonature.tls.certResolver=acme-resolver"

Expand Down

0 comments on commit fe2445c

Please sign in to comment.