Errors with deployment using custom_frappe_docker

Hi,

I’ve been trying to use the repository of castlecraft/custom_frappe_docker to try to setup an image of erpnext with a custom app in a remote ubuntu server. I tested before a docker single-bench installation from this guide with the help of these guidelines of the forum to be able to access my installation by server ip, and was able to get it working.
Now I was trying to install it with the custom app I developed and after many missed attempts using the custom-apps-for-production guidelines I’m trying the castlecraft/custom_frappe_docker although I stumbled across these warnings/errors:

While running docker build --build-arg=FRAPPE_BRANCH=version-12 -t custom-erpnext-nginx:v12 nginx:

and while running docker-compose up -d (after running docker build --build-arg=FRAPPE_BRANCH=version-12 -t custom-erpnext-nginx:v12 nginx and docker build --build-arg=FRAPPE_BRANCH=version-12 -t custom-erpnext-worker:v12 worker):

Here are the changes I made to the files:
env-example


nginx/Dockerfile

worker/Dockerfile

and added these three lines signaled by a red dot in the docker-compose

Did I do something wrong with my changes?

Edit:

I managed to get it working by running the commands proposed for edge here, just needed to add a mariadb entry on the depends_on of site-creator in the docker-compose to fix an error. Still had the same warnings on the docker build of nginx

By looking at the warnings, it seems build is not respecting FRAPPE_BRANCH, the new static assets build system is part of develop branch.

In develop branch the build output is represented like a tree.

In v13(today) and v12 the output is a list of

:heavy_check_mark: filename.min.js
:heavy_check_mark: filename.min.js
:heavy_check_mark: filename.min.js

I updated the castlecraft/custom_frappe_docker repo.

Try now, check README, It should now build for version-12 and version-13 branch.

Thanks a lot for your help!! I don’t know if you have the same issue, but I had to add to nginx/Dockerfile these two lines before the first RUN:
RUN apt-get update
RUN apt-get -y install git
because I was having this issue:

You can make that into 1 layer,

RUN apt-get update && apt-get install -y git

Thanks for the suggestion. Sorry to bother again but I deleted my edge installation to change try version-13 and while it did remove most of the warnings it had before, it seems to crash with an “invalid reference format”:


I’m guessing it’s due to the addition of the “${FRAPPE_BRANCH}” argument to “\install_frappe” in the nginx/Dockerfile.

ARG FRAPPE_BRANCH=develop must be there 2 times like this

You were absolutely right! I was missing the first line. Although the docker-compose ended up with the same error as before:

List your docker images

docker images

custom-erpnext-nginx:latest must exist. It is trying to pull the image.

Here is the result of running ‘docker images’:

you don’t have custom-erpnext-nginx:latest.

you have custom-erpnext-nginx:v13

change the docker-compose / VERSION variable

I’m sorry for my confusion but where should I change that? The .env file already has ‘ERPNEXT_VERSION=latest’ and the docker-compose has below ‘custom-erpnext-nginx’ the image set as ‘custom-erpnext-nginx:${ERPNEXT_VERSION}’. What version variable should I change?

Set in your .env file

ERPNEXT_VERSION=v13
FRAPPE_VERSION=v13
...

That worked great!! Thanks!!
I don’t know if it’s appropriate to also ask in this thread but inside my custom app I have a nodejs app I build according to the guidelines discussed in this thread and at the time I changed the Procfile in my development installation to make it start with my system. From what I understood, in a production environment I should change the file supervisor.conf but after navigating the docker containers through bash I’m not finding it. Can you point me in the right direction to where to find or where to create that file?

For this you also need to build additional docker image.

It’ll be built like image of nodejs app which runs on some port. https://nodejs.org/en/docs/guides/nodejs-docker-webapp/

Then you need to set the SKIP_NGINX_TEMPLATE_GENERATION environment variable of nginx image to 1, and provide a custom nginx config that also reverse proxy your custom nodejs app.

More here: https://github.com/frappe/frappe_docker/blob/develop/docs/environment-variables.md#frappe-nginx-and-erpnext-nginx

Create a new one. “How to setup custom non-python app using docker containers”

Thanks a lot for your help!!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.