mirror of
https://github.com/frappe/frappe_docker.git
synced 2024-11-09 23:00:56 +00:00
feat: docker-compose services
common services redis and mariadb frappe services gunicorn, schedule, workers, socketio erpnext services gunicorm, schedule, workers, socketio
This commit is contained in:
parent
9b6a641f4d
commit
da53bff5df
6
.gitignore
vendored
6
.gitignore
vendored
@ -1 +1,7 @@
|
||||
*.code-workspace
|
||||
|
||||
# Environment Variables
|
||||
.env
|
||||
|
||||
# mounted volume
|
||||
sites
|
||||
|
35
installation/docker-compose-common.yml
Normal file
35
installation/docker-compose-common.yml
Normal file
@ -0,0 +1,35 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
redis-cache:
|
||||
image: redis:latest
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- redis-cache-vol:/data
|
||||
|
||||
redis-queue:
|
||||
image: redis:latest
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- redis-queue-vol:/data
|
||||
|
||||
redis-socketio:
|
||||
image: redis:latest
|
||||
restart: on-failure
|
||||
volumes:
|
||||
- redis-socketio-vol:/data
|
||||
|
||||
mariadb:
|
||||
image: mariadb:10.3
|
||||
restart: on-failure
|
||||
environment:
|
||||
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
|
||||
volumes:
|
||||
- ./frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
|
||||
- mariadb-vol:/var/lib/mysql
|
||||
|
||||
volumes:
|
||||
mariadb-vol:
|
||||
redis-cache-vol:
|
||||
redis-queue-vol:
|
||||
redis-socketio-vol:
|
111
installation/docker-compose-erpnext.yml
Normal file
111
installation/docker-compose-erpnext.yml
Normal file
@ -0,0 +1,111 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
erpnext-assets:
|
||||
image: frappe/erpnext-assets:${VERSION}
|
||||
restart: on-failure
|
||||
environment:
|
||||
- FRAPPE_PY=erpnext-python
|
||||
- FRAPPE_PY_PORT=8000
|
||||
- FRAPPE_SOCKETIO=frappe-socketio
|
||||
- FRAPPE_SOCKETIO_PORT=9000
|
||||
- LETSENCRYPT_HOST=${SITES}
|
||||
- VIRTUAL_HOST=${SITES}
|
||||
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
|
||||
depends_on:
|
||||
- erpnext-python
|
||||
- frappe-socketio
|
||||
- frappe-worker-default
|
||||
- frappe-worker-long
|
||||
- frappe-worker-short
|
||||
links:
|
||||
- erpnext-python
|
||||
- frappe-socketio
|
||||
- frappe-worker-default
|
||||
- frappe-worker-long
|
||||
- frappe-worker-short
|
||||
volumes:
|
||||
- ./sites:/var/www/html/sites:rw
|
||||
- assets-vol:/assets:rw
|
||||
|
||||
erpnext-python:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
environment:
|
||||
- MARIADB_HOST=mariadb
|
||||
- REDIS_CACHE=redis-cache:6379
|
||||
- REDIS_QUEUE=redis-queue:6379
|
||||
- REDIS_SOCKETIO=redis-socketio:6379
|
||||
- SOCKETIO_PORT=9000
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
- assets-vol:/home/frappe/frappe-bench/sites/assets:rw
|
||||
|
||||
frappe-socketio:
|
||||
image: frappe/frappe-socketio:${VERSION}
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
- redis-socketio
|
||||
links:
|
||||
- redis-socketio
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
frappe-worker-default:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
command: worker
|
||||
depends_on:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
links:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
frappe-worker-short:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
command: worker
|
||||
environment:
|
||||
- WORKER_TYPE=short
|
||||
depends_on:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
links:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
frappe-worker-long:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
command: worker
|
||||
environment:
|
||||
- WORKER_TYPE=long
|
||||
depends_on:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
links:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
frappe-schedule:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
command: schedule
|
||||
depends_on:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
links:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
volumes:
|
||||
assets-vol:
|
111
installation/docker-compose-frappe.yml
Normal file
111
installation/docker-compose-frappe.yml
Normal file
@ -0,0 +1,111 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
frappe-assets:
|
||||
image: frappe/frappe-assets:${VERSION}
|
||||
restart: on-failure
|
||||
environment:
|
||||
- FRAPPE_PY=frappe-python
|
||||
- FRAPPE_PY_PORT=8000
|
||||
- FRAPPE_SOCKETIO=frappe-socketio
|
||||
- FRAPPE_SOCKETIO_PORT=9000
|
||||
- LETSENCRYPT_HOST=${SITES}
|
||||
- VIRTUAL_HOST=${SITES}
|
||||
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
|
||||
depends_on:
|
||||
- frappe-python
|
||||
- frappe-socketio
|
||||
- frappe-worker-default
|
||||
- frappe-worker-long
|
||||
- frappe-worker-short
|
||||
links:
|
||||
- frappe-python
|
||||
- frappe-socketio
|
||||
- frappe-worker-default
|
||||
- frappe-worker-long
|
||||
- frappe-worker-short
|
||||
volumes:
|
||||
- ./sites:/var/www/html/sites:rw
|
||||
- assets-vol:/assets:rw
|
||||
|
||||
frappe-python:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
environment:
|
||||
- MARIADB_HOST=mariadb
|
||||
- REDIS_CACHE=redis-cache:6379
|
||||
- REDIS_QUEUE=redis-queue:6379
|
||||
- REDIS_SOCKETIO=redis-socketio:6379
|
||||
- SOCKETIO_PORT=9000
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
- assets-vol:/home/frappe/frappe-bench/sites/assets:rw
|
||||
|
||||
frappe-socketio:
|
||||
image: frappe/frappe-socketio:${VERSION}
|
||||
restart: on-failure
|
||||
depends_on:
|
||||
- redis-socketio
|
||||
links:
|
||||
- redis-socketio
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
frappe-worker-default:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
command: worker
|
||||
depends_on:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
links:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
frappe-worker-short:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
command: worker
|
||||
environment:
|
||||
- WORKER_TYPE=short
|
||||
depends_on:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
links:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
frappe-worker-long:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
command: worker
|
||||
environment:
|
||||
- WORKER_TYPE=long
|
||||
depends_on:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
links:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
frappe-schedule:
|
||||
image: frappe/frappe-worker:${VERSION}
|
||||
restart: on-failure
|
||||
command: schedule
|
||||
depends_on:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
links:
|
||||
- redis-queue
|
||||
- redis-cache
|
||||
volumes:
|
||||
- ./sites:/home/frappe/frappe-bench/sites:rw
|
||||
|
||||
volumes:
|
||||
assets-vol:
|
6
installation/docker-compose-networks.yml
Normal file
6
installation/docker-compose-networks.yml
Normal file
@ -0,0 +1,6 @@
|
||||
version: '3'
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: webproxy
|
4
installation/env-example
Normal file
4
installation/env-example
Normal file
@ -0,0 +1,4 @@
|
||||
VERSION=edge
|
||||
MYSQL_ROOT_PASSWORD=admin
|
||||
SITES=your.domain.com
|
||||
LETSENCRYPT_EMAIL=your.email@your.domain.com
|
7
installation/frappe-mariadb.cnf
Normal file
7
installation/frappe-mariadb.cnf
Normal file
@ -0,0 +1,7 @@
|
||||
[mysqld]
|
||||
character-set-client-handshake = FALSE
|
||||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_unicode_ci
|
||||
|
||||
[mysql]
|
||||
default-character-set = utf8mb4
|
Loading…
Reference in New Issue
Block a user