Project in NodeJs, MongoDB, Express and React. It is the app for business that helps organizing sport competition.
First of all you need to install
docker composeandgcloud.
gcloud auth login
gcloud config set project my-project-1550874636271
gcloud compute ssh instance-warsaw-chessbox --zone europe-central2-c
gcloud auth configure-docker europe-north1-docker.pkg.dev
docker login europe-north1-docker.pkg.devexport DENV=dev # or prodYou need to set the
DENVvariable every time you want to work with docker
docker compose pulldocker compose up -dexport MODE=ssl
export JWT_SECRET_KEY="..."
export MONGO_URI="..."
export PROJECT_PORT=80
export PROJECT_SSL_PORT=443
export SMTP_USER_MAIL="..."
export SMTP_SERVICE_PASSKEY="..."
docker compose builddocker compose pushTo start the project with ssl you need to rebuild gateway service and add ssl certificate on virtual machine locally
To start the project in ssl mode you need to set MODE variable and follow instructions in the Run the Project in docker section.
export MODE=sslRestart gateway
docker compose exec gateway nginx -s reloadConvert keys: cat certificate.crt ca_bundle.crt > fullchain.pem cp private.key privkey.pem