Custom installation of ERPNext reachable remote with Docker Apache2

Hi everyone,
I need to install ERPnext on a Debian system ARM64.
This should be reachable from remote at the address mysite.owndns.net
The Debian system is in a network with local address 192.168.1.104
This machine hosts different Docker containers so I need to change the default values for ports to avoid conflicts.
I followed the instructions reported here but I think there is some errors about the settings of the variables, because the containers seems looking for the default values and not the set ones.
I set correctly the server redirect of the domain mysite.owndns.net with Apache2 and all is working on its side.
I downloaded this full repository
I did this setup for the file pwd.yml and the file .env.
I run the commands

docker buildx bake --no-cache --set "*.platform=linux/arm64"

All went smoothly

Then I typed:

docker compose -f pwd.yml up -d

and all went without errors.
So I have:

$ sudo docker ps
CONTAINER ID   IMAGE                             COMMAND                  CREATED        STATUS                          PORTS                                                    NAMES
27ee36b8f328   frappe/erpnext:latest             "nginx-entrypoint.sh"    15 hours ago   Restarting (1) 52 seconds ago                                                            frappe_docker-code-frontend-1
fc705c7358e9   frappe/erpnext:latest             "node /home/serverSD…"   15 hours ago   Restarting (1) 47 seconds ago                                                            frappe_docker-code-websocket-1
fb10119c9bc7   frappe/erpnext:latest             "bash -c 'wait-for-i…"   15 hours ago   Up About a minute                                                                        frappe_docker-code-create-site-1
ac5c6794e357   frappe/erpnext:latest             "bench worker --queu…"   15 hours ago   Restarting (1) 20 seconds ago                                                            frappe_docker-code-queue-short-1
d6506292378a   frappe/erpnext:latest             "/home/frappe/frappe…"   15 hours ago   Up About a minute                                                                        frappe_docker-code-backend-1
6a6c104eaa37   frappe/erpnext:latest             "bench schedule"         15 hours ago   Up 8 hours                                                                               frappe_docker-code-scheduler-1
f82105c9db2a   frappe/erpnext:latest             "bench worker --queu…"   15 hours ago   Restarting (1) 20 seconds ago                                                            frappe_docker-code-queue-long-1
106139cfbe29   redis:6.2-alpine                  "docker-entrypoint.s…"   16 hours ago   Up About a minute               6379/tcp                                                 frappe_docker-code-redis-cache-1
37d308c96c9a   mariadb:10.6                      "docker-entrypoint.s…"   16 hours ago   Up About a minute (healthy)     3306/tcp                                                 frappe_docker-code-db-1
abeae22cc441   redis:6.2-alpine                  "docker-entrypoint.s…"   16 hours ago   Up About a minute               6379/tcp                                                 frappe_docker-code-redis-queue-1


Practically there are some containers that are failing so restart continuously.
I investigated this issue with the following checking of logs, for instance about $ sudo docker logs frappe_docker-code-queue-long-1 , and it returns this

So as you can see the backend it is looking to the port 3306 instead of 3307 as set on the env file, queue-long is looking for the default address 127.0.0.1 and not 192.168.1.104

I’ve seen that only the frontend is connecting to 8081 as requested.
Where is the error on the variable setup in the files?

Why not use the “overrides” compose files.

The 3306 is an internal port that will be accessed within the docker network only. Nothing to worry about conflicting with another DB server on the machine.

Change that port to 3306 and try again.
Also, in configurator service in pwd.yml you have:

…
wait-for-it -t 120 db:8982;
…

Why the port is 8982?

Also, you are exposing 8081 to Apache… how are you handling that in Apache conf?

You need to change the “configurator” service to set the variables as per you hosts/ports.

1 Like

Thanks for your reply

[quote=“knimer, post:2, topic:142489”]
Why not use the “overrides” compose files.
[/quote] It’s a bit complecated to use without a clear guide on how to exactly use them

Thus to correct my setup I should:

  • List set DB_PORT=3306 in the env file

  • List change the value for the line: “wait-for-it -t 120 db:8982;” Should it become “wait-for-it -t 120 db:${DB_PORT};” or “wait-for-it -t 120 db:8081;”?

Yes, about Apache in conf file I set the port on 8081 and not 8080 because busy

By the way, the line “wait-for-it -t 120 db:8982;” is not in the configurator service but in the create-site service declaration in the pwd.yml file

The error suggests that common_site_config.json is not populated. It uses default hosts and ports if not set in common_site_config.json. configurator service sets common_site_config.json.

