Currently we are trying to move from a self-hosted VM solution to a self-hosted Docker solution. As far as possible, I tried to follow the steps described on Github.
and
https://github.com/frappe/frappe_docker/blob/main/docs/single-bench.md
I performed:
git clone https://github.com/frappe/frappe_docker.git
cd frappe_docker
I created an .env file based on the env-local file and modified it to the following:
LETSENCRYPT_EMAIL=email@example.com
ERPNEXT_VERSION=version-12
FRAPPE_VERSION=version-12
MARIADB_HOST=mariadb
MYSQL_ROOT_PASSWORD=9GOxGgRD0o8CjV6zDOwp
SITE_NAME=erpnext-nginx
SITES=`erpnext-nginx`
DB_ROOT_USER=root
ADMIN_PASSWORD=AdminErpNext
INSTALL_APPS=erpnext
ENTRYPOINT_LABEL=traefik.http.routers.erpnext-nginx.entrypoints=web
CERT_RESOLVER_LABEL=erpnext.local.no-cert-resolver
HTTPS_REDIRECT_RULE_LABEL=erpnext.local.no-redirect-rule
HTTPS_REDIRECT_ENTRYPOINT_LABEL=erpnext.local.no-entrypoint
HTTPS_REDIRECT_MIDDLEWARE_LABEL=erpnext.local.no-middleware
HTTPS_USE_REDIRECT_MIDDLEWARE_LABEL=erpnext.local-no-redirect-middleware
SKIP_NGINX_TEMPLATE_GENERATION=0
WORKER_CLASS=gthread
I had to change the site_name to āerpnext_nginxā to be able to access our server using an internal IP address (our server is for internal use only).
For the same reason I have added the following to the Docker compose file (How can I make erp available in LAN, deployed with docker? - #18 by revant_one):
- "traefik.http.routers.erpnext-nginx.rule=HostRegexp(`{catchall:.*}`)"
- "traefik.http.middlewares.erpnext-nginx.headers.customrequestheaders.Ho\
st=erpnext-nginx"
- "traefik.http.routers.erpnext-nginx.middlewares=erpnext-nginx"
Then I execute the following command
docker-compose --project-name erpnext up -d
And then the following command to check the progress:
docker logs erpnext_site-creator_1 -f
This works and when this is finished, Iām able to access my brand-new ERP instance by browsing to our server IP.
Then I tried to install one of our custom apps called āRepairs and Supportā. What I did:
In the .env file change
INSTALL_APPS=erpnext
To
INSTALL_APPS=erpnext,repairs_and_support
When this is changed, I follow the steps described in https://github.com/frappe/frappe_docker/blob/main/docs/custom-apps-for-production.md until the sentence:
Open up ./installation/docker-compose-custom.yml and replace all instances of [app] with the name of your app.
Because we donāt have Git server or Github account, Iāve copied our app sources to our server to: ā/opt/erpnext_appsā. This path is also used in both Docker files
RUN /install_app repairs_and_support /opt/erpnext_apps/repairs_and_support
But unfortunately, I get an app not found error. Iāve tried a lot, but without successā¦ What am I doing wrong? Thanks in advance!
Attempt 1 to connect to mariadb:3306
Attempt 1 to connect to redis-queue:6379
Attempt 1 to connect to redis-cache:6379
Attempt 1 to connect to redis-socketio:6379
Connections OK
Created user _285132e2c34995ba
Created database _285132e2c34995ba
Granted privileges to user _285132e2c34995ba and database _285132e2c34995ba
Starting database import...
Imported from database /home/frappe/frappe-bench/apps/frappe/frappe/database/mariadb/framework_mariadb.sql
Installing frappe...
Updating DocTypes for frappe : [========================================]
Updating country info : [========================================]
Installing erpnext...
Updating DocTypes for erpnext : [========================================]
Updating customizations for Address
Could not find app "repairs_and_support"