- Docker:
brew install --cask docker
- Make sure your terminal is in the root directory of your project.
- Copy
.env-template
to.env
.cp .env-template .env
- Modify the variables in
.env
to your requirements.
- Generate Docker Secrets files for
DB_USERNAME
,DB_PASSWORD
,BACKEND_SESSION_KEY_1
, andNGINX_STAGING_AUTH
.echo "username" > ./src/docker/secrets/DB_USERNAME
echo "password" > ./src/docker/secrets/DB_PASSWORD
yarn run secure-session-gen-key > ./src/docker/secrets/BACKEND_SESSION_KEY_1
htpasswd -c ./src/docker/secrets/NGINX_STAGING_AUTH username
- then enter and confirm a password
- Run
yarn nx build backend
andyarn nx build frontend
to generate initial builds. - Generate a self-signed SSL certificate for local development.
- If you would like to edit the local domain to be something other than
localhost
, edit./src/docker/nginx/dev-certs/dev-domains.ext
and changeDNS.1
, etc. yarn docker:dev-cert
- Add the certificate (saved to
./src/docker/nginx/dev-certs/fullchain.pem
) to your trusted certificates.
- If you would like to edit the local domain to be something other than
- Run
yarn docker:dev
,yarn nx serve backend
, andyarn nx serve frontend
nx
will automatically updatefrontend
andbackend
on saved file changes- The backend will be available at https://localhost:3001/v1/, proxied through
nginx
with changes reflected on refresh - The frontend will be separately available at http://localhost:3001/, with live changes on save