jaredpalmer / jaredpalmer/backpack
Live reload doesn't work inside docker
- Dominant language
- JavaScript
- Stars
- 4.4k
- Forks
- 164
- PR merge metrics
- No merged PRs in 30d
Description
Everything works well: after editing a file backpack reloads an app.
But if I run in under the docker, and source files in a mounted folder - it doesn't work.
How I can fix it?
```
api:
build: ./api
volumes:
- ./api:/usr/app/
- /usr/app/node_modules
environment:
- SERVER_PORT=4000
- SERVER_HOST=0.0.0.0
- NODE_ENV=development
- DB_PORT=27017
- DB_HOST=mongo
- WAIT_HOSTS=mongo:27017
ports:
- "4000:4000"
expose:
- "4000"
links:
- mongo
working_dir: /usr/app
command: sh -c "/wait && yarn dev"
```
Contributor guide
Research direction
The reported setup is the Docker service configuration for `api`; start by reproducing it with the shown bind mount and `yarn dev`. Inspect how Backpack watches source files in this environment. Done means edits in the mounted `./api` source reliably trigger reload while the service runs in Docker.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, javascript
- Domain
- devops, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100