Hi Imed, can you please describe youre Problem a bit further and show some error Messages?
should get installed through apps.json
unfortunately not… docker Build chrashes whit this Error log:
#0 173.7 WARN: restart failed: Couldn't find supervisorctl in PATH
#0 175.0 Traceback (most recent call last):
#0 175.0 File "/usr/local/lib/python3.10/site-packages/bench/commands/make.py", line 68, in init
#0 175.0 init(
#0 175.0 File "/usr/local/lib/python3.10/site-packages/bench/utils/render.py", line 105, in wrapper_fn
#0 175.0 return fn(*args, **kwargs)
#0 175.0 File "/usr/local/lib/python3.10/site-packages/bench/utils/system.py", line 90, in init
#0 175.0 install_apps_from_path(apps_path, bench_path=path)
#0 175.0 File "/usr/local/lib/python3.10/site-packages/bench/app.py", line 689, in install_apps_from_path
#0 175.0 apps = get_apps_json(path)
#0 175.0 File "/usr/local/lib/python3.10/site-packages/bench/app.py", line 707, in get_apps_json
#0 175.0 return json.load(f)
#0 175.0 File "/usr/local/lib/python3.10/json/__init__.py", line 293, in load
#0 175.0 return loads(fp.read(),
#0 175.0 File "/usr/local/lib/python3.10/json/__init__.py", line 346, in loads
#0 175.0 return _default_decoder.decode(s)
#0 175.0 File "/usr/local/lib/python3.10/json/decoder.py", line 337, in decode
#0 175.0 obj, end = self.raw_decode(s, idx=_w(s, 0).end())
#0 175.0 File "/usr/local/lib/python3.10/json/decoder.py", line 353, in raw_decode
#0 175.0 obj, end = self.scan_once(s, idx)
#0 175.0 json.decoder.JSONDecodeError: Expecting ',' delimiter: line 1 column 138 (char 137)
#0 175.0
#0 175.0 ERROR: There was a problem while creating /home/frappe/frappe-bench
#0 175.0 Do you want to rollback these changes? [y/N]: Aborted!
------
i use this Apps json
export APPS_JSON='[
{
"url": "https://github.com/frappe/erpnext",
"branch": "v14.23.0"
},
{
"url": "https://github.com/frappe/hrms",
"branch": "v14.2.3"
}
{
"url": "https://github.com/jHetzer/erpnextfints",
"branch": "0.4.1"
}
]'
I’m sorry i just forgot to type a , after hrms in my app.json command
Hi, i’m new here.
So I can add all modules i want to this commands lines to build the image and get them installed in ERPNEXT at once?
yes.
If you have the repos private you need to pass personal access token or basic auth. e.g.
https://{PAT}@github.com/SomeOrg/custom_app
replace PAT with your token or username and password in case of non github basic auth.
Ok thanks I want to install Accounting and Hrms module i need their repositories
Check reply #17 How do I install the human resources module in a Docker setup? - #17 by revant_one
Accounting is part of ERPNext v14
Ok whats the next process when the command has finished to create the image @ custom/hrms:1.0.0 ?
use the image and start containers
read everything here frappe_docker/custom-apps.md at main · frappe/frappe_docker · GitHub
This is what it return when i pull the image
(HTTP code 404) unexpected - pull access denied for custom/hrms, repository does not exist or may require ‘docker login’: denied: requested access to the resource is denied
you cannot pull this image, you’ve built this locally and pushed nowhere.
you need to USE the image.
let me copy paste the relevant section:
Use Images
On the compose.yaml replace the image reference to the tag
you used when you built it. Then, if you used a tag like custom_erpnext:staging
the x-customizable-image
section will look like this:
x-customizable-image: &customizable_image
image: custom_erpnext:staging
pull_policy: never
The pull_policy
above is optional and prevents docker
to try to download the image when that one has been built locally.
i did it like this
x-customizable-image: &customizable_image
By default the image used only contains the frappe
and erpnext
apps.
See frappe_docker/custom-apps.md at main · frappe/frappe_docker · GitHub
about using custom images.
image: custom/hrms:staging
pull_policy: never
The tag i used is custom/hrms
When I try my custom image and build a container with it i get this errors:
Attaching to frappe_docker-backend-1, frappe_docker-configurator-1, frappe_docker-frontend-1, frappe_docker-queue-default-1, frappe_docker-queue-long-1, frappe_docker-queue-short-1, frappe_docker-scheduler-1, frappe_docker-websocket-1
frappe_docker-configurator-1 | Usage: bench set-config [OPTIONS] KEY VALUE
frappe_docker-configurator-1 | Try 'bench set-config --help' for help.
frappe_docker-configurator-1 |
frappe_docker-configurator-1 | Error: Missing argument 'VALUE'.
frappe_docker-configurator-1 | Usage: bench set-config [OPTIONS] KEY VALUE
frappe_docker-configurator-1 | Try 'bench set-config --help' for help.
frappe_docker-configurator-1 |
frappe_docker-configurator-1 | Error: Missing argument 'VALUE'.
frappe_docker-configurator-1 exited with code 0
frappe_docker-frontend-1 | PROXY_READ_TIMEOUT defaulting to 120
my compose file has the changes:
x-customizable-image: &customizable_image
image: custom/hrms:1.0.0
pull_policy: never
logs from the configurator:
docker logs frappe_docker-configurator-1
Usage: bench set-config [OPTIONS] KEY VALUE
Try 'bench set-config --help' for help.
Error: Missing argument 'VALUE'.
Usage: bench set-config [OPTIONS] KEY VALUE
Try 'bench set-config --help' for help.
logs from other containers:
docker logs frappe_docker-websocket-1
node:events:491
throw er; // Unhandled 'error' event
^
Error: connect ECONNREFUSED 127.0.0.1:6379
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1278:16)
Emitted 'error' event on RedisClient instance at:
at RedisClient.on_error (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:342:14)
at Socket.<anonymous> (/home/frappe/frappe-bench/apps/frappe/node_modules/redis/index.js:223:14)
at Socket.emit (node:events:513:28)
at emitErrorNT (node:internal/streams/destroy:157:8)
at emitErrorCloseNT (node:internal/streams/destroy:122:3)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
errno: -111,
code: 'ECONNREFUSED',
syscall: 'connect',
address: '127.0.0.1',
port: 6379
}
The most important things that i noticed is while doing the export of apps json, when i try and export encoded variable it gives me this error:
export APPS_JSON='[
{
"url": "https://github.com/frappe/erpnext",
"branch": "v14.21.0"
},
{
"url": "https://github.com/frappe/hrms",
"branch": "v14.2.2"
}
]'
export APPS_JSON_BASE64=$(echo ${APPS_JSON} | base64 -w 0)
base64: invalid argument -w
Usage: base64 [-hDd] [-b num] [-i in_file] [-o out_file]
-h, --help display this message
-Dd, --decode decodes input
-b, --break break encoded string into num character lines
-i, --input input file (default: "-" for stdin)
-o, --output output file (default: "-" for stdout)
Kindly Advise.
It may be difference with your shell, env variables picked up by shell.
bench set-config sets config values from env vars, if the var is missing or not picked up by your shell it’ll result in command error.
If -w doesn’t work try --wrap or check docs/man/help for your base64 command
Works for me on Linux/bash/zsh.
I double checked the env variable. Here were my steps:
- Created custom image with the apps json.
- Modified the compose yml with the right image, i.e my local image.
- Run the docker compose command.
Post all this the containers start but tone container errors out as mentioned in the details of error logs.
I also verified the base64, encode and decode it gives me the right json string back.
On mac os ventura there is no -w or wrap flag that can be used with base64.
wait for someone with Mac to help you.
Also does ERPnext and HRMS support postgresql instead of Maria and if so whats the best way to implement that please ?
Hello @revant_one ,
Thanks again for all the work and help, this time I managed to get the image build as I stepped away from mac and did this on centos. Here are my steps:
- build an image based on this: https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md
- Post Build I made sure that i changed the compose.yml to point to my own image under:
x-customizable-image: &customizable_image
# By default the image used only contains the `frappe` and `erpnext` apps.
# See https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps.md
# about using custom images.
image: rajverma1985/erpnext/custom:1.0.0
-
I also made sure .env file is present but I did not make any changes to it at all.
-
Now Whenever I run the compose command, the configurator fails, no matter what I do (I have a feeling i’m doing this totally wrong):
docker compose --env-file .env -f compose.yaml -f overrides/compose.redis.yaml up -d
I have also tried this:
docker compose --env-file .env -f compose.yaml up -d
Am I missing something due to which I keep getting this:
frappe_docker]# docker logs frappe_docker-configurator-1
Usage: bench set-config [OPTIONS] KEY VALUE
Try 'bench set-config --help' for help.
Error: Missing argument 'VALUE'.
Usage: bench set-config [OPTIONS] KEY VALUE
Try 'bench set-config --help' for help.