Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: easy-install.py to build custom images #1592

Merged
merged 15 commits into from
Dec 3, 2024

Conversation

revant
Copy link
Collaborator

@revant revant commented Oct 27, 2024

Create apps.json file and use following commands to build and deploy custom apps.

python3 easy-install.py build --apps-json=/path/to/apps.json --tag custom-apps:latest
python3 easy-install.py -p -n actions_test --email [email protected] --image custom-apps --version latest

To Do:

  • Update README
  • Display passwords at the end of production setup

@revant
Copy link
Collaborator Author

revant commented Oct 27, 2024

For people who wish to test the build sub-command execute following with apps.json (erpnext, hrms, india_compliance, payments, webshop, wiki)

wget https://raw.githubusercontent.com/revant/bench/refs/heads/easy-build/easy-install.py

wget https://gitlab.com/castlecraft/cepl-erpnext-images/-/raw/main/apps.json

python3 easy-install.py build --apps-json=apps.json --tag custom-apps:latest

python3 easy-install.py -p -n actions_test --email [email protected] --image custom-apps --version latest

For command help

python3 easy-install.py build --help
usage: easy-install.py build [-h] [-p] [-r FRAPPE_PATH] [-b FRAPPE_BRANCH] [-j APPS_JSON] [-t TAGS] [-c CONTAINERFILE]
                             [-y PYTHON_VERSION] [-n NODE_VERSION]

options:
  -h, --help            show this help message and exit
  -p, --push            Push the built image to registry
  -r FRAPPE_PATH, --frappe-path FRAPPE_PATH
                        Frappe Repository to use, default: https://github.com/frappe/frappe
  -b FRAPPE_BRANCH, --frappe-branch FRAPPE_BRANCH
                        Frappe branch to use, default: version-15
  -j APPS_JSON, --apps-json APPS_JSON
                        Path to apps json, default: frappe_docker/development/apps-example.json
  -t TAGS, --tag TAGS   Full Image Name(s), default: custom-apps:latest
  -c CONTAINERFILE, --containerfile CONTAINERFILE
                        Path to Containerfile: images/layered/Containerfile
  -y PYTHON_VERSION, --python-version PYTHON_VERSION
                        Python Version, default: 3.11.6
  -n NODE_VERSION, --node-version NODE_VERSION
                        NodeJS Version, default: 18.18.2

@gavindsouza
Copy link
Collaborator

@revant is there a way to utilize FRAPPE_BRANCH to deploy the develop branch or specific commit SHAs?

From the current implementation, I see that FRAPPE_BRANCH really refers loosely (by convention) to releases that are "tags" on GitHub and DockerHub

@revant
Copy link
Collaborator Author

revant commented Oct 29, 2024

@revant is there a way to utilize FRAPPE_BRANCH to deploy the develop branch or specific commit SHAs?

It is used by bench init command. Internally it's git clone -b $FRAPPE_BRANCH

that means you can use tags or branch of git repo. For specific commit, you'll need to fork and create branch.

Copy link

sonarcloud bot commented Dec 3, 2024

@NagariaHussain NagariaHussain merged commit 1bf53b4 into frappe:develop Dec 3, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants