1.7 KiB
1.7 KiB
how to use docker development?
How to setup?
- have docker installed
- create a
config.env
in/.docker/development
. inspire its contents fromexample.config.env
how to run?
- while in directory
/.docker/development
rundocker compose up -d
1.1 if running first time in docker, make sure you have no node_modules folder present in/
.
not working? try this:
- while in directory
/.docker/development
rundocker compose down -v
- remove
node_modules
directory in/
if it exists - remove
.env
andconfig.json
file in/
if any of them exist - while in directory
/.docker/development
rundocker compose up -d --build
how to stop?
- while in directory
/.docker/development
rundocker compose down
NOTE: if you want also delete all saved data for a full reset, run
docker compose down -v
instead
how do I access the terminal for the backend service?
make sure the docker services are running, then run docker attach mw_backend-1
.
this will appear to show nothing at first, but all new logs will show up,
and anything you type in the terminal now affect the backend service.
Warning: doing CTRL+C will shut down the backend service, it will not kick your terminal back to its original shell.
how do I read logs?
- while in directory
/.docker/development
rundocker compose ps
- note the name of the service you want to see the logs of
- while in directory
/.docker/development
rundocker compose logs <NAME>
. fill in the name of the service without the brackets.
Exposed ports
- http://localhost:8081 - backend API
- http://localhost:8082 - postgres web UI
- postgres://localhost:5432 - postgres