- Make sure you have NodeJS and NPM installed
- Make sure you have Docker and docker-compose installed
- Copy the content
.env.example
file to.env
and change its values accordingly - On your terminal run
docker-compose up
. - To run migration, open another terminal and run
docker exec -it <container_name> sh
- Then run
poetry run masak2/manage.py migrate
- Install all front end deps by running
npm install
- To start transpiling all
JSX
andCSS
runnpm run start
- While the backend docker container is running, run ``docker exec -it <container_name> sh` on a separate terminae
- Then, type in
poetry run pytest ./masak2 --cov-report html --cov=masak2
npm run test
django-admin startapps <APP_NAME>
- Build frontend
npm run build
- Collect static
docker-compose up
docker exec -it <container_name> sh
poetry run masak2/manage.py collectstatic --settings config.settings.prod
- Build docker container
docker build -t docker.pkg.github.com/syafiqtermizi/masak2/masak2:latest -f docker/prod.Dockerfile .
-
Push docker container to registry
- Make sure you are logged in to github (password is your PAT https://github.com/settings/tokens)
docker login https://docker.pkg.github.com -u syafiqtermizi
- Push the image
docker push docker.pkg.github.com/syafiqtermizi/masak2/masak2:latest