mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-12-23 02:28:57 +00:00
Grammar fixes
This commit is contained in:
parent
3bf1fdcc75
commit
3ff3df0831
53
README.md
53
README.md
@ -8,7 +8,7 @@ This docker installation takes care of the following:
|
||||
* Setting up all the system requirements: eg. MariaDB, Node, Redis.
|
||||
* [OPTIONAL] Configuring networking for remote access and setting up LetsEncrypt
|
||||
|
||||
For docker based development refer this [README](development/README.md)
|
||||
For docker based development refer to this [README](development/README.md)
|
||||
|
||||
## Deployment
|
||||
|
||||
@ -44,13 +44,13 @@ To get started, copy the existing `env-example` file to `.env` inside the `insta
|
||||
- `VERSION=edge`
|
||||
- In this case, `edge` corresponds to `develop`. To setup any other version, you may use the branch name or version specific tags. (eg. version-12, v11.1.15, v11)
|
||||
- `MYSQL_ROOT_PASSWORD=admin`
|
||||
- Bootstraps a MariaDB container with this value set as the root password. If a managed MariaDB instance is to be used, there is no need to set the password here.
|
||||
- Bootstraps a MariaDB container with this value set as the root password. If a managed MariaDB instance is used, there is no need to set the password here.
|
||||
- `MARIADB_HOST=mariadb`
|
||||
- Sets the hostname to `mariadb`. This is required if the database is managed with the containerized MariaDB instance.
|
||||
- In case of a separately managed database setup, set the value to the database's hostname/IP/domain.
|
||||
- Sets the hostname to `mariadb`. This is required if the database is managed by the containerized MariaDB instance.
|
||||
- In case of a separately managed database setups, set the value to the database's hostname/IP/domain.
|
||||
- `SITES=site1.domain.com,site2.domain.com`
|
||||
- List of sites that are part of the deployment "bench". Each site is separated by a comma(,).
|
||||
- If LetsEncrypt is being setup, make sure that the DNS for all the site's domains are pointing to the current instance.
|
||||
- List of sites that are part of the deployment "bench" Each site is separated by a comma(,).
|
||||
- If LetsEncrypt is being setup, make sure that the DNS for all the site's domains correctly point to the current instance.
|
||||
- `LETSENCRYPT_EMAIL=your.email@your.domain.com`
|
||||
- Email for LetsEncrypt expiry notification. This is only required if you are setting up LetsEncrypt.
|
||||
|
||||
@ -58,7 +58,7 @@ To get started, copy the existing `env-example` file to `.env` inside the `insta
|
||||
### Local deployment for testing
|
||||
|
||||
For trying out locally or to develop apps using ERPNext REST API port 80 must be published.
|
||||
The first command will start the containers, the second command will publish the port of the *-nginx container.
|
||||
The first command will start the containers; the second command will publish the port of the *-nginx container.
|
||||
|
||||
|
||||
For Erpnext:
|
||||
@ -100,10 +100,11 @@ docker-compose \
|
||||
Make sure to replace `<project-name>` with the desired name you wish to set for the project.
|
||||
|
||||
Notes:
|
||||
- The local deployment is for testing and REST API development purpose only
|
||||
- A more complete development environment is available [here](Development/README.md)
|
||||
- The site names are limited to patterns matching \*.localhost by default
|
||||
- Additional site name patterns can be added by editing /etc/hosts of your host machine
|
||||
|
||||
- The local deployment is for testing and REST API development purpose only
|
||||
- A complete development environment is available [here](Development/README.md)
|
||||
- The site names are limited to patterns matching \*.localhost by default
|
||||
- Additional site name patterns can be added by editing /etc/hosts of your host machine
|
||||
|
||||
### Deployment for production
|
||||
|
||||
@ -111,7 +112,7 @@ Notes:
|
||||
|
||||
Letsencrypt Nginx Proxy Companion can optionally be setup to provide SSL. This is recommended for instances accessed over the internet.
|
||||
|
||||
Your DNS will need to be configured correctly in order for Letsencrypt to verify your domain.
|
||||
Your DNS will need to be configured correctly for Letsencrypt to verify your domain.
|
||||
|
||||
To setup the proxy companion, run the following commands:
|
||||
|
||||
@ -143,7 +144,7 @@ Note: use `docker-compose-frappe.yml` in case you need only Frappe without ERPNe
|
||||
|
||||
### Docker containers
|
||||
|
||||
This repository contains the following docker-compose files each one containing the described images:
|
||||
This repository contains the following docker-compose files, each one containing the described images:
|
||||
* docker-compose-common.yml
|
||||
* redis-cache
|
||||
* volume: redis-cache-vol
|
||||
@ -173,7 +174,7 @@ This repository contains the following docker-compose files each one containing
|
||||
* frappe-worker-long: background runner for long-running jobs
|
||||
* frappe-schedule
|
||||
|
||||
* docker-compose-networks.yml: this yml define the network to communicate with *Letsencrypt Nginx Proxy Companion*.
|
||||
* docker-compose-networks.yml: this yaml define the network to communicate with *Letsencrypt Nginx Proxy Companion*.
|
||||
|
||||
|
||||
### Site operations
|
||||
@ -182,8 +183,8 @@ This repository contains the following docker-compose files each one containing
|
||||
|
||||
Note:
|
||||
|
||||
- Wait for the mariadb service to start before trying to create a new site.
|
||||
- If new site creation fails, retry after the mariadb container is up and running.
|
||||
- Wait for the MariaDB service to start before trying to create a new site.
|
||||
- If new site creation fails, retry after the MariaDB container is up and running.
|
||||
- If you're using a managed database instance, make sure that the database is running before setting up a new site.
|
||||
- Use `.env` file or environment variables instead of passing secrets as command arguments.
|
||||
|
||||
@ -201,18 +202,18 @@ docker exec -it \
|
||||
Environment Variables needed:
|
||||
|
||||
- `SITE_NAME`: name of the new site to create.
|
||||
- `DB_ROOT_USER`: MariaDB Root user. The user that can create databases.
|
||||
- `MYSQL_ROOT_PASSWORD`: In case of mariadb docker container use the one set in `MYSQL_ROOT_PASSWORD` in previous steps. In case of managed database use appropriate password.
|
||||
- `ADMIN_PASSWORD`: set the administrator password for new site.
|
||||
- `DB_ROOT_USER`: MariaDB Root user.
|
||||
- `MYSQL_ROOT_PASSWORD`: In case of the MariaDB docker container use the one set in `MYSQL_ROOT_PASSWORD` in previous steps. In case of a managed database use the appropriate password.
|
||||
- `ADMIN_PASSWORD`: set the administrator password for the new site.
|
||||
- `INSTALL_APPS='erpnext'`: available only in erpnext-worker and erpnext containers (or other containers with custom apps). Installs ERPNext (and/or the specified apps, comma-delinieated) on this new site.
|
||||
- `FORCE=1`: is optional variable which force installs the same site.
|
||||
- `FORCE=1`: optional variable which force installation of the same site.
|
||||
|
||||
#### Backup Sites
|
||||
|
||||
Environment Variables
|
||||
|
||||
- `SITES` is list of sites separated by (:) colon to migrate. e.g. `SITES=site1.domain.com` or `SITES=site1.domain.com:site2.domain.com` By default all sites in bench will be backed up.
|
||||
- `WITH_FILES` if set to 1, it will backup user uploaded files for the sites.
|
||||
- `SITES` is list of sites separated by `:` colon to migrate. e.g. `SITES=site1.domain.com` or `SITES=site1.domain.com:site2.domain.com` By default all sites in bench will be backed up.
|
||||
- `WITH_FILES` if set to 1, it will backup user-uploaded files.
|
||||
|
||||
```sh
|
||||
docker exec -it \
|
||||
@ -221,7 +222,7 @@ docker exec -it \
|
||||
<project-name>_erpnext-python_1 docker-entrypoint.sh backup
|
||||
```
|
||||
|
||||
Backup will be available in the `sites` mounted volume.
|
||||
The backup will be available in the `sites` mounted volume.
|
||||
|
||||
#### Updating and Migrating Sites
|
||||
|
||||
@ -252,7 +253,7 @@ docker exec -it \
|
||||
|
||||
### 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 special wrapper script
|
||||
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.
|
||||
|
||||
@ -305,7 +306,7 @@ Open up `./installation/docker-compose-custom.yml` and replace all instances of
|
||||
sed -i "s#\[app\]#[custom]#" ./installation/docker-compose-custom.yml
|
||||
```
|
||||
|
||||
Install like usual, except that when you set the `INSTALL_APPS` variable set it to `erpnext,[custom]`.
|
||||
Install like usual, except that when you set the `INSTALL_APPS` variable to `erpnext,[custom]`.
|
||||
|
||||
## Troubleshoot
|
||||
|
||||
@ -377,7 +378,7 @@ docker exec -it <project-name>_redis-queue_1 redis-cli FLUSHALL
|
||||
docker exec -it <project-name>_redis-socketio_1 redis-cli FLUSHALL
|
||||
```
|
||||
|
||||
Note: Environment variables from `.env` file located at current working directory will be used.
|
||||
Note: Environment variables from `.env` file located at the current working directory will be used.
|
||||
|
||||
## Development
|
||||
|
||||
|
@ -32,7 +32,7 @@ For most people getting started with Frappe development, the best solution is to
|
||||
Notes:
|
||||
|
||||
- The `development` directory is ignored by git. It is mounted and available inside the container. Create all your benches (installations of bench, the tool that manages frappe) inside this directory.
|
||||
- nvm with node v12 and v10 is installed. Check with `nvm ls`. Node v12 is default.
|
||||
- nvm with node v12 and v10 is installed. Check with `nvm ls`. Node v12 is used by default.
|
||||
|
||||
### Setup first bench
|
||||
|
||||
@ -56,9 +56,9 @@ bench set-redis-socketio-host redis-socketio:6379
|
||||
|
||||
### Edit Honcho's Procfile
|
||||
|
||||
Honcho is the tool used by Bench to manage all the processes Frappe requires. Usually, these all run in localhost, but in this case we have external containers for Redis. For this reason, we have to stop Honcho from trying to start Redis processes.
|
||||
Honcho is the tool used by Bench to manage all the processes Frappe requires. Usually, these all run in localhost, but in this case, we have external containers for Redis. For this reason, we have to stop Honcho from trying to start Redis processes.
|
||||
|
||||
Open the Procfile file and remove the three lines containing the configuration from Redis, either by editing manually the file
|
||||
Open the Procfile file and remove the three lines containing the configuration from Redis, either by editing manually the file.
|
||||
|
||||
```shell
|
||||
code Procfile
|
||||
@ -71,7 +71,7 @@ sed -i '/redis/d' ./Procfile
|
||||
|
||||
### Create a new site with bench
|
||||
|
||||
You can create a new site with the following command
|
||||
You can create a new site with the following command:
|
||||
|
||||
```shell
|
||||
bench new-site sitename
|
||||
@ -89,7 +89,7 @@ Your website will now be accessible on [localhost on port 8000](http://locahost:
|
||||
### Fixing MariaDB issues after rebuilding the container
|
||||
|
||||
The `bench new-site` command creates a user in MariaDB with container IP as host, for this reason after rebuilding the container there is a chance that you will not be able to access MariaDB correctly with the previous configuration
|
||||
The parameter `'db_name'@'%'` needs to be set in MariaDB and permission to the site database properly assigned to the user.
|
||||
The parameter `'db_name'@'%'` needs to be set in MariaDB and permission to the site database suitably assigned to the user.
|
||||
|
||||
Open sites/common_site_config.json:
|
||||
|
||||
@ -133,7 +133,7 @@ docker exec -e "TERM=xterm-256color" -w /workspace/development -it devcontainer_
|
||||
|
||||
To enable Python debugging inside Visual Studio Code, you must first install the `ms-python.python` extension inside the container.
|
||||
|
||||
- Click on the extensions icon of VSCode
|
||||
- Click on the extension icon inside VSCode
|
||||
- Search `ms-python.python`
|
||||
- Click on `Install on Dev Container: Frappe Bench`
|
||||
- Click on 'Reload'
|
||||
@ -150,4 +150,4 @@ honcho start \
|
||||
worker_default
|
||||
```
|
||||
|
||||
This command starts all processes but Redis (which is already running in separate container) and the `web` process, which we can finally start from the debugger tab of VSCode.
|
||||
This command starts all processes with the exception of Redis (which is already running in separate container) and the `web` process. The latter can can finally be started from the debugger tab of VSCode.
|
||||
|
Loading…
Reference in New Issue
Block a user