Enable developping the frontend code interactively with ng serve

This commit is contained in:
nobohan 2021-08-23 12:39:26 +02:00
parent 3c11212676
commit 6d0cf3e27a
3 changed files with 12 additions and 1 deletions

View File

@ -101,7 +101,16 @@ Redirige de 8080 vers autres services :
- 5002 (citizen-back)
- 5000 (taxon)
## Development
### Front-end development
In order to interactively edit the js code, the frontend folder is mounted into the frontend container. To interactively develop the frontend code and watch the results, enter the running frontend container and launch `ng serve` with the following arguments (see <http://imaginativethinking.ca/heck-get-connection-reset-peer-containerizing-angular-4-application/> for why the host argument is required):
```bash
docker-compose exec citizen-front bash
root@9c0fea7720a0:/home/appuser/citizen/frontend# npm run ng serve -- --host 0.0.0.0 --port 4200 --configuration=fr --poll 2000
```
## Deploiement sur un serveur distant

View File

@ -15,6 +15,7 @@ services:
context: .
image: registry.gitlab.com/champs-libres/geonature-citizen/front
volumes:
- ./vendor/GeoNature-citizen/frontend:/home/appuser/citizen/frontend
- ./patches/settings.ini:/home/appuser/citizen/config/settings.ini
- ./patches/frontend/src/conf:/home/appuser/citizen/frontend/src/conf
- ./patches/frontend/src/assets:/home/appuser/citizen/frontend/src/assets
@ -25,6 +26,7 @@ services:
- ./node_modules:/home/appuser/citizen/frontend/node_modules
ports:
- "4000:4000"
- "4200:4200"
command: npm run serve:ssr
environment:
# avoid goodle analytics question

@ -1 +1 @@
Subproject commit 9eddf3c80bab441249b112d0ec5fb17798b47610
Subproject commit 8834fd1698edfab482d913957ef9079b7629887f