Share your common_site_config.json

Irrelevant to where it is declared, this is wrong. This should be the DB port.

I cannot find this file common_site_config.json anywhere.
I read it is created after the installation and I don’t know where I should look at. Where is it?
Please consider that at the address /home/serverDCF/ERPNext/runningApps/frappe-bench/ there is nothing . Is it expected?

Check in the “frappe-bench/sites” folder.

As reported there is nothing in th folder /home/serverDCF/ERPNext/runningApps/frappe-bench/
Thus I created the two folders sites and logs inside, but nothing is created in /home/serverDCF/ERPNext/runningApps/frappe-bench/sites or /home/serverDCF/ERPNext/runningApps/frappe-bench/logs. Practically the system does not create any file common_site_config.json
How to get where is the problem?

I’m still in this situation:

$ sudo docker ps --no-trunc
CONTAINER ID                                                       IMAGE                             COMMAND                                                                           CREATED        STATUS                          PORTS                                                    NAMES
8210486f19f4620ec496c8e8a481346762d331056685f059c5468dd305b02fea   frappe/erpnext:latest             "nginx-entrypoint.sh"                                                             25 hours ago   Restarting (1) 40 seconds ago                                                            frappe_docker-code-frontend-1
8a1020d8c526301ae88ef0b68255c75f9c41425e500038d82f5b21428ed362eb   frappe/erpnext:latest             "node /home/serverDCF/ERPNext/runningApps/frappe-bench/apps/frappe/socketio.js"   25 hours ago   Restarting (1) 42 seconds ago                                                            frappe_docker-code-websocket-1
18bc1e050b46556bae55e687f8386155c56bff8f3d97125a5f7bd9da4fa22b9e   frappe/erpnext:latest             "bench worker --queue short,default"                                              25 hours ago   Up 1 second                                                                              frappe_docker-code-queue-short-1
7683a7927286e578fb2180ebfbe68426c4563dfbbe4bb1b624f02f371330b6dd   frappe/erpnext:latest             "bench worker --queue long,default,short"                                         25 hours ago   Restarting (1) 2 seconds ago                                                             frappe_docker-code-queue-long-1
821a71a3f96209da34b0530e69750a569a1c768e64014cf001dfab02f344daf4   frappe/erpnext:latest             "bench schedule"                                                                  25 hours ago   Up 12 hours                                                                              frappe_docker-code-scheduler-1

the point is that in the folder /home/serverDCF/ERPNext/runningApps/frappe-bench/apps/frappe/ there is nothing.
By terminal I got this:

~/ERPNext/runningApps/frappe-bench/logs $ ls -a
.  ..

Therefore there should be something that blocks the system to work correctly, generates the files and folder to make the correct setup.

Is there someone that can help with this?
You can fully replicate the installation, just copy and paste the full content of the pwd.yml and env files. As explained before, I corrected the DB_PORT in the env file on 3306. And in the create-site service declaration in the pwd.yml file, I put “wait-for-it -t 120 db:${DB_PORT};”
So what’s the problem that I’m encountering and how can I solve it?

Your setup is custom. You’ll need to figure it out on your own. There is no such mount point used in frappe_docker. (~/ERPNext/runningApps not used) You haven’t shared your custom yamls that specifies you’re using bind mount. For bind mount you need to fix the permission to 1000:1000 uid:gid. Also only ~/frappe-bench/sites need to be mounted not the whole ~/frappe-bench!

Hello,

In addition to @revant_one comments.

Notice that your DB container is not up at all. Everything starts with the DB, any other service will fail to start directly or indirectly.

Also, the mounts you did in the compose file:
sites:/home/serverDCF/ERPNext/runningApps/frappe-bench/sites

With this you are changing the “inside the container” path. Why do you need to do that? Or this is only a mistake and it should be:

/home/serverDCF/ERPNext/runningApps/frappe-bench/sites:/home/frappe/frappe-bench/sites

???

For the frontend service, are you sure about this?

ports:
      - ${HTTP_PUBLISH_PORT}:80

Why port 80 inside the container??

Also, check this in .env:

UPSTREAM_REAL_IP_ADDRESS=192.168.1.104

Can you change it to 127.0.0.1 and try??

Please check and get back here. Please answer all @revant_one questions. These are very important questions to answer.

Also, make sure you start fresh and all previous volumes are removed before going before docker compose up (becareful not to delete important stuff - backup before if needed).

1 Like

