Ensure DEVELOPMENT.md has been read, understood, and followed
Use the provided start.sh bash script
source ./start.sh --dockerThis will start the app in a docker container at http://localhost:3000 - the protocol, domain, and port can all be all be changed with environment variables.
A number of flags may be passed to the start script to trigger different behaviors.
The --docker or -d flag can be passed to have the script build and start the app in a docker container. This indicate thats this is a dockerized start.
source ./start.sh --dockerThe --build or -b flag can be passed to have the script rebuild the docker container. This will also indicate that this is a dockerized start; no need for the -d docker flag.
source ./start.sh --buildThe --prune or -p flag can be passed to have the script prune all unused containers, networks, and images (both dangling and unreferenced). This can be useful to free up disk space. Please note that cached images will be removed as well.
source ./start.sh --prune -dThe --no_auto_start or -n flag can be passed to have the script execute behaviors for any other flags but not start the app.
source ./start.sh --no_auto_start -dThe --reset_env or -r flag can be passed to have the script reset the environment variables from the .env file before the app is started.
source ./start.sh --reset_env -dReset environment variables, prune images, and rebuild the containers but do not start the app:
source ./start.sh -r -p -b -nReset environment variables and start the app dockerized:
source ./start.sh -r -dFor the docker container to connect to localhost on the host machine, use host.docker.internal.
To connect to the local dockerized PostgreSQL DB, ensure there is a .env file (.env.template can be used as a reference.) In the .env file, ensure the DB_HOST variable has localhost replaced with host.docker.internal.
DB_HOST="host.docker.internal"If you are running on a Linux operating system the default connection to the docker container host.docker.internal will not work. To connect to the local dockerized PostgreSQL DB, ensure there is a .env file (.env.template can be used as a reference.) In the .env file, ensure the DB_HOST variable has localhost replaced with 172.17.0.1.
DB_HOST="172.17.0.1"