2
0
mirror of https://github.com/frappe/frappe_docker.git synced 2024-11-10 07:11:00 +00:00

Merge pull request #235 from frappe/develop

ERPNext v12.8.0 and Frappe v12.5.2
This commit is contained in:
Revant Nandgaonkar 2020-05-10 00:30:35 +05:30 committed by GitHub
commit 814d62247a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 22 additions and 8 deletions

View File

@ -21,6 +21,8 @@ For docker based development refer to this [README](development/README.md)
This repository requires Docker, docker-compose and Git to be setup on the instance to be used.
Docker basics and best practices. Refer Docker documentation.
### Cloning the repository and preliminary steps
Clone this repository somewhere in your system:
@ -38,7 +40,7 @@ cp env-example .env
### Setup Environment Variables
To get started, copy the existing `env-example` file to `.env` inside the `installation` directory. By default, the file will contain the following variables:
To get started, copy the existing `env-example` file to `.env`. By default, the file will contain the following variables:
- `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)
@ -53,12 +55,16 @@ To get started, copy the existing `env-example` file to `.env` inside the `insta
- `LETSENCRYPT_EMAIL=your.email@your.domain.com`
- Email for LetsEncrypt expiry notification. This is only required if you are setting up LetsEncrypt.
Notes:
- docker-compose-erpnext.yml and docker-compose-frappe.yml set `AUTO_MIGRATE` environment variable to `1`.
- `AUTO_MIGRATE` checks if there is semver bump or git hash change in case of develop branch and automatically migrates the sites on container start up.
- It is good practice to use image tag for specific version instead of latest. e.g `frappe-socketio:v12.5.1`, `erpnext-nginx:v12.7.1`.
### 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.
Following command will start the needed containers and expose ports.
For Erpnext:

View File

@ -176,6 +176,10 @@ def main():
folder = os.environ.get('BUCKET_DIR') + '/' + site + '/' + os.path.basename(db_file)[:15] + '/'
upload_file_to_s3(db_file, folder, conn, bucket)
# Archive site_config.json
site_config_file = os.path.join(os.getcwd(), site, 'site_config.json')
upload_file_to_s3(site_config_file, folder, conn, bucket)
public_files = details.get('public_files', {}).get('file_path')
if public_files:
folder = os.environ.get('BUCKET_DIR') + '/' + site + '/' + os.path.basename(public_files)[:15] + '/'

View File

@ -30,7 +30,7 @@ server {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Frappe-Site-Name $host;
proxy_set_header Origin $scheme://$http_host;
proxy_set_header Origin $http_referer;
proxy_set_header Host $http_host;
proxy_pass http://socketio-server;

View File

@ -116,20 +116,24 @@ bench --site mysite.localhost clear-cache
To install an app we need to fetch it from the appropriate git repo, then install in on the appropriate site:
You can check [VSCode container remote extension documentation](https://code.visualstudio.com/docs/remote/containers#_sharing-git-credentials-with-your-container) regarding git creedential sharing.
You can check [VSCode container remote extension documentation](https://code.visualstudio.com/docs/remote/containers#_sharing-git-credentials-with-your-container) regarding git credential sharing.
To install custom app
```shell
bench get-app myapp https://github.com/myusername/myapp.git
# --branch is optional, use it to point to branch on custom app repository
bench get-app --branch version-12 myapp https://github.com/myusername/myapp.git
bench --site mysite.localhost install-app myapp
```
For example, to install ERPNext (from the master branch):
To install ERPNext (from the version-12 branch):
```shell
bench get-app erpnext https://github.com/frappe/erpnext.git
bench get-app --branch version-12 erpnext https://github.com/frappe/erpnext.git
bench --site mysite.localhost install-app erpnext
```
Note: Both frappe and erpnext must be on branch with same name. e.g. version-12
### Start Frappe without debugging