Thank you for your support.

I’ve understood that there is an issue about changing these addresses but actually I’ve not understood how it works in the installation settings and I was awaiting for your help, so thanks for your supports. I hope to solve following your suggestions.

Let me explain so you can understand my situation and help working the system. On that machine I have the home folder as /home/serverDCF/ so I downloaded the code in the folder /home/serverDCF/ERPNext/frappe_docker-code from GitHub. There I edited the files pwd.yml and .env as reported in the first post, and lately the corrections you suggested.
Because it is a server machine with other running services and I cannot have app folders in /, like /frappe/frappe-bench, I thought to change that declarations in /home/serverDCF/ERPNext/runningApps/ without knowing the correct behavior of that. I also created the folder /home/serverDCF/ERPNext/runningApps to have all the ERPnext running app file system inside that folder.

Now, if you @knimer say to substitute all the parts with sites:/home/serverDCF/ERPNext/runningApps/frappe-bench/sites with

I don’t think it’s a problem on my side. Now you’ve understood my goal and you can guide me on the best way. Please consider that about the db service I set:

volumes:
      - /mnt/disk/ERPnext/db-data:/var/lib/mysql

because in case of failure of the OS system, I’ll be able to have save all the data on a disk with backup security.
In case of failure, my idea is to restore the OS with an image copy and have data safe on another disk. Will it work?

About your question

I’m not sure: what do you suggest? My worry here is to avoid any conflicts with existing running containers as reported in this picture:
screenshot
I don’t want to have conflicts with these ports because of services of my colleagues and I cannot create problem to them.

Finally about the point:

The Debian machine where I’m installing the ERPNext has a local IP in the router network as 192.168.1.104. On the router we have opened the door 80 and 443 with a port fowarding to that IP 192.168.1.104. If you tell that my reasoning is completely wrong I’m ready to follow your guide. Moreover this is the erpnext.conf file for Apache:

<VirtualHost *:80>
    ServerAdmin test@owndns.it
    ServerName mysite.owndns.net
    ServerAlias *.mysite.owndns.net
    Redirect permanent / https://mysite.owndns.net/
RewriteEngine on
RewriteCond %{SERVER_NAME} =mysite.owndns.net [OR]
RewriteCond %{SERVER_NAME} =*.mysite.owndns.net
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

<VirtualHost *:443>
    ServerAdmin test@owndns.it
    ServerName mysite.owndns.net
    ServerAlias *.mysite.owndns.net

    SSLEngine on
#    SSLCertificateFile /etc/letsencrypt/live/mysite.owndns.net/fullchain.pem
#    SSLCertificateKeyFile /etc/letsencrypt/live/mysite.owndns.net/privkey.pem

    ProxyPreserveHost On
    ProxyPass / http://localhost:8081/
    ProxyPassReverse / http://localhost:8081/
    
    ErrorLog ${APACHE_LOG_DIR}/erpnext_error.log
    CustomLog ${APACHE_LOG_DIR}/erpnext_access.log combined
SSLCertificateFile /etc/letsencrypt/live/mysite.owndns.net/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mysite.owndns.net/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>

I followed the models my colleagues gave me as working for other their services.
I hope all my answers are clear to your doubts and you can efficiently help me

Thank you for your supports @revant_one @knimer

@knimer @revant_one
I made all the correction. Now I’m in this situation:

$ sudo docker ps
CONTAINER ID   IMAGE                             COMMAND                  CREATED       STATUS                          PORTS                                                    NAMES
30eef65fe542   frappe/erpnext:latest             "nginx-entrypoint.sh"    2 hours ago   Up 2 hours                      0.0.0.0:8081->8080/tcp, [::]:8081->8080/tcp              frappe_docker-code-frontend-1
5cf5b6b83d9f   mariadb:10.6                      "docker-entrypoint.s…"   2 hours ago   Up 2 hours (healthy)            3306/tcp                                                 frappe_docker-code-db-1
74f908816c16   frappe/erpnext:latest             "bench schedule"         2 hours ago   Up 2 hours                                                                               frappe_docker-code-scheduler-1
486de0c5ca2c   frappe/erpnext:latest             "/home/frappe/frappe…"   2 hours ago   Up 2 hours                                                                               frappe_docker-code-backend-1
b135485bb478   frappe/erpnext:latest             "bench worker --queu…"   2 hours ago   Restarting (1) 11 seconds ago                                                            frappe_docker-code-queue-long-1
a0761d9a0e64   frappe/erpnext:latest             "node /home/frappe/f…"   2 hours ago   Restarting (1) 31 seconds ago                                                            frappe_docker-code-websocket-1
a978612281b7   redis:6.2-alpine                  "docker-entrypoint.s…"   2 hours ago   Up 2 hours                      6379/tcp                                                 frappe_docker-code-redis-queue-1
17120bc4f854   redis:6.2-alpine                  "docker-entrypoint.s…"   2 hours ago   Up 2 hours                      6379/tcp                                                 frappe_docker-code-redis-cache-1
95a8b15805e3   frappe/erpnext:latest             "bench worker --queu…"   2 hours ago   Restarting (1) 23 seconds ago                                                            frappe_docker-code-queue-short-1

