mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-08 14:21:05 +00:00
fix: make changes for backward compat
make changes for refactor to work on existing setups
This commit is contained in:
parent
e1f32b7476
commit
09060341c7
@ -38,6 +38,13 @@ services:
|
|||||||
- FRAPPE_SOCKETIO=frappe-socketio
|
- FRAPPE_SOCKETIO=frappe-socketio
|
||||||
- SOCKETIO_PORT=9000
|
- SOCKETIO_PORT=9000
|
||||||
- SKIP_NGINX_TEMPLATE_GENERATION=${SKIP_NGINX_TEMPLATE_GENERATION}
|
- SKIP_NGINX_TEMPLATE_GENERATION=${SKIP_NGINX_TEMPLATE_GENERATION}
|
||||||
|
# For refactored images
|
||||||
|
- BACKEND=erpnext-python:8000
|
||||||
|
- SOCKETIO=frappe-socketio:9000
|
||||||
|
- FRAPPE_SITE_NAME_HEADER=${FRAPPE_SITE_NAME_HEADER:-$$host}
|
||||||
|
- UPSTREAM_REAL_IP_ADDRESS=${UPSTREAM_REAL_IP_ADDRESS:-127.0.0.1}
|
||||||
|
- UPSTREAM_REAL_IP_HEADER=${UPSTREAM_REAL_IP_HEADER:-X-Forwarded-For}
|
||||||
|
- UPSTREAM_REAL_IP_RECURSIVE=${UPSTREAM_REAL_IP_RECURSIVE:-off}
|
||||||
labels:
|
labels:
|
||||||
- "traefik.enable=true"
|
- "traefik.enable=true"
|
||||||
- "traefik.http.routers.erpnext-nginx.rule=Host(${SITES})"
|
- "traefik.http.routers.erpnext-nginx.rule=Host(${SITES})"
|
||||||
@ -75,7 +82,7 @@ services:
|
|||||||
erpnext-worker-default:
|
erpnext-worker-default:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
command: worker
|
command: ["bench", "worker", "--queue", "default"]
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis-queue
|
- redis-queue
|
||||||
- redis-cache
|
- redis-cache
|
||||||
@ -86,9 +93,7 @@ services:
|
|||||||
erpnext-worker-short:
|
erpnext-worker-short:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
command: worker
|
command: ["bench", "worker", "--queue", "short"]
|
||||||
environment:
|
|
||||||
- WORKER_TYPE=short
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis-queue
|
- redis-queue
|
||||||
- redis-cache
|
- redis-cache
|
||||||
@ -99,9 +104,7 @@ services:
|
|||||||
erpnext-worker-long:
|
erpnext-worker-long:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
command: worker
|
command: ["bench", "worker", "--queue", "long"]
|
||||||
environment:
|
|
||||||
- WORKER_TYPE=long
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis-queue
|
- redis-queue
|
||||||
- redis-cache
|
- redis-cache
|
||||||
@ -111,7 +114,7 @@ services:
|
|||||||
erpnext-schedule:
|
erpnext-schedule:
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
||||||
restart: on-failure
|
restart: on-failure
|
||||||
command: schedule
|
command: ["bench", "schedule"]
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis-queue
|
- redis-queue
|
||||||
- redis-cache
|
- redis-cache
|
||||||
@ -147,28 +150,12 @@ services:
|
|||||||
- --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
|
- --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
|
||||||
environment:
|
environment:
|
||||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||||
# Sometimes db initialization takes longer than 10 seconds and site-creator goes away.
|
# Sometimes db initialization takes longer than 10 seconds and site creation can cause error.
|
||||||
# Frappe doesn't use CONVERT_TZ() function that requires time zone info, so we can just skip it.
|
# Frappe doesn't use CONVERT_TZ() function that requires time zone info, so we can just skip it.
|
||||||
- MYSQL_INITDB_SKIP_TZINFO=1
|
- MYSQL_INITDB_SKIP_TZINFO=1
|
||||||
volumes:
|
volumes:
|
||||||
- mariadb-vol:/var/lib/mysql
|
- mariadb-vol:/var/lib/mysql
|
||||||
|
|
||||||
site-creator:
|
|
||||||
image: frappe/erpnext-worker:${ERPNEXT_VERSION}
|
|
||||||
restart: "no"
|
|
||||||
command: new
|
|
||||||
depends_on:
|
|
||||||
- erpnext-python
|
|
||||||
environment:
|
|
||||||
- SITE_NAME=${SITE_NAME}
|
|
||||||
- DB_ROOT_USER=${DB_ROOT_USER}
|
|
||||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
|
||||||
- ADMIN_PASSWORD=${ADMIN_PASSWORD}
|
|
||||||
- INSTALL_APPS=${INSTALL_APPS}
|
|
||||||
volumes:
|
|
||||||
- sites-vol:/home/frappe/frappe-bench/sites:rw
|
|
||||||
- logs-vol:/home/frappe/frappe-bench/logs:rw
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
mariadb-vol:
|
mariadb-vol:
|
||||||
redis-cache-vol:
|
redis-cache-vol:
|
||||||
|
@ -82,6 +82,26 @@ Notes:
|
|||||||
- The local deployment is for testing and REST API development purpose only
|
- The local deployment is for testing and REST API development purpose only
|
||||||
- A complete development environment is available [here](../development)
|
- A complete development environment is available [here](../development)
|
||||||
|
|
||||||
|
## Create Site
|
||||||
|
|
||||||
|
Set environment variables
|
||||||
|
|
||||||
|
```sh
|
||||||
|
export $(cat .env | xargs)
|
||||||
|
```
|
||||||
|
|
||||||
|
Create site as per use and install apps optionally.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker-compose exec erpnext-python bench new-site ${SITE_NAME} --mariadb-root-username=${DB_ROOT_USER} --mariadb-root-password=${MYSQL_ROOT_PASSWORD} --admin-password=${ADMIN_PASSWORD} --install-app=${INSTALL_APPS} --db-type=mariadb --no-mariadb-socket
|
||||||
|
```
|
||||||
|
|
||||||
|
If this is the first site created then remove `currentsite.txt` to unset default site.
|
||||||
|
|
||||||
|
```sh
|
||||||
|
docker-compose exec erpnext-python rm -f currentsite.txt
|
||||||
|
```
|
||||||
|
|
||||||
## Docker containers
|
## Docker containers
|
||||||
|
|
||||||
The docker-compose file contains following services:
|
The docker-compose file contains following services:
|
||||||
|
Loading…
Reference in New Issue
Block a user