diff --git a/README.md b/README.md index 52a7b953..b5589758 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,47 @@ [![Build Stable](https://github.com/frappe/frappe_docker/actions/workflows/build_stable.yml/badge.svg)](https://github.com/frappe/frappe_docker/actions/workflows/build_stable.yml) [![Build Develop](https://github.com/frappe/frappe_docker/actions/workflows/build_develop.yml/badge.svg)](https://github.com/frappe/frappe_docker/actions/workflows/build_develop.yml) -## Getting Started +Everything about [Frappe](https://github.com/frappe/frappe) and [ERPNext](https://github.com/frappe/erpnext) in containers. -### Setting up Pre-requisites +# Getting Started -This repository requires Docker, docker-compose and Git to be setup on the instance to be used. - -For Docker basics and best practices. Refer Docker [documentation](http://docs.docker.com). - -### Cloning the repository and preliminary steps - -Clone this repository somewhere in your system: +To get started, you need Docker, docker-compose and git setup on your machine. For Docker basics and best practices. Refer Docker [documentation](http://docs.docker.com). +After that, clone this repo: ```sh -git clone https://github.com/frappe/frappe_docker.git +git clone https://github.com/frappe/frappe_docker cd frappe_docker ``` -## Production Setup +# Development -It takes care of the following: +We have baseline for developing in VSCode devcontainer with [frappe/bench](https://github.com/frappe/bench). [Start development](development). -- Setting up the desired version of Frappe/ERPNext. -- Setting up all the system requirements: eg. MariaDB, Node, Redis. -- Configure networking for remote access and setting up LetsEncrypt. +# Production -It doesn't take care of the following: +We provide simple and intuitive production setup with prebuilt Frappe and ERPNext images and compose files. To learn more about those, follow the docs: -- Cron Job to backup sites is not created by default. -- Use `CronJob` on k8s or refer wiki for alternatives. +- [images](docs/images.md), +- [compose files](docs/compose-files.md). -1. Single Server Installs - 1. [Single bench](docs/single-bench.md). Easiest Install! - 2. [Multi bench](docs/multi-bench.md) -2. Multi Server Installs - 1. [Docker Swarm](docs/docker-swarm.md) - 2. [Kubernetes](https://helm.erpnext.com) -3. [Site Operations](docs/site-operations.md) -4. [Environment Variables](docs/environment-variables.md) -5. [Custom apps for production](docs/custom-apps-for-production.md) -6. [Tips for moving deployments](docs/tips-for-moving-deployments.md) -7. [Wiki for optional recipes](https://github.com/frappe/frappe_docker/wiki) +Also, there's docs to help with deployment: -## Development Setup +- [on single server](docs/single-server.md), +- in cluster: + - [Docker Swarm](docs/docker-swarm.md), + - [Kubernetes (frappe/helm)](https://helm.erpnext.com), +- [site operations](docs/site-operations.md). -It takes care of complete setup to develop with Frappe/ERPNext and Bench, Including the following features: +# Custom app -- VSCode containers integration -- VSCode Python debugger -- Pre-configured Docker containers for an easy start +Learn how to containerize your custom Frappe app in [this guide](custom_app/README.md). -[Start development](development). +# Contributing -## Contributing +If you want to contribute to this repo refer to [CONTRIBUTING.md](CONTRIBUTING.md) -- [Frappe Docker Images](CONTRIBUTING.md) -- [Frappe Framework](https://github.com/frappe/frappe#contributing) -- [ERPNext](https://github.com/frappe/erpnext#contributing) -- [frappe/bench](https://github.com/frappe/bench) +This repository is only for Docker related stuff. You also might want to contribute to: + +- [Frappe framework](https://github.com/frappe/frappe#contributing), +- [ERPNext](https://github.com/frappe/erpnext#contributing), +- or [Frappe Bench](https://github.com/frappe/bench). diff --git a/docs/custom-apps-for-production.md b/docs/custom-apps-for-production.md deleted file mode 100644 index d00bd071..00000000 --- a/docs/custom-apps-for-production.md +++ /dev/null @@ -1,58 +0,0 @@ -# Custom apps - -To add your own Frappe/ERPNext apps to the image, we'll need to create a custom image with the help of a unique wrapper script - -> For the sake of simplicity, in this example, we'll be using a place holder called `[custom]`, and we'll be building off the edge image. - -Create two directories called `[custom]-worker` and `[custom]-nginx` in the `build` directory. - -```shell -cd frappe_docker -mkdir ./build/[custom]-worker ./build/[custom]-nginx -``` - -Create a `Dockerfile` in `./build/[custom]-worker` with the following content: - -```Dockerfile -FROM frappe/erpnext-worker:edge - -RUN install_app [custom] https://github.com/[username]/[custom] [branch] -# Only add the branch if you are using a specific tag or branch. -``` - -**Note:** Replace `https://github.com/[username]/[custom]` above with your custom app's Git repository URL (may include credentials if needed). Your custom app Git repository **must** be named exactly as the custom app's name, and use the same branch name as Frappe/ERPNext branch name that you use. - -Create a `Dockerfile` in `./build/[custom]-nginx` with the following content: - -```Dockerfile -FROM bitnami/node:12-prod - -COPY build/[custom]-nginx/install_app.sh /install_app - -RUN /install_app [custom] https://github.com/[username]/[custom] [branch] - -FROM frappe/erpnext-nginx:edge - -COPY --from=0 /home/frappe/frappe-bench/sites/ /var/www/html/ -COPY --from=0 /rsync /rsync -RUN echo -n "\n[custom]" >> /var/www/html/apps.txt - -VOLUME [ "/assets" ] - -ENTRYPOINT ["/docker-entrypoint.sh"] -CMD ["nginx", "-g", "daemon off;"] -``` - -Copy over the `install_app.sh` file from `./build/erpnext-nginx` - -```shell -cp ./build/erpnext-nginx/install_app.sh ./build/[custom]-nginx -``` - -Open up `./installation/docker-compose-custom.yml` and replace all instances of `[app]` with the name of your app. - -```shell -sed -i "s#\[app\]#[custom]#" ./installation/docker-compose-custom.yml -``` - -Install like usual, except that when you set the `INSTALL_APPS` variable to `erpnext,[custom]`. diff --git a/docs/single-bench.md b/docs/single-bench.md index 44949691..da13e893 100644 --- a/docs/single-bench.md +++ b/docs/single-bench.md @@ -44,7 +44,7 @@ To get started, copy the existing `env-local` or `env-production` file to `.env` - `ADMIN_PASSWORD=admin` - Password for the `Administrator` user, credentials after install `Administrator:$ADMIN_PASSWORD`. - `INSTALL_APPS=erpnext` - - Apps to install, the app must be already in the container image, to install other application read the [instructions on installing custom apps](./custom-apps-for-production.md). + - Apps to install, the app must be already in the container image, to install other application read the [instructions on installing custom apps](../custom_app/README.md). - `LETSENCRYPT_EMAIL=email@example.com` - Email for LetsEncrypt expiry notification. This is only required if you are setting up LetsEncrypt. - `ENTRYPOINT_LABEL=traefik.http.routers.erpnext-nginx.entrypoints=websecure`