Enable developping the frontend code interactively with ng serve
This commit is contained in:
@@ -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
|
||||
|
||||
|
@@ -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
|
||||
|
2
vendor/GeoNature-citizen
vendored
2
vendor/GeoNature-citizen
vendored
Submodule vendor/GeoNature-citizen updated: 9eddf3c80b...8834fd1698
Reference in New Issue
Block a user