one-click-apps
one-click-apps copied to clipboard
App Suggestion: ERPNext
Please tell us what app you'd like to see on CapRover as a one-click app. Free and Open Source Enterprise Resource Planning (ERP)
Do you know if there is any official Docker image for the app? ERPNext Docker: https://github.com/frappe/frappe_docker
Any update???
Adding this would very much be appreciated
+1
+1
I will give it a shot in the next weeks. Any advice from your side @githubsaturn regarding the official compose file, before I start?
https://github.com/frappe/frappe_docker/blob/main/compose.yaml
Two things that jumped out to me: 1- it uses YAML anchors, you just need to flatten them 2- it uses command, and you need to change to dockerfileLines.
In another note, can you guys ask source handlers of caprover to upgrade itself for a new release? Caprover itself very old. Sent from my iPhoneOn Nov 18, 2022, at 10:05 AM, Kasra Bigdeli @.***> wrote: Two things that jumped out to me: 1- it uses YAML anchors, you just need to flatten them 2- it uses command, and you need to change to dockerfileLines.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>
@matbgn is there any update? I tried a few crm but it seems erpnext fits best. but seems a bit confusing to install on caprover manually, should I wait for update if you are working on it?
ERP Next installation is not tough. I can help
On Thu, Nov 24, 2022 at 2:39 AM irfan Miral @.***> wrote:
@matbgn https://github.com/matbgn is there any update? I tried a few crm but it seems erpnext fits best. but seems a bit confusing to install on caprover manually, should I wait for update if you are working on it?
— Reply to this email directly, view it on GitHub https://github.com/caprover/one-click-apps/issues/624#issuecomment-1325633523, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAKQ6OI5KWSSECTHF66JRPTWJZ6HBANCNFSM5OIHKQWA . You are receiving this because you commented.Message ID: @.***>
I checked single server instructions and installation has been done via github clone, not docker repo (plus latest version on docker is 13) and there is proxy manager inside docker etc, as I understood I only need erpnext, erpnext-db(mariadb) and erpnext-worker containers on caprover.
+1
Just for information I'm planing to tackle this most likely on week commencing on 26th December. As always, if anyone is willing to take responsibility of this in the mean time, please feel free.
+1 also
Considering the complexity of the configured ERPNext final file ( https://github.com/frappe/frappe_docker/blob/main/pwd.yml ) and the time I'm able to invest right now I will postpone this deployment to an undefined date.
name: frappe_docker
services:
backend:
depends_on:
configurator:
condition: service_completed_successfully
image: frappe/erpnext:v14.13.0
networks:
default: null
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
configurator:
command:
- |
bench set-config -g db_host $$DB_HOST; bench set-config -gp db_port $$DB_PORT; bench set-config -g redis_cache "redis://$$REDIS_CACHE"; bench set-config -g redis_queue "redis://$$REDIS_QUEUE"; bench set-config -g redis_socketio "redis://$$REDIS_SOCKETIO"; bench set-config -gp socketio_port $$SOCKETIO_PORT;
depends_on:
db:
condition: service_started
redis-cache:
condition: service_started
redis-queue:
condition: service_started
redis-socketio:
condition: service_started
entrypoint:
- bash
- -c
environment:
DB_HOST: db
DB_PORT: "5432"
REDIS_CACHE: redis-cache:6379
REDIS_QUEUE: redis-queue:6379
REDIS_SOCKETIO: redis-socketio:6379
SOCKETIO_PORT: "9000"
image: frappe/erpnext:v14.13.0
networks:
default: null
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
db:
command: []
environment:
POSTGRES_PASSWORD: "123"
image: postgres:13.5
networks:
default: null
volumes:
- type: volume
source: db-data
target: /var/lib/postgresql
volume: {}
frontend:
command:
- nginx-entrypoint.sh
depends_on:
backend:
condition: service_started
websocket:
condition: service_started
environment:
BACKEND: backend:8000
CLIENT_MAX_BODY_SIZE: 50m
FRAPPE_SITE_NAME_HEADER: $$host
PROXY_READ_TIMOUT: "120"
SOCKETIO: websocket:9000
UPSTREAM_REAL_IP_ADDRESS: 127.0.0.1
UPSTREAM_REAL_IP_HEADER: X-Forwarded-For
UPSTREAM_REAL_IP_RECURSIVE: "off"
image: frappe/erpnext:v14.13.0
labels:
traefik.enable: "true"
traefik.http.routers.frontend-http.entrypoints: web
traefik.http.routers.frontend-http.rule: HostRegexp(`{any:.+}`)
traefik.http.services.frontend.loadbalancer.server.port: "8080"
networks:
default: null
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
proxy:
command:
- --providers.docker
- --providers.docker.exposedbydefault=false
- --entrypoints.web.address=:80
image: traefik:2.5
networks:
default: null
ports:
- mode: ingress
target: 80
published: "80"
protocol: tcp
userns_mode: host
volumes:
- type: bind
source: /var/run/docker.sock
target: /var/run/docker.sock
read_only: true
bind:
create_host_path: true
queue-default:
command:
- bench
- worker
- --queue
- default
depends_on:
configurator:
condition: service_completed_successfully
image: frappe/erpnext:v14.13.0
networks:
default: null
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
queue-long:
command:
- bench
- worker
- --queue
- long
depends_on:
configurator:
condition: service_completed_successfully
image: frappe/erpnext:v14.13.0
networks:
default: null
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
queue-short:
command:
- bench
- worker
- --queue
- short
depends_on:
configurator:
condition: service_completed_successfully
image: frappe/erpnext:v14.13.0
networks:
default: null
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
redis-cache:
image: redis:6.2-alpine
networks:
default: null
volumes:
- type: volume
source: redis-cache-data
target: /data
volume: {}
redis-queue:
image: redis:6.2-alpine
networks:
default: null
volumes:
- type: volume
source: redis-queue-data
target: /data
volume: {}
redis-socketio:
image: redis:6.2-alpine
networks:
default: null
volumes:
- type: volume
source: redis-socketio-data
target: /data
volume: {}
scheduler:
command:
- bench
- schedule
depends_on:
configurator:
condition: service_completed_successfully
image: frappe/erpnext:v14.13.0
networks:
default: null
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
websocket:
command:
- node
- /home/frappe/frappe-bench/apps/frappe/socketio.js
depends_on:
configurator:
condition: service_completed_successfully
image: frappe/erpnext:v14.13.0
networks:
default: null
volumes:
- type: volume
source: sites
target: /home/frappe/frappe-bench/sites
volume: {}
networks:
default:
name: frappe_docker_default
volumes:
db-data:
name: frappe_docker_db-data
redis-cache-data:
name: frappe_docker_redis-cache-data
redis-queue-data:
name: frappe_docker_redis-queue-data
redis-socketio-data:
name: frappe_docker_redis-socketio-data
sites:
name: frappe_docker_sites
x-backend-defaults:
depends_on:
configurator:
condition: service_completed_successfully
image: frappe/erpnext:v14.13.0
volumes:
- sites:/home/frappe/frappe-bench/sites
x-depends-on-configurator:
depends_on:
configurator:
condition: service_completed_successfully
Started working on the ERPNext implementation, but as expected it's not that obvious...
Any input will be appreciated, e.g. from @githubsaturn ;-)
Our current work is replicated here: https://github.com/matbgn/one-click-apps/blob/feat/add-erpnext/matbgn/public/v4/apps/erpnext.yml
Status: Frontend won't deploy and logs are not explecit or even locatable
Here is our delete script to destroy the app via API for testing purposes:
#!/usr/bin/env bash
APPNAME="erp-test"
function drop {
app="${1}"
volumes="${2}"
echo "--------------------------------------------------------"
echo "Deleting ${app}"
echo "--------------------------------------------------------"
JSON='{ "appName": "'"${app}"'", "volumes":['"${volumes}"'] }'
# First call the API (/user/apps/appDefinitions/update endpoint) and set the instanceCount to 0, then attempt to delete. Doing so, will result in more reliable deletion of the volumes.
# https://github.com/caprover/caprover/issues/1235
caprover api \
-n "SERVER_NAME_REDACTED" \
-p "PASSWORD_REDACTED" \
-t /user/apps/appDefinitions/update \
-m POST -d '{ "appName": "'"${app}"'", "instanceCount": "0"}'
caprover api \
-n "SERVER_NAME_REDACTED" \
-p "PASSWORD_REDACTED" \
-t /user/apps/appDefinitions/delete \
-m POST -d "${JSON}"
}
drop "${APPNAME}-configurator" ''
drop "${APPNAME}-create-site" ''
drop "${APPNAME}-frontend" ''
drop "${APPNAME}-queue-default" ''
drop "${APPNAME}-queue-long" ''
drop "${APPNAME}-queue-short" ''
drop "${APPNAME}-scheduler" ''
drop "${APPNAME}-websocket" ''
drop "${APPNAME}-redis-queue" '"'"${APPNAME}"'-redis-queue"'
drop "${APPNAME}-redis-cache" '"'"${APPNAME}"'-redis-cache"'
drop "${APPNAME}-redis-socketio" '"'"${APPNAME}"'-redis-socketio"'
drop "${APPNAME}-db" '"'"${APPNAME}"'-db"'
# Delete multiple volumes at once
# https://github.com/caprover/one-click-apps/issues/491#issuecomment-951985921
drop "${APPNAME}-backend" '"'"${APPNAME}"'-sites","'"${APPNAME}"'-logs"'
yea this app is super complex. I suggest you start with a Docker compose and make it work, then move to CapRover.
Another thing that could help is to avoid having complex CMD lines, and just write a script in github gist and use ADD to pull it into the image. Here is an example:
https://github.com/caprover/one-click-apps/blob/0a80f8e9e756d04896d531a39506f1523462a6fa/public/v4/apps/rsync-looped.yml#L6-L11
Of course I tested it locally with docker compose ;-)
I tried the ADD trick, but unfortunately was not able to get it to work with the frappe custom image (shame on me for that particular point).
Honestly, I gave up, then I installed it in it's own VM and have to admit that there is no real way for Caprover to handle it. The complexity of its architecture is much more challenging than other types of applications. For example, adding modules like HR and so on after the core installation (https://github.com/frappe/frappe_docker/issues/959#issuecomment-1279121637).
After, my relative experience with Caprover in production for a year now, I definitely suggest to close this issue as not decently solvable for both perspective: technical and Caprover user happiness (no way to support such a jungle in long term).