diff --git a/dev/README.md b/dev/README.md index 6be8313..20f20ee 100644 --- a/dev/README.md +++ b/dev/README.md @@ -70,14 +70,14 @@ The `docker-compose.yaml` file is constructed to prepare containers with all dep ```bash cd /home/node/app -node . +npm start ``` ### Backend-next `be_next` ```bash cd /home/node/app -node dist/main +npm start ``` ### Frontend `fe` @@ -86,11 +86,11 @@ The frontend uses a custom Dockerfile with the following modifications: ```bash cd /frontend -npm run serve -- --host 0.0.0.0 --disable-host-check +npm start -- --host 0.0.0.0 ``` -A custom Dockerfile is used because the production image builds the static site and then serves it via nginx. The development image serves the site using `ng serve` (webpack-dev-server) so it reflects the latest code and updates when files change. -` +A custom Dockerfile is used because the production image uses the node alpine base image which does not crosscompile on macOS. + ### Search `search` ``` diff --git a/dev/docker-compose.yaml b/dev/docker-compose.yaml index 99f8649..8691006 100644 --- a/dev/docker-compose.yaml +++ b/dev/docker-compose.yaml @@ -63,6 +63,7 @@ services: build: context: ../frontend/. dockerfile: ../dev/config/frontend/Dockerfile + target: installer volumes: - ../frontend:/frontend - ./config/frontend/config.json:/frontend/src/assets/config.json @@ -71,10 +72,7 @@ services: # browser required for test suite; move to installer layer command: /bin/sh -c "while true; do sleep 600; done" ports: - # Dev image with `node start` uses port 4200 - # For the upstream dockerfile with nginx, use 4200:80 - 4200:4200 - profiles: - fe