I’ve investigated the log of frappe_docker-code-queue-long-1 and I found this errors:

redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:11311. Connection refused.

Error 111 connecting to 127.0.0.1:11311. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11311. Redis reported error: Error 111 connecting to 127.0.0.1:11311. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11311. Redis reported error: Error 111 connecting to 127.0.0.1:11311. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11311. Redis reported error: Error 111 connecting to 127.0.0.1:11311. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11311. Redis reported error: Error 111 connecting to 127.0.0.1:11311. Connection refused.
Please make sure that Redis Queue runs @ redis://127.0.0.1:11311. Redis reported error: Error 111 connecting to 127.0.0.1:11311. Connection refused.
Traceback (most recent call last):
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 357, in connect
    sock = self.retry.call_with_retry(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/retry.py", line 62, in call_with_retry
    return do()
           ^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 358, in <lambda>
    lambda: self._connect(), lambda error: self.disconnect(error)
            ^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 730, in _connect
    raise err
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 718, in _connect
    sock.connect(socket_address)
ConnectionRefusedError: [Errno 111] Connection refused

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 48, in invoke
    return super().invoke(ctx)
           ^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1697, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/scheduler.py", line 206, in start_worker
    start_worker(
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 315, in start_worker
    redis_connection = get_redis_conn(username=rq_username, password=rq_password)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/tenacity/__init__.py", line 289, in wrapped_f
    return self(f, *args, **kw)
           ^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/tenacity/__init__.py", line 379, in __call__
    do = self.iter(retry_state=retry_state)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/tenacity/__init__.py", line 325, in iter
    raise retry_exc.reraise()
          ^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/tenacity/__init__.py", line 158, in reraise
    raise self.last_attempt.result()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 449, in result
    return self.__get_result()
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/concurrent/futures/_base.py", line 401, in __get_result
    raise self._exception
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/tenacity/__init__.py", line 382, in __call__
    result = fn(*args, **kwargs)
             ^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 589, in get_redis_conn
    return get_redis_connection_without_auth()
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 611, in get_redis_connection_without_auth
    _redis_queue_conn = RedisQueue.get_connection()
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/redis_queue.py", line 36, in get_connection
    conn.ping()
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/commands/core.py", line 1212, in ping
    return self.execute_command("PING", **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/client.py", line 559, in execute_command
    return self._execute_command(*args, **options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/client.py", line 565, in _execute_command
    conn = self.connection or pool.get_connection(command_name, **options)
                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 1422, in get_connection
    connection.connect()
  File "/home/frappe/frappe-bench/env/lib/python3.11/site-packages/redis/connection.py", line 363, in connect
    raise ConnectionError(self._error_message(e))
redis.exceptions.ConnectionError: Error 111 connecting to 127.0.0.1:11311. Connection refused.

Error 111 connecting to 127.0.0.1:11311. Connection refused.

It is the same of here, as common issue but I don’t know how to solve.
I don’t know where to look for

Should I go inside a container? Which one? Which address?
Differently, if I should look on the host machine, which address?
Thanks

Frappe keeps assets in sites/assets. As soon as you bind mount, the directory becomes empty and assets need to be copied back again. You’re starting with advance setup as a beginner. Do not use bind mount. If you really need to use bind mount you’ll need to struggle more and understand permissions, nested mounting, file ownership related to container volumes.

Related: assets are not properly mounted when using CRI-O as container engine · Issue #181 · frappe/helm · GitHub

I followed your instructions and I got this:

$ sudo -i
root@mkv_wRP5:~# cd /var/lib/docker/volumes/frappe_docker-code_sites/_data
root@mkv_wRP5:/var/lib/docker/volumes/frappe_docker-code_sites/_data# ls
apps.json  apps.txt  assets  common_site_config.json
root@mkv_wRP5:/var/lib/docker/volumes/frappe_docker-code_sites/_data# cat common_site_config.json
{}
root@mkv_wRP5:/var/lib/docker/volumes/frappe_docker-code_sites/_data# cd assets
root@mkv_wRP5:/var/lib/docker/volumes/frappe_docker-code_sites/_data/assets# ls
assets.json  assets-rtl.json  css  erpnext  frappe  js	locale

So the common_site_config.json is empty. What should I write inside?
Any other settings on other files?

The folder assets is not empty: there are assets.json assets-rtl.json css erpnext frappe js locale What should I do?

As you said I’m a beginner and I’m following your guide

If configurator service completes successfully the common_site_config.json will get populated. Why did the service fail or why did it didn’t start?

I don’t know why it is not populated.
I tried to populate by myself. I edited in this way:
“{
“db_host”: “db”,
“db_port”: 3306,
“redis_cache”: “redis//:redis-cache:6379”,
“redis_queue”: “redis://redis-queue:6379”,
“redis_socketio”: “redis://redis-queue:6379”,
“socketio_port”: 9000,
“webserver_port”: 8081,
“developer_mode”: 1,
“host_name”: “mysite.owndns.net)”
}”

I set 8081 because I have the file .env like this, avoiding conflicts with other systems, as reported above with Apache:

FRAPPE_VERSION=v15.52.0

ERPNEXT_VERSION=v15.52.0

DB_PASSWORD=123

DB_HOST=db

DB_PORT=3306

REDIS_CACHE=redis-cache:6379

REDIS_QUEUE=redis-queue:6379

REDIS_SOCKETIO=redis-queue:6379

SOCKETIO_PORT=9000

LETSENCRYPT_EMAIL=info@mtpersonal.eu

FRAPPE_SITE_NAME_HEADER=mysite.owndns.net

HTTP_PUBLISH_PORT=8081

UPSTREAM_REAL_IP_ADDRESS=127.0.0.1

UPSTREAM_REAL_IP_HEADER=X-Forwarded-For

UPSTREAM_REAL_IP_RECURSIVE=off

PROXY_READ_TIMEOUT=120

CLIENT_MAX_BODY_SIZE=50m

SITES=`mysite.owndns.net` 

The only doubt is the following. In the file pwd.yml I set latest for all the image services, while in the .env file I set a version. How should I change it?

Now the restarting containers are only 3:

 $ sudo docker ps
CONTAINER ID   IMAGE                             COMMAND                  CREATED          STATUS                          PORTS                                                    NAMES
772de92ee8ad   frappe/erpnext:latest             "nginx-entrypoint.sh"    17 minutes ago   Up 17 minutes                   0.0.0.0:8081->8080/tcp, [::]:8081->8080/tcp              frappe_docker-code-frontend-1
52515b5c3af4   frappe/erpnext:latest             "node /home/frappe/f…"   17 minutes ago   Up 17 minutes                                                                            frappe_docker-code-websocket-1
0ad77926ad64   redis:6.2-alpine                  "docker-entrypoint.s…"   17 minutes ago   Up 17 minutes                   6379/tcp                                                 frappe_docker-code-redis-queue-1
f94ab8dcbbb2   mariadb:10.6                      "docker-entrypoint.s…"   17 minutes ago   Up 17 minutes (healthy)         3306/tcp                                                 frappe_docker-code-db-1
8c696979143a   frappe/erpnext:latest             "bench worker --queu…"   17 minutes ago   Restarting (1) 42 seconds ago                                                            frappe_docker-code-queue-short-1
95dee767c15c   frappe/erpnext:latest             "bench worker --queu…"   17 minutes ago   Restarting (1) 47 seconds ago                                                            frappe_docker-code-queue-long-1
2657f66f120a   frappe/erpnext:latest             "/home/frappe/frappe…"   17 minutes ago   Up 17 minutes                                                                            frappe_docker-code-backend-1
99124cb84265   frappe/erpnext:latest             "bench schedule"         17 minutes ago   Restarting (1) 42 seconds ago                                                            frappe_docker-code-scheduler-1
95038474d7c4   redis:6.2-alpine                  "docker-entrypoint.s…"   17 minutes ago   Up 17 minutes                   6379/tcp                                                 frappe_docker-code-redis-cache-1

This is the log of one of restarting container: check here
What’s the correct format on the JSON file setting for the URL on redis?

Typo here. It’s redis://