Rename all .env.example to .env and provide your passwords before running the start app command. If you specify ci environment copy the .env files to a server space. MYSQL_ROOT_PASSWORD, MYSQL_DATABASE, MYSQL_USER and MYSQL_PASSWORD are not predefined and can be freely chosen by the user. SECRET_KEY should be genereted by Django.
Generate self-signed certificates with mkcert for local environment and Let's Encrypt certificates for production environment.
Set up a local DNS like Dnsmasq (Mac OS) for local environment in order to direct traffic from test domain to localhost.
https://passingcuriosity.com/2013/dnsmasq-dev-osx/
Go to frontend and backend project folders.
docker build --target dev-stage -t alonimacaroni/vote-frontend:dev .
docker build --target dev-stage -t alonimacaroni/vote-backend:dev .docker build --target prod-stage -t alonimacaroni/vote-frontend:prod .
docker build --target prod-stage -t alonimacaroni/vote-backend:prod .Set LOC parameter equal to dev (default), ci or prod.
For dev and prod:
LOC=dev ./devops.sh setupLOC=dev ./devops.sh startLOC=dev ./devops.sh exitLOC=ci ./devops.sh waitLOC=dev ./devops.sh migrateLOC=dev ./devops.sh testLOC=dev ./devops.sh clean