a9b6b755ce
* Rename `bench-build` target to `bench` in bake file * Update bake file and break everything * Rename docker-compose.yml to compose.yml to avoid conflicting on `docker buildx bake` * Fix groups in bake file * Update frappe-worker * Update frappe-nginx, erpnext-nginx * Remove old erpnext images * Update frappe-socketio * Fix develop frappe-nginx build on linux/arm64 * Update dockerignore * Update gitignore * Update gitignore * Update .env files * Update installation (overrides) * Update tests * Fix image names * Update compose * Update get-latest-tags * Update CI * Setup and remove .env on tests * Add build bench workflow * Add triggers to main workflow * Add release helm job * Use reusable workflows * Rollback * Print configuration before running tests * Show tests/.env * Revert "Show tests/.env" This reverts commit |
||
---|---|---|
.. | ||
backend.Dockerfile | ||
compose.override.yaml | ||
docker-bake.hcl | ||
frontend.Dockerfile | ||
README.md |
This is basic configuration for building images and testing custom apps that use Frappe.
You can see that there's four files in this folder:
backend.Dockerfile
,frontend.Dockerfile
,docker-bake.hcl
,compose.override.yaml
.
Python code will backend.Dockerfile
. JS and CSS (and other fancy frontend stuff) files will be built in frontend.Dockerfile
if required and served from there.
docker-bake.hcl
is reference file for cool new Buildx Bake. It helps to build images without having to remember all build arguments.
compose.override.yaml
is Compose override that replaces images from main compose file so it would use your own images.
To get started, install Docker and Buildx. Then copy all content of this folder (except this README) to your app's root directory. Also copy compose.yaml
in the root of this repository.
Before the next step—to build images—replace "custom_app" with your app's name in docker-bake.hcl
. After that, let's try to build:
FRAPPE_VERSION=<Frappe version you need> docker buildx bake
If something goes wrong feel free to leave an issue.
To test if site works, setup .env
file (check example) and run:
docker-compose up -d
docker-compose exec backend \
bench new-site 127.0.0.1 \
--mariadb-root-password 123 \
--admin-password admin \
--install-app <Name of your app>
docker-compose restart backend
Cool! You just containerized your app!