mirror of
https://github.com/frappe/frappe_docker.git
synced 2026-06-23 00:05:09 +00:00
local enviroment
Switches default local setup to PostgreSQL and ARM64 Updates local development environment to use PostgreSQL instead of MariaDB by default, aligns configuration and documentation, and switches Docker service platforms to ARM64 for broader compatibility. Improves developer experience and readiness for ARM-based systems.
This commit is contained in:
parent
6f90142716
commit
02b3cfcf09
6 changed files with 76 additions and 60 deletions
14
compose.yaml
14
compose.yaml
|
|
@ -19,7 +19,7 @@ x-backend-defaults: &backend_defaults
|
|||
services:
|
||||
configurator:
|
||||
<<: *backend_defaults
|
||||
platform: linux/amd64
|
||||
platform: linux/arm64
|
||||
entrypoint:
|
||||
- bash
|
||||
- -c
|
||||
|
|
@ -44,11 +44,11 @@ services:
|
|||
|
||||
backend:
|
||||
<<: *backend_defaults
|
||||
platform: linux/amd64
|
||||
platform: linux/arm64
|
||||
|
||||
frontend:
|
||||
<<: *customizable_image
|
||||
platform: linux/amd64
|
||||
platform: linux/arm64
|
||||
command:
|
||||
- nginx-entrypoint.sh
|
||||
environment:
|
||||
|
|
@ -68,7 +68,7 @@ services:
|
|||
|
||||
websocket:
|
||||
<<: [*depends_on_configurator, *customizable_image]
|
||||
platform: linux/amd64
|
||||
platform: linux/arm64
|
||||
command:
|
||||
- node
|
||||
- /home/frappe/frappe-bench/apps/frappe/socketio.js
|
||||
|
|
@ -77,17 +77,17 @@ services:
|
|||
|
||||
queue-short:
|
||||
<<: *backend_defaults
|
||||
platform: linux/amd64
|
||||
platform: linux/arm64
|
||||
command: bench worker --queue short,default
|
||||
|
||||
queue-long:
|
||||
<<: *backend_defaults
|
||||
platform: linux/amd64
|
||||
platform: linux/arm64
|
||||
command: bench worker --queue long,default,short
|
||||
|
||||
scheduler:
|
||||
<<: *backend_defaults
|
||||
platform: linux/amd64
|
||||
platform: linux/arm64
|
||||
command: bench schedule
|
||||
|
||||
# ERPNext requires local assets access (Frappe does not)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,10 @@
|
|||
{
|
||||
"name": "Frappe Bench",
|
||||
"forwardPorts": [8000, 9000, 6787],
|
||||
"forwardPorts": [
|
||||
8000,
|
||||
9000,
|
||||
6787
|
||||
],
|
||||
"remoteUser": "frappe",
|
||||
"customizations": {
|
||||
"vscode": {
|
||||
|
|
@ -9,7 +13,10 @@
|
|||
"ms-vscode.live-server",
|
||||
"grapecity.gc-excelviewer",
|
||||
"mtxr.sqltools",
|
||||
"visualstudioexptteam.vscodeintellicode"
|
||||
"mtxr.sqltools-driver-pg",
|
||||
"visualstudioexptteam.vscodeintellicode",
|
||||
"ms-vscode-remote.remote-containers",
|
||||
"vue.volar"
|
||||
],
|
||||
"settings": {
|
||||
"terminal.integrated.profiles.linux": {
|
||||
|
|
|
|||
|
|
@ -1,40 +1,40 @@
|
|||
version: "3.7"
|
||||
version: '3.7'
|
||||
services:
|
||||
mariadb:
|
||||
image: docker.io/mariadb:10.6
|
||||
platform: linux/amd64
|
||||
command:
|
||||
- --character-set-server=utf8mb4
|
||||
- --collation-server=utf8mb4_unicode_ci
|
||||
- --skip-character-set-client-handshake
|
||||
- --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: 123
|
||||
volumes:
|
||||
- mariadb-data:/var/lib/mysql
|
||||
# mariadb:
|
||||
# image: docker.io/mariadb:10.6
|
||||
# platform: linux/amd64
|
||||
# command:
|
||||
# - --character-set-server=utf8mb4
|
||||
# - --collation-server=utf8mb4_unicode_ci
|
||||
# - --skip-character-set-client-handshake
|
||||
# - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6
|
||||
# environment:
|
||||
# MYSQL_ROOT_PASSWORD: 123
|
||||
# volumes:
|
||||
# - mariadb-data:/var/lib/mysql
|
||||
|
||||
# Enable PostgreSQL only if you use it, see development/README.md for more information.
|
||||
# postgresql:
|
||||
# image: postgres:11.8
|
||||
# environment:
|
||||
# POSTGRES_PASSWORD: 123
|
||||
# volumes:
|
||||
# - postgresql-data:/var/lib/postgresql/data
|
||||
|
||||
postgresql:
|
||||
image: postgres:11.8
|
||||
environment:
|
||||
POSTGRES_PASSWORD: 123
|
||||
volumes:
|
||||
- postgresql-data:/var/lib/postgresql/data
|
||||
# Uncomment the below lines to enable PostgreSQL
|
||||
# Enable Mailpit if you need to test outgoing mail services
|
||||
# See https://mailpit.axllent.org/
|
||||
# mailpit:
|
||||
# image: axllent/mailpit
|
||||
# volumes:
|
||||
# - mailpit-data:/data
|
||||
# ports:
|
||||
# - 8025:8025
|
||||
# - 1025:1025
|
||||
# environment:
|
||||
# MP_MAX_MESSAGES: 5000
|
||||
# MP_DATA_FILE: /data/mailpit.db
|
||||
# MP_SMTP_AUTH_ACCEPT_ANY: 1
|
||||
# MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
||||
mailpit:
|
||||
image: axllent/mailpit
|
||||
volumes:
|
||||
- mailpit-data:/data
|
||||
ports:
|
||||
- 8025:8025
|
||||
- 1025:1025
|
||||
environment:
|
||||
MP_MAX_MESSAGES: 5000
|
||||
MP_DATA_FILE: /data/mailpit.db
|
||||
MP_SMTP_AUTH_ACCEPT_ANY: 1
|
||||
MP_SMTP_AUTH_ALLOW_INSECURE: 1
|
||||
|
||||
redis-cache:
|
||||
image: docker.io/redis:alpine
|
||||
|
|
@ -86,6 +86,6 @@ services:
|
|||
# - ..:/workspace:z,cached
|
||||
# network_mode: "host"
|
||||
volumes:
|
||||
mariadb-data:
|
||||
#postgresql-data:
|
||||
#mailpit-data:
|
||||
# mariadb-data:
|
||||
postgresql-data:
|
||||
mailpit-data:
|
||||
|
|
|
|||
9
development/Readme.md
Normal file
9
development/Readme.md
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# Readme
|
||||
|
||||
## Installation
|
||||
|
||||
With installer.py, you must change the root-username to postgres and setup the password in the postgres image to the same as the one you set in the installer.py.
|
||||
|
||||
```shell
|
||||
python installer.py --db-type postgres
|
||||
```
|
||||
|
|
@ -223,7 +223,7 @@ def create_site_in_bench(args):
|
|||
new_site_cmd = [
|
||||
"bench",
|
||||
"new-site",
|
||||
f"--db-root-username=root",
|
||||
f"--db-root-username=postgres",
|
||||
f"--db-host=postgresql", # Should match the compose service name
|
||||
f"--db-type={args.db_type}", # Add the selected database type
|
||||
f"--db-root-password=123", # Replace with your PostgreSQL password
|
||||
|
|
|
|||
28
pwd.yml
28
pwd.yml
|
|
@ -1,8 +1,8 @@
|
|||
version: "3"
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
backend:
|
||||
image: frappe/erpnext:v15.61.1
|
||||
image: frappe/erpnext:latest
|
||||
networks:
|
||||
- frappe_network
|
||||
deploy:
|
||||
|
|
@ -13,12 +13,12 @@ services:
|
|||
- logs:/home/frappe/frappe-bench/logs
|
||||
environment:
|
||||
DB_HOST: db
|
||||
DB_PORT: "3306"
|
||||
DB_PORT: '3306'
|
||||
MYSQL_ROOT_PASSWORD: admin
|
||||
MARIADB_ROOT_PASSWORD: admin
|
||||
|
||||
configurator:
|
||||
image: frappe/erpnext:v15.61.1
|
||||
image: frappe/erpnext:latest
|
||||
networks:
|
||||
- frappe_network
|
||||
deploy:
|
||||
|
|
@ -38,16 +38,16 @@ services:
|
|||
bench set-config -gp socketio_port $$SOCKETIO_PORT;
|
||||
environment:
|
||||
DB_HOST: db
|
||||
DB_PORT: "3306"
|
||||
DB_PORT: '3306'
|
||||
REDIS_CACHE: redis-cache:6379
|
||||
REDIS_QUEUE: redis-queue:6379
|
||||
SOCKETIO_PORT: "9000"
|
||||
SOCKETIO_PORT: '9000'
|
||||
volumes:
|
||||
- sites:/home/frappe/frappe-bench/sites
|
||||
- logs:/home/frappe/frappe-bench/logs
|
||||
|
||||
create-site:
|
||||
image: frappe/erpnext:v15.61.1
|
||||
image: frappe/erpnext:latest
|
||||
networks:
|
||||
- frappe_network
|
||||
deploy:
|
||||
|
|
@ -102,7 +102,7 @@ services:
|
|||
- db-data:/var/lib/mysql
|
||||
|
||||
frontend:
|
||||
image: frappe/erpnext:v15.61.1
|
||||
image: frappe/erpnext:latest
|
||||
networks:
|
||||
- frappe_network
|
||||
depends_on:
|
||||
|
|
@ -118,17 +118,17 @@ services:
|
|||
SOCKETIO: websocket:9000
|
||||
UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
|
||||
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
|
||||
UPSTREAM_REAL_IP_RECURSIVE: "off"
|
||||
UPSTREAM_REAL_IP_RECURSIVE: 'off'
|
||||
PROXY_READ_TIMEOUT: 120
|
||||
CLIENT_MAX_BODY_SIZE: 50m
|
||||
volumes:
|
||||
- sites:/home/frappe/frappe-bench/sites
|
||||
- logs:/home/frappe/frappe-bench/logs
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- '8080:8080'
|
||||
|
||||
queue-long:
|
||||
image: frappe/erpnext:v15.61.1
|
||||
image: frappe/erpnext:latest
|
||||
networks:
|
||||
- frappe_network
|
||||
deploy:
|
||||
|
|
@ -144,7 +144,7 @@ services:
|
|||
- logs:/home/frappe/frappe-bench/logs
|
||||
|
||||
queue-short:
|
||||
image: frappe/erpnext:v15.61.1
|
||||
image: frappe/erpnext:latest
|
||||
networks:
|
||||
- frappe_network
|
||||
deploy:
|
||||
|
|
@ -178,7 +178,7 @@ services:
|
|||
condition: on-failure
|
||||
|
||||
scheduler:
|
||||
image: frappe/erpnext:v15.61.1
|
||||
image: frappe/erpnext:latest
|
||||
networks:
|
||||
- frappe_network
|
||||
deploy:
|
||||
|
|
@ -192,7 +192,7 @@ services:
|
|||
- logs:/home/frappe/frappe-bench/logs
|
||||
|
||||
websocket:
|
||||
image: frappe/erpnext:v15.61.1
|
||||
image: frappe/erpnext:latest
|
||||
networks:
|
||||
- frappe_network
|
||||
deploy:
|
||||
|
|
|
|||
Loading…
Reference in a new issue