Skip to content

Commit

Permalink
Use installer target as the other steps are useful
Browse files Browse the repository at this point in the history
  • Loading branch information
minottic committed Oct 31, 2023
1 parent 720bccc commit c75fc8c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 5 additions & 5 deletions dev/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand All @@ -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`

```
Expand Down
4 changes: 1 addition & 3 deletions dev/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down

0 comments on commit c75fc8c

Please sign in to comment.