Dockerizing frappe for production
Prerequisites
-
Install Docker.
git@github.com:shridarpatil/frappe-docker.git
cd frappe-docker
docker pull shridh0r/frappe:\<tagname\>
Update the same tag in docker compose file
docker exec -it <app-container-name> /bin/sh
bench reinstall
bench build
Docker compose build by default pull's frappe master branch
docker-compose build
- FRAPPE_PATH - Frappe repo path
- FRAPPE_BRANCH - Branch name
- FRAPPE_PYTHON - Python version
- FRAPPE - Folde name
- BENCH_BRANCH - Bench repo path
- BENCH_PATH - Branch name
Set frappe-path/branch dynamically by passing build-arg
docker-compose build --build-arg FRAPPE_PATH=https://github.com/zerodhatech/frappe.git --build-arg FRAPPE_BRANCH=zero_v12
docker-compose up
Exec into docker container and create new site
Create new-site
bench new-site site1.local --force --db-type postgres --db-root-username postgres --db-root-password root