mirror of
https://github.com/frappe/frappe_docker.git
synced 2025-02-13 09:28:27 +00:00
fix: production installation README
This commit is contained in:
parent
33b5071aaa
commit
8d9d583a8f
@ -17,11 +17,11 @@ cp .env.sample .env
|
|||||||
```sh
|
```sh
|
||||||
cd $HOME
|
cd $HOME
|
||||||
git clone https://github.com/frappe/frappe_docker.git
|
git clone https://github.com/frappe/frappe_docker.git
|
||||||
cd frappe_docker/installation
|
cd frappe_docker
|
||||||
cp env-example .env
|
cp installation/env-example .env
|
||||||
|
|
||||||
# make directory for sites
|
# make directory for sites
|
||||||
mkdir sites
|
mkdir installation/sites
|
||||||
```
|
```
|
||||||
|
|
||||||
### Setup Environment Variables
|
### Setup Environment Variables
|
||||||
@ -42,10 +42,11 @@ DNS needs to be configured for following to work
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker-compose \
|
docker-compose \
|
||||||
--project-name frappe-bench-00 \
|
--project-name frappebench00 \
|
||||||
-f installation/docker-compose-common.yml \
|
-f installation/docker-compose-common.yml \
|
||||||
-f installation/docker-conpose-erpnext.yml \
|
-f installation/docker-compose-erpnext.yml \
|
||||||
--project-directory . up -d
|
-f installation/docker-compose-networks.yml \
|
||||||
|
--project-directory installation up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: use `docker-compose-frappe.yml` in case you need bench with just frappe installed
|
Note: use `docker-compose-frappe.yml` in case you need bench with just frappe installed
|
||||||
@ -56,13 +57,13 @@ Note: Wait for mariadb to start. If new site creation fails re-try again after m
|
|||||||
|
|
||||||
```sh
|
```sh
|
||||||
# Create ERPNext site
|
# Create ERPNext site
|
||||||
docker exec \
|
docker exec -it \
|
||||||
-e "SITE_NAME=site1.domain.com" \
|
-e "SITE_NAME=site1.domain.com" \
|
||||||
-e "DB_ROOT_USER=root" \
|
-e "DB_ROOT_USER=root" \
|
||||||
-e "DB_ROOT_PASSWORD=admin" \
|
-e "DB_ROOT_PASSWORD=admin" \
|
||||||
-e "ADMIN_PASSWORD=admin" \
|
-e "ADMIN_PASSWORD=admin" \
|
||||||
-e "INSTALL_ERPNEXT=1" \
|
-e "INSTALL_ERPNEXT=1" \
|
||||||
frappe-bench-00_erpnext-python_1 new
|
frappebench00_erpnext-python_1 docker-entrypoint.sh new
|
||||||
```
|
```
|
||||||
|
|
||||||
Environment Variables:
|
Environment Variables:
|
||||||
@ -82,10 +83,10 @@ Environment Variables
|
|||||||
- `WITH_FILES` if set to 1, it will back up user uploaded files for the sites
|
- `WITH_FILES` if set to 1, it will back up user uploaded files for the sites
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
docker exec \
|
docker exec -it \
|
||||||
-e "SITES=site1.domain.com:site2.domain.com" \
|
-e "SITES=site1.domain.com:site2.domain.com" \
|
||||||
-e "WITH_FILES=1" \
|
-e "WITH_FILES=1" \
|
||||||
frappe-bench-00_erpnext-python_1 backup
|
frappebench00_erpnext-python_1 docker-entrypoint.sh backup
|
||||||
```
|
```
|
||||||
|
|
||||||
Backup will be available in `sites` mounted volume
|
Backup will be available in `sites` mounted volume
|
||||||
@ -104,19 +105,20 @@ docker-compose \
|
|||||||
|
|
||||||
# Restart containers
|
# Restart containers
|
||||||
docker-compose \
|
docker-compose \
|
||||||
--project-name frappe-bench-00 \
|
--project-name frappebench00 \
|
||||||
-f installation/docker-compose-common.yml \
|
-f installation/docker-compose-common.yml \
|
||||||
-f installation/docker-compose-erpnext.yml \
|
-f installation/docker-compose-erpnext.yml \
|
||||||
--project-directory . restart
|
-f installation/docker-compose-networks.yml \
|
||||||
|
--project-directory installation up -d
|
||||||
|
|
||||||
docker exec \
|
docker exec -it \
|
||||||
-e "MAINTENANCE_MODE=1" \
|
-e "MAINTENANCE_MODE=1" \
|
||||||
frappe-bench-00_erpnext-python_1 migrate
|
frappebench00_erpnext-python_1 docker-entrypoint.sh migrate
|
||||||
```
|
```
|
||||||
|
|
||||||
### Troubleshoot
|
### Troubleshoot
|
||||||
|
|
||||||
1. Clearing redis cache:
|
Clearing redis cache:
|
||||||
|
|
||||||
```
|
```
|
||||||
# change to repo root
|
# change to repo root
|
||||||
@ -124,30 +126,33 @@ cd $HOME/frappe_docker
|
|||||||
|
|
||||||
# Stop all bench containers
|
# Stop all bench containers
|
||||||
docker-compose \
|
docker-compose \
|
||||||
--project-name frappe-bench-00 \
|
--project-name frappebench00 \
|
||||||
-f docker/docker-compose-common.yml \
|
-f installation/docker-compose-common.yml \
|
||||||
-f docker/docker-compose-erpnext.yml \
|
-f installation/docker-compose-erpnext.yml \
|
||||||
--project-directory . stop
|
-f installation/docker-compose-networks.yml \
|
||||||
|
--project-directory installation stop
|
||||||
|
|
||||||
# Remove redis containers
|
# Remove redis containers
|
||||||
docker-compose \
|
docker-compose \
|
||||||
--project-name frappe-bench-00 \
|
--project-name frappebench00 \
|
||||||
-f docker/docker-compose-common.yml \
|
-f installation/docker-compose-common.yml \
|
||||||
-f docker/docker-compose-erpnext.yml \
|
-f installation/docker-compose-erpnext.yml \
|
||||||
--project-directory . rm redis-cache redis-queue redis-socketio
|
-f installation/docker-compose-networks.yml \
|
||||||
|
--project-directory installation rm redis-cache redis-queue redis-socketio
|
||||||
|
|
||||||
# Clean redis volumes
|
# Clean redis volumes
|
||||||
docker volume rm \
|
docker volume rm \
|
||||||
frappe-bench-00_redis-cache-vol \
|
frappebench00_redis-cache-vol \
|
||||||
frappe-bench-00_redis-queue-vol \
|
frappebench00_redis-queue-vol \
|
||||||
frappe-bench-00_redis-socketio-vol
|
frappebench00_redis-socketio-vol
|
||||||
|
|
||||||
# Restart project
|
# Restart project
|
||||||
docker-compose \
|
docker-compose \
|
||||||
--project-name frappe-bench-00 \
|
--project-name frappebench00 \
|
||||||
-f docker/docker-compose-common.yml \
|
-f installation/docker-compose-common.yml \
|
||||||
-f docker/docker-compose-erpnext.yml \
|
-f installation/docker-compose-erpnext.yml \
|
||||||
--project-directory . up -d
|
-f installation/docker-compose-networks.yml \
|
||||||
|
--project-directory installation up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
Note: Environment variables from `.env` file located at current working directory will be used.
|
Note: Environment variables from `.env` file located at current working directory will be used.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user