question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Problem with creating custom erpnext_documentation docker-compose

See original GitHub issue

Description of the issue

Hi,

i would like to get Home page of erpnext_documentation as it is described here.

The problem is that when i login to my site, i got home page “Login to Frappe”.

Steps to reproduce the issue

my docker-compose:

version: "3.7"
services:
  erp-doc:
    image: erp-nginx
    command: sleep infinity
    environment:
      - FRAPPE_PY=erpnext-python
      - FRAPPE_PY_PORT=8000
      - FRAPPE_SOCKETIO=frappe-socketio
      - SOCKETIO_PORT=9000
    volumes:
      - ./sites:/var/www/html/sites:rw
      - ./assets:/assets:rw
    ports:
      - "8050:80"

  erpnext-python:
    image: erp-worker
    restart: on-failure
    environment:
      - MARIADB_HOST=mariadb
      - REDIS_CACHE=redis-cache:6379
      - REDIS_QUEUE=redis-queue:6379
      - REDIS_SOCKETIO=redis-socketio:6379
      - SOCKETIO_PORT=9000
      - AUTO_MIGRATE=1
    volumes:
      - ./sites:/home/frappe/frappe-bench/sites:rw
      - ./assets:/home/frappe/frappe-bench/sites/assets:rw

  mariadb:
    image: mariadb:10.3
    restart: on-failure
    environment:
      - MYSQL_ROOT_PASSWORD=123
    volumes:
      - ./frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
      - ./mariadb:/var/lib/mysql

  frappe-socketio:
    image: frappe/frappe-socketio:develop
    restart: on-failure
    depends_on:
      - redis-socketio
    volumes:
      - ./sites:/home/frappe/frappe-bench/sites:rw

  erpnext-schedule:
    image: erp-worker
    restart: on-failure
    command: schedule
    depends_on:
      - redis-queue
      - redis-cache
    volumes:
      - ./sites:/home/frappe/frappe-bench/sites:rw
      - ./logs:/home/frappe/frappe-bench/logs:rw

  erpnext-worker-long:
    image: erp-worker
    restart: on-failure
    command: worker
    environment:
      - WORKER_TYPE=long
    depends_on:
      - redis-queue
      - redis-cache
    volumes:
      - ./sites:/home/frappe/frappe-bench/sites:rw

  erpnext-worker-short:
    image: erp-worker
    restart: on-failure
    command: worker
    environment:
      - WORKER_TYPE=short
    depends_on:
      - redis-queue
      - redis-cache
    volumes:
      - ./sites:/home/frappe/frappe-bench/sites:rw
      - ./logs:/home/frappe/frappe-bench/logs:rw

  erpnext-worker-default:
    image: erp-worker
    restart: on-failure
    command: worker
    depends_on:
      - redis-queue
      - redis-cache
    volumes:
      - ./sites:/home/frappe/frappe-bench/sites:rw
      - ./logs:/home/frappe/frappe-bench/logs:rw


  redis-cache:
    image: redis:latest
    restart: on-failure

  redis-queue:
    image: redis:latest
    restart: on-failure

  redis-socketio:
    image: redis:latest
    restart: on-failure

  # site-creator:
  #   image: erp-worker
  #   restart: "no"
  #   command: new
  #   depends_on:
  #     - erpnext-python
  #   environment:
  #     - SITE_NAME=erpdoc.mydomain.com
  #     - DB_ROOT_USER=root
  #     - MYSQL_ROOT_PASSWORD=123
  #     - ADMIN_PASSWORD=admin
  #     - INSTALL_APPS=erpnext_documentation
  #   volumes:
  #     - ./sites:/home/frappe/frappe-bench/sites:rw

erp-nginx image created from Dockerfile erp-worker image created from Dockerfile

So, i run once site-creator container to create new site. Then opened page erpdoc.mydomain.com and got Login to Frappe instead of erpnext_documentation page.

Btw. when i run docker-compose up firstly i got 500 Internal Server Error when tried to login erpdoc.mydomain.com, i noticed that inside erp-doc container service nginx status is nginx is not running so manually start it using command nginx.

I tried also login to erpnext-python container and run install_app frappe_theme https://github.com/frappe/frappe_theme bench --site erpdoc.mydomain.com install_app erpnext_documentation bench --site erpdoc.mydomain.com migrate

but still got only Frappe Login Page. What im doing wrong?

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
revantcommented, Apr 23, 2021

Read the docs, development needs site names to be anything.localhost

https://github.com/frappe/frappe_docker/tree/develop/development#create-a-new-site-with-bench

1reaction
Ciangicommented, Apr 20, 2021

docker-compose.yml:

version: "3.7"
services:
  mariadb:  
    image: mariadb:10.3
    environment:
      - MYSQL_ROOT_PASSWORD=123
      - MYSQL_USER=root
    volumes:
      - ./frappe-mariadb.cnf:/etc/mysql/conf.d/frappe.cnf
      - ./db:/var/lib/mysql

  redis-cache:
    image: redis:alpine

  redis-queue:
    image: redis:alpine

  redis-socketio:
    image: redis:alpine

  frappe:
    image: frappe/bench:latest
    command: sleep infinity
    volumes:
      - ./workspace:/workspace:cached
    working_dir: /workspace/development
    ports:
      - "8050:8000"
      - "9050:9000"

inside frappe container:

history:

   bench init --skip-redis-config-generation --frappe-branch version-12 frappe-bench
   cd frappe-bench/
   bench set-mariadb-host mariadb
   bench set-redis-cache-host redis-cache:6379
   bench set-redis-queue-host redis-queue:6379
   bench set-redis-socketio-host redis-socketio:6379
   sed -i '/redis/d' ./Procfile
   bench get-app https://github.com/frappe/erpnext_documentation
   bench get-app frappe_theme
   bench start

As is is written here i run bench start and opened new tab in frappe container and run:

bench new-site erp.mydomain.com
bench --site erp.mydomain.com install-app erpnext_documentation

Then tried to open page erp.mydomain.com and still Frappe login page.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Requesting Method to Correctly Add Custom App to Docker ...
Has anyone successfully installed a custom app onto a running deployment of erpnext on docker using the official documentation (docker-compose ...
Read more >
version 14 - Install officials custom apps · Issue #876 - GitHub
I saw this custom app doc, but it seems targeting how to build our ... docker compose --project-name erpnext exec backend bench get-app...
Read more >
0 - Stack Overflow
frappe /erpnext-nginx image is not setup for independent use. You have to use it along with other services that are present in frappe_docker....
Read more >
Docker Compose - n8n Documentation
1. Install Docker# · 2. Optional: Non-root user access# · 3. Install Docker-Compose# · 4. DNS setup# · 5. Create docker-compose file# ·...
Read more >
Basic coding guide for Frappe - ERPNext: Part 1 - Medium
My hope is that the document will improve with comments and time… ... in ERPNext and Frappé Framework: Scripting; Custom scripts; Creating an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found