Giter VIP home page Giter VIP logo

frappe_docker's Introduction

Build Stable Build Develop

Everything about Frappe and ERPNext in containers.

Getting Started

To get started you need Docker, docker-compose, and git setup on your machine. For Docker basics and best practices refer to Docker's documentation. After that, clone this repo:

git clone https://github.com/frappe/frappe_docker
cd frappe_docker

Try in Play With Docker

Try in PWD

Wait for 5 minutes for ERPNext site to be created or check create-site container logs before opening browser on port 8080. (username: Administrator, password: admin)

Documentation

Contributing

If you want to contribute to this repo refer to CONTRIBUTING.md

This repository is only for container related stuff. You also might want to contribute to:

frappe_docker's People

Contributors

africlouds avatar antony-m1 avatar aynugek avatar ceefour avatar chabad360 avatar christf avatar codingcoffee avatar ddavidebor avatar dependabot[bot] avatar everyx avatar fhenry avatar girip11 avatar github-actions[bot] avatar mr-karan avatar muniter avatar peterdavehello avatar pratikbin avatar resourcefactor avatar restlessronin avatar revant avatar sahil28297 avatar sdfateh avatar sunhoww avatar surajshetty3416 avatar tbolender avatar thunderbottom avatar vishalseshagiri avatar vorasmit avatar vrslev avatar websitedeveloper avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

frappe_docker's Issues

Upgrade instructions

Hi there,

Thanks a lot for making an official docker image with compose instructions! I've been using my own version so far based on previous discussions on the forum and I'd like to migrate to this one.

One of the things that have been tricky so far has been to update to new versions of erpnext. Is there a recommended way to upgrade, ideally with the docker way i.e. by upgrading the relevant containers and letting the entrypoint run the upgrades. Could you post instructions on the README about this?

Very best,

Jun

Readme improvement

The following command does not work actually (inside docker container):

cd ..
bench init --skip-bench-mkdir --skip-redis-config-generation frappe-bench && cd frappe-bench

It seems that access to some directories requires root permissions ...

Error: TypeError: a bytes-like object is required, not 'list'

After downgrade erpnext and frappe to v10.x.x, I'm getting this issue on bench update:

➜  frappe_docker git:(master) ✗ ./dbench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python3.5/site-packages (5.3.0)
Backing up sites...
INFO:bench.app:pulling frappe
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/v10.x.x
HEAD is now at c3a8454fb fix(security): Precautions to limit SSTI and SQLi (#8047)
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git fetch --all
Fetching upstream
INFO:bench.utils:git reset --hard upstream/v10.x.x
HEAD is now at e269aa9781 fix(bin): update requested qty in bin (#18314)
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python3.5/site-packages (19.2.3)
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/src/bench/requirements.txt
INFO:bench.app:installing frappe
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/frappe 
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/erpnext 
Updating node packages...
INFO:bench.utils:npm install
npm WARN frappe@ No description
npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

audited 3555 packages in 3.423s
found 1 low severity vulnerability
  run `npm audit fix` to fix them, or `npm audit` for details
Patching sites...
Migrating site1.local
Traceback (most recent call last):
  File "/usr/lib/python3.5/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 222, in migrate
    migrate(context.verbose, rebuild_website=rebuild_website)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/migrate.py", line 41, in migrate
    frappe.model.sync.sync_all(verbose=verbose)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/sync.py", line 16, in sync_all
    block_user(True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/modules/patch_handler.py", line 118, in block_user
    frappe.db.set_global('__session_status', block and 'stop' or None)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 726, in set_global
    self.set_default(key, val, user)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 734, in set_default
    frappe.defaults.set_default(key, val, parent, parenttype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 109, in set_default
    add_default(key, value, parent)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/defaults.py", line 120, in add_default
    d.insert(ignore_permissions=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 210, in insert
    self._set_defaults()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 584, in _set_defaults
    new_doc = frappe.new_doc(self.doctype, as_dict=True)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 614, in new_doc
    return get_new_doc(doctype, parent_doc, parentfield, as_dict=as_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 20, in get_new_doc
    frappe.local.new_doc_templates[doctype] = make_new_doc(doctype)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 41, in make_new_doc
    set_user_and_static_default_values(doc)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/create_new.py", line 51, in set_user_and_static_default_values
    user_permissions = get_user_permissions()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user_permission/user_permission.py", line 67, in get_user_permissions
    fields=['allow', 'for_value'], filters=dict(user=user)):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1177, in get_all
    return get_list(doctype, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 1150, in get_list
    return frappe.model.db_query.DatabaseQuery(doctype).execute(None, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 90, in execute
    result = self.build_and_run()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 102, in build_and_run
    args = self.prepare_args()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 125, in prepare_args
    self.build_conditions()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 310, in build_conditions
    self.build_filter_conditions(self.filters, self.conditions)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 331, in build_filter_conditions
    conditions.append(self.prepare_filter_condition(f))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/db_query.py", line 402, in prepare_filter_condition
    value = '"{0}"'.format(frappe.db.escape(value, percent=False))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/database.py", line 911, in escape
    s = text_type(pymysql.escape_string(s), "utf-8").replace("`", "\\`")
  File "/home/frappe/frappe-bench/env/lib/python3.5/site-packages/pymysql/converters.py", line 73, in _escape_unicode
    return value.translate(_escape_table)
TypeError: a bytes-like object is required, not 'list'

Error : Cannot start "bench start"

Hi,

After follow instruction all the way through to "bench start", I got following error.

frappe@df128f9567d1:~/frappe-bench$ bench --site site1.local install-app erpnext
Installing erpnext...
Updating DocTypes for erpnext       : [========================================]



frappe@df128f9567d1:~/frappe-bench$ bench start
2017-11-22 02:45:17 [719] [WARNING] Your terminal is not configured to receive UTF-8 encoded text. Please adjust your locale settings or force UTF-8 output by setting P
YTHONIOENCODING="utf-8".
02:45:18 system           | worker_long.1 started (pid=738)
02:45:18 system           | web.1 started (pid=743)
02:45:18 system           | watch.1 started (pid=742)
02:45:18 system           | worker_default.1 started (pid=744)
02:45:18 system           | worker_short.1 started (pid=746)
02:45:18 system           | socketio.1 started (pid=745)
02:45:18 system           | schedule.1 started (pid=747)
02:45:19 web.1            | Usage: bench [OPTIONS] COMMAND [ARGS]...
02:45:19 web.1            |
02:45:19 web.1            | Error: No such command "serve".
02:45:19 worker_long.1    | Usage: bench [OPTIONS] COMMAND [ARGS]...
02:45:19 worker_long.1    |
02:45:19 worker_long.1    | Error: No such command "worker".
02:45:19 watch.1          | Usage: bench [OPTIONS] COMMAND [ARGS]...
02:45:19 watch.1          |
02:45:19 watch.1          | Error: No such command "watch".
02:45:19 system           | web.1 stopped (rc=2)
02:45:19 system           | sending SIGTERM to worker_long.1 (pid 738)
02:45:19 system           | sending SIGTERM to watch.1 (pid 742)
02:45:19 system           | sending SIGTERM to schedule.1 (pid 747)
02:45:19 system           | sending SIGTERM to worker_default.1 (pid 744)
02:45:19 system           | sending SIGTERM to socketio.1 (pid 745)
02:45:19 system           | sending SIGTERM to worker_short.1 (pid 746)
02:45:19 system           | socketio.1 stopped (rc=-15)
02:45:19 system           | worker_default.1 stopped (rc=-15)
02:45:19 system           | worker_short.1 stopped (rc=-15)
02:45:19 system           | watch.1 stopped (rc=-15)
02:45:19 system           | schedule.1 stopped (rc=-15)
02:45:19 system           | worker_long.1 stopped (rc=-15)

I've tried "bench update"

frappe@df128f9567d1:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull  upstream develop
From https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
INFO:bench.utils:find . -name "*.pyc" -delete
INFO:bench.app:pulling erpnext
INFO:bench.utils:git pull  upstream develop
From https://github.com/frappe/erpnext
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
INFO:bench.utils:find . -name "*.pyc" -delete
Updating Python libraries...
INFO:bench.utils:./env/bin/pip install --upgrade pip
Requirement already up-to-date: pip in ./env/lib/python2.7/site-packages
INFO:bench.utils:./env/bin/pip install -q -r /home/frappe/bench-repo/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/erpnext/requirements.txt
INFO:bench.utils:./env/bin/pip install -q -r ./apps/frappe/requirements.txt
Updating node libraries...
INFO:bench.utils:npm install
npm WARN optional Skipping failed optional dependency /chokidar/fsevents:
npm WARN notsup Not compatible with your operating system or architecture: [email protected]
npm WARN frappe@ No description
Backing up sites...
Patching sites...
Migrating site1.local
Updating DocTypes for frappe        : [========================================]
Updating DocTypes for erpnext       : [========================================]
Syncing help database...
Wrote css/frappe-web.css - 65.11 KB
Wrote js/frappe-web.min.js - 132.05 KB
Wrote js/control.min.js - 72.03 KB
Wrote js/dialog.min.js - 116.34 KB
Wrote css/desk.min.css - 309.44 KB
Wrote css/frappe-rtl.css - 32.49 KB
Wrote js/libs.min.js - 1.13 MB
Wrote js/desk.min.js - 459.7 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 195.7 KB
Wrote css/list.min.css - 15.04 KB
Wrote js/list.min.js - 149.61 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 259.97 KB
Wrote js/web_form.min.js - 247.55 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
Wrote css/erpnext.css - 8 KB
Wrote js/erpnext-web.min.js - 3.79 KB
Wrote js/erpnext.min.js - 152.21 KB
Wrote js/item-dashboard.min.js - 7.86 KB
________________________________________________________________________________
Bench: Deployment tool for Frappe and ERPNext (https://erpnext.org).
Open source depends on your contributions, so please contribute bug reports, patches, fixes or cash and be a part of the community
()



frappe@df128f9567d1:~/frappe-bench$ bench start
2017-11-22 03:01:29 [1087] [WARNING] Your terminal is not configured to receive UTF-8 encoded text. Please adjust your locale settings or force UTF-8 output by setting PYTHONIOENCODING="utf-8".
03:01:29 system           | web.1 started (pid=1110)
03:01:29 system           | watch.1 started (pid=1115)
03:01:29 system           | worker_long.1 started (pid=1106)
03:01:29 system           | schedule.1 started (pid=1112)
03:01:29 system           | worker_default.1 started (pid=1111)
03:01:29 system           | socketio.1 started (pid=1113)
03:01:29 system           | worker_short.1 started (pid=1114)
03:01:30 schedule.1       | Usage: bench [OPTIONS] COMMAND [ARGS]...
03:01:30 schedule.1       |
03:01:30 schedule.1       | Error: No such command "schedule".
03:01:30 system           | schedule.1 stopped (rc=2)
03:01:30 system           | sending SIGTERM to worker_long.1 (pid 1106)
03:01:30 system           | sending SIGTERM to watch.1 (pid 1115)
03:01:31 system           | sending SIGTERM to web.1 (pid 1110)
03:01:31 system           | sending SIGTERM to worker_default.1 (pid 1111)
03:01:31 system           | sending SIGTERM to socketio.1 (pid 1113)
03:01:31 system           | sending SIGTERM to worker_short.1 (pid 1114)
03:01:31 system           | watch.1 stopped (rc=-15)
03:01:31 system           | worker_long.1 stopped (rc=-15)
03:01:31 system           | web.1 stopped (rc=-15)
03:01:31 system           | socketio.1 stopped (rc=-15)
03:01:31 system           | worker_default.1 stopped (rc=-15)
03:01:31 system           | worker_short.1 stopped (rc=-15)



frappe@df128f9567d1:~/frappe-bench$ bench start
2017-11-22 03:02:24 [1169] [WARNING] Your terminal is not configured to receive UTF-8 encoded text. Please adjust your locale settings or force UTF-8 output by setting PYTHONIOENCODING="utf-8".
03:02:25 system           | socketio.1 started (pid=1193)
03:02:25 system           | worker_short.1 started (pid=1194)
03:02:25 system           | watch.1 started (pid=1189)
03:02:25 system           | web.1 started (pid=1197)
03:02:25 system           | worker_long.1 started (pid=1186)
03:02:25 system           | worker_default.1 started (pid=1195)
03:02:25 system           | schedule.1 started (pid=1196)
03:02:26 worker_default.1 | Usage: bench [OPTIONS] COMMAND [ARGS]...
03:02:26 worker_default.1 |
03:02:26 schedule.1       | Usage: bench [OPTIONS] COMMAND [ARGS]...
03:02:26 schedule.1       |
03:02:26 schedule.1       | Error: No such command "schedule".
03:02:26 watch.1          | Usage: bench [OPTIONS] COMMAND [ARGS]...
03:02:26 watch.1          |
03:02:26 watch.1          | Error: No such command "watch".
03:02:26 worker_default.1 | Error: No such command "worker".
03:02:26 worker_long.1    | Usage: bench [OPTIONS] COMMAND [ARGS]...
03:02:26 worker_long.1    |
03:02:26 worker_long.1    | Error: No such command "worker".
03:02:26 system           | schedule.1 stopped (rc=2)
03:02:26 system           | sending SIGTERM to worker_long.1 (pid 1186)
03:02:26 system           | sending SIGTERM to watch.1 (pid 1189)
03:02:26 system           | sending SIGTERM to web.1 (pid 1197)
03:02:26 system           | sending SIGTERM to worker_default.1 (pid 1195)
03:02:26 system           | sending SIGTERM to socketio.1 (pid 1193)
03:02:26 system           | sending SIGTERM to worker_short.1 (pid 1194)
03:02:26 system           | watch.1 stopped (rc=2)
03:02:26 system           | worker_long.1 stopped (rc=-15)
03:02:26 system           | web.1 stopped (rc=-15)
03:02:26 system           | worker_default.1 stopped (rc=-15)
03:02:26 system           | socketio.1 stopped (rc=-15)
03:02:26 system           | worker_short.1 stopped (rc=-15)

I also tried init new bench and copy Procfile and common_site_config.json from frappe_docker.

frappe@df128f9567d1:~/bench02$ bench start
2017-11-22 03:27:20 [2636] [WARNING] Your terminal is not configured to receive UTF-8 encoded text. Please adjust your locale settings or force UTF-8 output by setting PYTHONIOENCODING="utf-8".
03:27:21 system           | watch.1 started (pid=2665)
03:27:21 system           | redis_cache.1 started (pid=2664)
03:27:21 redis_cache.1    | /bin/sh: 1: redis-server: not found
03:27:21 system           | redis_cache.1 stopped (rc=127)
03:27:21 system           | worker_short.1 started (pid=2666)
03:27:21 system           | socketio.1 started (pid=2662)
03:27:21 system           | schedule.1 started (pid=2667)
03:27:21 system           | redis_queue.1 started (pid=2663)
03:27:21 redis_queue.1    | /bin/sh: 1: redis-server: not found
03:27:21 system           | redis_queue.1 stopped (rc=127)
03:27:21 system           | redis_socketio.1 started (pid=2655)
03:27:21 redis_socketio.1 | /bin/sh: 1: redis-server: not found
03:27:21 system           | redis_socketio.1 stopped (rc=127)
03:27:21 system           | worker_long.1 started (pid=2670)
03:27:21 system           | web.1 started (pid=2668)
03:27:21 system           | worker_default.1 started (pid=2669)
03:27:21 system           | sending SIGTERM to worker_long.1 (pid 2670)
03:27:21 system           | sending SIGTERM to watch.1 (pid 2665)
03:27:21 system           | sending SIGTERM to web.1 (pid 2668)
03:27:21 system           | sending SIGTERM to schedule.1 (pid 2667)
03:27:21 system           | sending SIGTERM to worker_default.1 (pid 2669)
03:27:21 system           | sending SIGTERM to socketio.1 (pid 2662)
03:27:21 system           | sending SIGTERM to worker_short.1 (pid 2666)
03:27:21 system           | worker_default.1 stopped (rc=-15)
03:27:21 system           | web.1 stopped (rc=-15)
03:27:21 system           | schedule.1 stopped (rc=-15)
03:27:21 system           | worker_long.1 stopped (rc=-15)
03:27:21 system           | watch.1 stopped (rc=-15)
03:27:21 system           | worker_short.1 stopped (rc=-15)
03:27:21 system           | socketio.1 stopped (rc=-15)

I'm using Docker Version 17.09.0-ce-win33 (13620) on Windows 10 Pro Version 1703 OS Build 15063.726

Installing: Creation... failed because MariaDB is not properly configured

bench new-site fails:

frappe@caea5a75bc52:~/frappe-bench/frappe-bench$ bench new-site site1.local
MySQL root password:
================================================================================
Creation of your site - site1.local failed because MariaDB is not properly
configured to use the Barracuda storage engine.
Please add the settings below to MariaDB's my.cnf, restart MariaDB then
run `bench new-site site1.local` again.


[mysqld]
innodb-file-format=barracuda
innodb-file-per-table=1
innodb-large-prefix=1
character-set-client-handshake = FALSE
character-set-server = utf8mb4
collation-server = utf8mb4_unicode_ci

[mysql]
default-character-set = utf8mb4

================================================================================

urllib3 1.23 error

/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/requests/init.py:80: RequestsDependencyWarning: urllib3 (1.23) or chardet (3.0.4) doesn't match a supported version!
RequestsDependencyWarning)

Docker swarm and links

As of right now, the current compose file doesn't work too well with docker swarm for a few reasons, mainly because it uses Compose File Version 2, not Version 3, and because it uses links. I have tried removing the links, but then frappe keeps crashing during setup. Does someone know what we need links for?

[BUG]No module named traceback, when I finish the ERPNexts setting

03:35:27 web.1 | 123.124.147.122 - - [02/Jul/2019 03:35:27] "POST /api/method/erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts.validate_bank_account HTTP/1.1" 200 -
03:35:27 web.1 | INFO:werkzeug:123.124.147.122 - - [02/Jul/2019 03:35:27] "POST /api/method/erpnext.accounts.doctype.account.chart_of_accounts.chart_of_accounts.validate_bank_account HTTP/1.1" 200 -
03:35:31 worker_default.1 | 03:35:31 default: frappe.utils.background_jobs.execute_job(event=None, is_async=True, job_name=u'frappe.core.doctype.user.user.update_gravatar', kwargs={'name': u'[email protected]'}, method=u'frappe.core.doctype.user.user.update_gravatar', site='site1.local', user=u'Administrator') (1bef8aa7-fbde-4a5e-9f97-65036d8e1476)
03:35:49 web.1 | * Detected change in '/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/operations/taxes_setup.pyc', reloading
03:35:49 web.1 | INFO:werkzeug: * Detected change in '/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/operations/taxes_setup.pyc', reloading
03:35:49 web.1 | * Detected change in '/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/operations/taxes_setup.pyc', reloading
03:35:49 web.1 | INFO:werkzeug: * Detected change in '/home/frappe/frappe-bench/apps/erpnext/erpnext/setup/setup_wizard/operations/taxes_setup.pyc', reloading
03:35:50 web.1 | ----------------------------------------
03:35:50 web.1 | Exception happened during processing of request from ('123.124.147.122', 56481)
03:35:50 web.1 | Exception in thread Thread-18 (most likely raised during interpreter shutdown):
03:35:50 web.1 | Traceback (most recent call last):
03:35:50 web.1 | File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
03:35:50 web.1 | File "/usr/lib/python2.7/threading.py", line 754, in run
03:35:50 web.1 | File "/usr/lib/python2.7/SocketServer.py", line 599, in process_request_thread
03:35:50 web.1 | File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 747, in handle_error
03:35:50 web.1 | File "/usr/lib/python2.7/SocketServer.py", line 350, in handle_error
03:35:50 web.1 | <type 'exceptions.ImportError'>: No module named traceback
03:35:50 web.1 | * Restarting with inotify reloader
03:35:50 worker_default.1 | 03:35:50 default: Job OK (1bef8aa7-fbde-4a5e-9f97-65036d8e1476)
03:35:50 worker_default.1 | 03:35:50 Result is kept for 500 seconds
03:35:51 worker_default.1 | 03:35:51 default: frappe.utils.background_jobs.execute_job(event=None, is_async=True, job_name=u'frappe.core.doctype.user.user.update_gravatar', kwargs={'name': u'[email protected]'}, method=u'frappe.core.doctype.user.user.update_gravatar', site='site1.local', user=u'Administrator') (c55e7949-05d2-4260-946a-a7eacfe68ad4)
03:35:51 worker_default.1 | 03:35:51 default: Job OK (c55e7949-05d2-4260-946a-a7eacfe68ad4)
03:35:51 worker_default.1 | 03:35:51 Result is kept for 500 seconds

image

404 with wkhtmltopdf

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libgbm1_17.0.7-0ubuntu0.16.04.2_amd64.deb  404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/m/mesa/libegl1-mesa_17.0.7-0ubuntu0.16.04.2_amd64.deb  404  Not Found [IP: 91.189.88.162 80]

E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/c/cups/libcups2_2.1.3-4ubuntu0.3_amd64.deb  404  Not Found [IP: 91.189.88.162 80]

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Solved by replacing
RUN apt-get update
With
RUN apt-get update -y && apt-get upgrade -y
in ./Dockerfile

Readme - Administrator password / setup

I might've missed something, although I tried twice. I wasn't prompted for a password while setting up the new site, and wasn't able to login to ERPNext, or go through the setup.

Unable to install erpnext docker version

We tried to install erpnext using docker version but we are getting below error while running the below command,

/opt/frappe_docker$ ./dbench init
WARN: Command not being executed in bench directory
INFO:bench.utils:virtualenv -q env -p /usr/bin/python3
Not overwriting existing python script /home/frappe/frappe-bench/env/bin/python (you must use /home/frappe/frappe-bench/env/bin/python3)
INFO:bench.utils:env/bin/pip -q install --upgrade pip
INFO:bench.utils:env/bin/pip -q install wheel
INFO:bench.utils:env/bin/pip -q install six
INFO:bench.utils:env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
ERROR: frappe 12.1.0 has requirement pdfkit==0.6.1, but you'll have pdfkit 0.5.0 which is incompatible.
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone https://github.com/frappe/frappe.git --depth 1 --origin upstream
fatal: destination path 'frappe' already exists and is not an empty directory.
Traceback (most recent call last):
File "/usr/local/bin/bench", line 11, in
load_entry_point('bench', 'console_scripts', 'bench')()
File "/src/bench/bench/cli.py", line 40, in cli
bench_command()
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 764, in call
return self.main(*args, **kwargs)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/src/bench/bench/commands/make.py", line 31, in init
python = python)
File "/src/bench/bench/utils.py", line 99, in init
get_app(frappe_path, branch=frappe_branch, bench_path=path, skip_assets=True, verbose=verbose)
File "/src/bench/bench/app.py", line 125, in get_app
cwd=os.path.join(bench_path, 'apps'))
File "/src/bench/bench/utils.py", line 185, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git clone https://github.com/frappe/frappe.git --depth 1 --origin upstream
mv: cannot stat 'Procfile_docker': No such file or directory

frappe-assets should be renamed

frappe-assets/erpnext-assets name is incorrect, as the container does not only serve static assets, but it also proxies request. This is very confusing. I recommend renaming "assets" to "webserver"

[Proposal] Docker based deployment for production

Goals

  • Immutable image(s) with locked dependencies for version
  • Quick pull and deploy production
  • One deployment is one frappe-bench
  • Deployment supports multi-tenancy like frappe-bench

Proposal

  • build images in docker image repo
    • python image has python venv that runs the bench serve process
      • mounts sites from host in docker container of this image at /home/frappe/frappe-bench/sites
      • mounts asset-vol in container at /home/frappe/frappe-bench/sites/assets
    • static assets image
      • mounts sites from host in docker container at /var/www/html/sites
      • mounts assets-vol from host to /assets in container.
      • Static asset container rsync asset to python container on boot
  • Images for
    • frappe-socketio (common for other distributions)
    • frappe-python
    • erpnext-python
    • erpnext-com-python
    • ...-python (other official python apps and dependencies)
    • frappe-assets
    • erpnext-assets
    • erpnext-com-assets
    • ...-python (other official html/css/js assets)
  • Travis job that runs every day to check, build and push docker images to docker hub
  • Update documentation for Docker based production
  • click app for use in docker and on docker hosts (optional)
    • in docker container: call frappe functions
    • on docker host: wrapper for docker exec, docker-compose

I'll move / improve things from here:

Installing: /bin/sh: 1: redis-server: not found

Following the setup instructions in the README. Looks like the script is expecting to find Redis at a particular hostname that is not aliased in the Docker stack. At the bench init frappe-bench step:

# [... pip upgrade, git clone, NPM install etc]

Wrote css/frappe-web.css - 65.05 KB
Wrote js/frappe-web.min.js - 137.98 KB
Wrote js/dialog.min.js - 104.44 KB
Wrote css/desk.min.css - 291.98 KB
Wrote css/frappe-rtl.css - 32.37 KB
Wrote js/libs.min.js - 815.22 KB
Wrote js/desk.min.js - 510.13 KB
Wrote js/d3.min.js - 380.17 KB
Wrote css/module.min.css - 2.08 KB
Wrote css/form.min.css - 4.47 KB
Wrote js/form.min.js - 192.87 KB
Wrote css/list.min.css - 14.43 KB
Wrote js/list.min.js - 139.01 KB
Wrote css/report.min.css - 7.89 KB
Wrote js/report.min.js - 257.16 KB
Wrote js/web_form.min.js - 247.22 KB
Wrote css/web_form.css - 24.42 KB
Wrote js/print_format_v3.min.js - 23.39 KB
/bin/sh: 1: redis-server: not found
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/make.py", line 21, in init
    verbose=verbose, clone_from=clone_from, skip_bench_mkdir=skip_bench_mkdir, skip_redis_config_generation=skip_redis_config_generation)
  File "/home/frappe/bench-repo/bench/utils.py", line 78, in init
    redis.generate_config(path)
  File "/home/frappe/bench-repo/bench/config/redis.py", line 39, in generate_config
    "redis_version": get_redis_version(),
  File "/home/frappe/bench-repo/bench/config/redis.py", line 59, in get_redis_version
    version_string = subprocess.check_output('redis-server --version', shell=True).strip()
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'redis-server --version' returned non-zero exit status 127

# Just seeing what's available...
frappe@9761a4d8f053:~/frappe-bench$ ping redis
ping: unknown host redis

frappe@9761a4d8f053:~/frappe-bench$ ping redis-cache
PING redis-cache (192.168.48.4) 56(84) bytes of data.
64 bytes from redis-cache.frappedocker_default (192.168.48.4): icmp_seq=1 ttl=64 time=0.304 ms
64 bytes from redis-cache.frappedocker_default (192.168.48.4): icmp_seq=2 ttl=64 time=0.083 ms
^C
--- redis-cache ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.083/0.193/0.304/0.111 ms

Which of the 3 Redis instances is redis-server supposed to be?

Code Sprint 2018 : Docker attempt

  • Switch to Alpine:latest
  • Manage redis-server dependency for bench setup in docker
  • Try docker-compose without links
  • Dockerfile cleanup
  • use custom build wkhtmltopdf (#35) (#33)
  • use distro's nodejs instead of nodesource.com
  • cleanup dbench

frappedocker_default network cannot be reached from outside

Hi,

The 'docker-compose up -d' created it's own 'frappedocker_default' network, which cannot be reached from outside.

The ip forwarding is enabled.

zenny@docker:~/gitrepos/frappe_docker$ sysctl net.ipv4.conf.all.forwarding
net.ipv4.conf.all.forwarding = 1
zenny@docker:~/gitrepos/frappe_docker$ brctl show
bridge name	bridge id		STP enabled	interfaces
br-ae5636c26be3		8000.0242a6ae8ed6	no		veth06124fb
							veth16cda95
							veth30defb5
							veth68e54bf
							vethde6417a
br-c91e1ca6b0ed		8000.0242f181cf1f	no		
docker0		8000.02423fa8ced6	no		veth7e24060

The docker-compose created a separate bridge for frappe containers, frappedocker_default as follows:

zenny@docker:~/gitrepos/frappe_docker$ docker network ls
NETWORK ID          NAME                   DRIVER              SCOPE
defcad07cec7        bridge                 bridge              local
ae5636c26be3        frappedocker_default   bridge              local
7b4da0f2913d        host                   host                local
fd3b7cdb3542        none                   null                local

The frappedocker_network does not seem to bridged to docker0, and could be the reason that does not allow access to the containers connected to the frappedocker_default. The default 'bridge' created has an option, and maybe therefore, the containers (like urbackup in the screenshot at http://picpaste.com/IwBu2M5z.png) connected to the default bridge are readily accessible from outside!

        "Options": {
            "com.docker.network.bridge.default_bridge": "true",
            "com.docker.network.bridge.enable_icc": "true",
            "com.docker.network.bridge.enable_ip_masquerade": "true",
            "com.docker.network.bridge.host_binding_ipv4": "0.0.0.0",
            "com.docker.network.bridge.name": "docker0",
            "com.docker.network.driver.mtu": "1500"
        },


But frappedocker_default does not have above options as of below:

zenny@docker:~/gitrepos/frappe_docker$ docker network inspect frappedocker_default
[
    {
        "Name": "frappedocker_default",
        "Id": "ae5636c26be3e994bc149914e202c8d8b273745fc0b5d567c4b5563abfe27ac5",
        "Created": "2017-12-25T10:23:19.881608277+01:00",
        "Scope": "local",
        "Driver": "bridge",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "172.18.0.0/16",
                    "Gateway": "172.18.0.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "0f0d67fafcc19fd48b4fc5de8b509faa923c347eac14a2c3a6423b64904a5c91": {
                "Name": "redis-socketio",
                "EndpointID": "515bb681cc957ad93eabbab5f8b6fc543a0ed68464ae08cf2dc225324943b993",
                "MacAddress": "02:42:ac:12:00:03",
                "IPv4Address": "172.18.0.3/16",
                "IPv6Address": ""
            },
            "86aeaee4f8b6cd8eb0b439b650cfe3664c6fc71955a067f705881835c0ec779c": {
                "Name": "frappe",
                "EndpointID": "f575b3fcb4edfd95bda80f1f393f71476bbca5a5b1a2aa9d4a8b4399ad76dd2c",
                "MacAddress": "02:42:ac:12:00:06",
                "IPv4Address": "172.18.0.6/16",
                "IPv6Address": ""
            },
            "d743e83fb214d773169936fa20e1d5cf4f9ef47ef63f70aaa878e493c7ad2298": {
                "Name": "mariadb",
                "EndpointID": "c2e55f1d5f26faf8fc015f9d46c5f89dfe21dcf893cce276cfa229430ce54f4d",
                "MacAddress": "02:42:ac:12:00:05",
                "IPv4Address": "172.18.0.5/16",
                "IPv6Address": ""
            },
            "d8b6fd0aa57087475bb8a6883015569b93ee72e77aaca83618c7c54b3ccec642": {
                "Name": "redis-queue",
                "EndpointID": "1a51ecf3d0fb0034d26846225ebf62c57fdd39ffb83d35b61ba35b75c54dc4a5",
                "MacAddress": "02:42:ac:12:00:04",
                "IPv4Address": "172.18.0.4/16",
                "IPv6Address": ""
            },
            "db8f190c5920adb2d7f4261f8d730ff8d25cf4318ba96f6031e87172508a6838": {
                "Name": "redis-cache",
                "EndpointID": "5a967bb58f023759c5222cba14be8d9b2c5a2bcac6e0acf98ddadaec7ac6b988",
                "MacAddress": "02:42:ac:12:00:02",
                "IPv4Address": "172.18.0.2/16",
                "IPv6Address": ""
            }
        },
        "Options": {},
        "Labels": {}
    }
]

What is missing?

Localhost does not exist

When I run ./dbench start, and I access localhost:8000 from my browser, I get this error.

23:04:57 web.1            | SystemExit: 1
23:04:57 web.1            | ----------------------------------------
23:04:57 web.1            | localhost does not exist
23:04:57 web.1            | ----------------------------------------
23:04:57 web.1            | Exception happened during processing of request from ('172.22.0.1', 43360)
23:04:57 web.1            | Traceback (most recent call last):
23:04:57 web.1            |   File "/usr/lib/python2.7/SocketServer.py", line 596, in process_request_thread
23:04:57 web.1            |     self.finish_request(request, client_address)
23:04:57 web.1            |   File "/usr/lib/python2.7/SocketServer.py", line 331, in finish_request
23:04:57 web.1            |     self.RequestHandlerClass(request, client_address, self)
23:04:57 web.1            |   File "/usr/lib/python2.7/SocketServer.py", line 652, in __init__
23:04:57 web.1            |     self.handle()
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 293, in handle
23:04:57 web.1            |     rv = BaseHTTPRequestHandler.handle(self)
23:04:57 web.1            |   File "/usr/lib/python2.7/BaseHTTPServer.py", line 340, in handle
23:04:57 web.1            |     self.handle_one_request()
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 328, in handle_one_request
23:04:57 web.1            |     return self.run_wsgi()
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 270, in run_wsgi
23:04:57 web.1            |     execute(self.server.app)
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/serving.py", line 260, in execute
23:04:57 web.1            |     for data in application_iter:
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/debug/__init__.py", line 288, in debug_application
23:04:57 web.1            |     app_iter = self.app(environ, start_response)
23:04:57 web.1            |   File "/home/frappe/frappe-bench/apps/frappe/frappe/middlewares.py", line 15, in __call__
23:04:57 web.1            |     return super(StaticDataMiddleware, self).__call__(environ, start_response)
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/wsgi.py", line 766, in __call__
23:04:57 web.1            |     return self.app(environ, start_response)
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/wsgi.py", line 766, in __call__
23:04:57 web.1            |     return self.app(environ, start_response)
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/local.py", line 228, in application
23:04:57 web.1            |     return ClosingIterator(app(environ, start_response), self.cleanup)
23:04:57 web.1            |   File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/werkzeug/wrappers.py", line 308, in application
23:04:57 web.1            |     resp = f(*args[:-2] + (request,))
23:04:57 web.1            |   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 52, in application
23:04:57 web.1            |     init_request(request)
23:04:57 web.1            |   File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 107, in init_request
23:04:57 web.1            |     frappe.init(site=site, sites_path=_sites_path)
23:04:57 web.1            |   File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 151, in init
23:04:57 web.1            |     local.conf = _dict(get_site_config())
23:04:57 web.1            |   File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 220, in get_site_config
23:04:57 web.1            |     sys.exit(1)
23:04:57 web.1            | SystemExit: 1
23:04:57 web.1            | ----------------------------------------

Missing exposed port

No port is exposed by default, making the use of docker-compose-letsencrypt-nginx-proxy-companion a necessity and not optional.

Either port 80 should be exposed or usage of docker-compose-letsencrypt-nginx-proxy-companion integrated within current docker-compose files.

I lost about 4 hours figuring this basic thing out, the documentation is not clear.

./dbench init errors on Centos7 host

Hi,

Trying to install frappe_docker into Centos7 dockerhost. 'docker-compose up -d' works fine, but './dbench init' dies with two errors viz. 'ImportError: No module named chat' while installing frappe:

Installing frappe...
Updating DocTypes for frappe        : [========================================]
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 34, in new_site
    verbose=verbose, install_apps=install_app, source_sql=source_sql, force=force)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 69, in _new_site
    _install_app(app, verbose=verbose, set_as_patched=not source_sql)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 153, in install_app
    frappe.get_attr(after_install)()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/install.py", line 19, in after_install
    install_basic_docs()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/install.py", line 72, in install_basic_docs
    frappe.get_doc(d).insert()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 245, in insert
    self.run_post_save_methods()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 887, in run_post_save_methods
    self.run_method("on_update")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 755, in run_method
    out = Document.hook(fn)(self, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1029, in composer
    return composed(self, method, *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1012, in runner
    add_to_return_value(self, fn(self, *args, **kwargs))
  File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 749, in <lambda>
    fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 90, in on_update
    self.share_with_self()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/user/user.py", line 178, in share_with_self
    flags={"ignore_share_permission": True})
  File "/home/frappe/frappe-bench/apps/frappe/frappe/share.py", line 42, in add
    notify_assignment(user, doctype, name, description=None, notify=notify)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/share.py", line 153, in notify_assignment
    from frappe.desk.page.chat import chat
ImportError: No module named chat

and 'frappe.exceptions.PermissionError' while installing erpnext:

Installing erpnext...
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 94, in <module>
    main()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/bench_helper.py", line 18, in main
    click.Group(commands=commands)(prog_name='bench')
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/frappe-bench/env/local/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/__init__.py", line 24, in _func
    ret = f(frappe._dict(ctx.obj), *args, **kwargs)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/commands/site.py", line 165, in install_app
    _install_app(app, verbose=context.verbose)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/installer.py", line 131, in install_app
    frappe.only_for("System Manager")
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 480, in only_for
    raise PermissionError
frappe.exceptions.PermissionError

Is it a bug or a feature? ;-)

Docker-Compose: Can't read dir of '/etc/mysql/mariadb.conf.d/'

During docker-compose up -d the mariadb container throws an error:

mariadb           | /usr/sbin/mysqld: Can't read dir of '/etc/mysql/mariadb.conf.d/' (Errcode: 2 "No such file or directory")

Looks like the volume needs to be updated in docker-compose.yml:

From:

  mariadb:
    image: "mariadb"
    environment:
      - MYSQL_ROOT_PASSWORD=123
      - MYSQL_USER=root
    volumes:
      - ./conf/mariadb-conf.d:/etc/mysql/conf.d
    ports:
      - "3307:3307" #mariadb-port
    container_name: mariadb

To:

  mariadb:
    image: "mariadb"
    environment:
      - MYSQL_ROOT_PASSWORD=123
      - MYSQL_USER=root
    volumes:
      - ./conf/mariadb-conf.d:/etc/mysql/mariadb.conf.d
    ports:
      - "3307:3307" #mariadb-port
    container_name: mariadb

The MariaDB container works fine after this.

Nginx not waiting for other services to be up

There is a very common problem: nginx starts up very quickly, and when it does the other containers are not ready yet.

A wait-for script should be added to the nginx container entrypoint script so that the container waits for other services to be running.

Docker build issue

When running docker-compose up -d I'm getting the following error:

Could not find a version that satisfies the requirement gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.11->bench) (from versions: 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4)
No matching distribution found for gitdb>=4.0.1 (from gitdb2>=2.0.0->GitPython==2.1.11->bench)
ERROR: Service 'frappe' failed to build: The command '/bin/sh -c pip install -e git+https://github.com/frappe/bench.git#egg=bench --no-cache' returned a non-zero code: 1

Any idea how to get past this error?

Even deleting a warehouse took 45s

I am using ERPNext on my MacBook Air with Intel i5 5250U and 8GB RAM.

Screen Shot 2019-07-04 at 9 44 05 AM

I was deleting a warehouse and took 45s, is there any recommendation on optimizing speed? Odoo works much faster, I suspect it is the cause of Docker?

Managing two sites - Problem

Hello,

I created two sites: site1.local and erpnext.dev
Each of them have installed erpnext app.

Now i want to connect to each of this sites but i think that i only can connect to just one of them.
Inside site_config.json (each of them) i added:
"host_name": "http://erpnext.test:8000" # inside site1.local
"host_name": "http://erpnextdev.test:8000" # inside erpnext.dev

When i type "http://erpnext.test:8000" or "http://erpnextdev.test:8000" i know that i connect just to the site1.local, but i want to connect erpnext.dev when i type "http://erpnextdev.test:8000".

How to configure that i be able to connect each of them?

ps. sorry for my english.

Access denied for user warnings

I'm getting these warnings every minute or so:

mariadb_1 | 2020-03-03 16:47:00 13 [Warning] Access denied for user '_8ff20c80e45050ed'@'172.24.0.11' (using password: YES)

Do you think it's symptom of any problem?

./dbench init returns error Missing argument "PATH"

Hi,

Followed steps for installing erpnext docker image from:
https://github.com/frappe/frappe_docker

Working up to step copied below:

  1. First time setup

./dbench init

returns following:

Usage: bench init [OPTIONS] PATH
Try "bench init --help" for help.

Error: Missing argument "PATH".
mv: cannot stat 'Procfile_docker': No such file or directory

Have tried setting paths but no luck. Any suggestions?

Thanks,

Can't start frappe

While I ./dbench start run it showing end of the installation.

07:29:51 watch.1 | Rebuilding list.min.css
07:29:51 watch.1 | Rebuilding list.min.js
07:29:53 watch.1 | Rebuilding report.min.css
07:29:53 watch.1 | Rebuilding report.min.js
07:29:55 watch.1 | Rebuilding web_form.min.js
07:29:56 watch.1 | Rebuilding web_form.css
07:29:56 watch.1 | Rebuilding email.css
07:29:56 watch.1 | Rebuilding social.min.js
07:29:58 watch.1 | Rebuilding modules.min.js
07:29:58 watch.1 | Rebuilding barcode_scanner.min.js
07:30:00 watch.1 | Killed
07:30:00 watch.1 | error Command failed with exit code 137.
07:30:00 watch.1 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
07:30:01 system | watch.1 stopped (rc=0)
07:30:01 system | sending SIGTERM to worker_long.1 (pid 952)
07:30:01 system | sending SIGTERM to web.1 (pid 954)
07:30:01 system | sending SIGTERM to schedule.1 (pid 955)
07:30:01 system | sending SIGTERM to worker_default.1 (pid 956)
07:30:01 system | sending SIGTERM to socketio.1 (pid 957)
07:30:01 system | sending SIGTERM to worker_short.1 (pid 958)
07:30:01 system | socketio.1 stopped (rc=-15)
07:30:01 system | schedule.1 stopped (rc=-15)
07:30:01 worker_long.1 | 07:30:01 Warm shut down requested
07:30:01 worker_short.1 | 07:30:01 Warm shut down requested
07:30:01 worker_default.1 | 07:30:01 Warm shut down requested
07:30:03 system | worker_short.1 stopped (rc=-15)
07:30:03 system | worker_default.1 stopped (rc=-15)
07:30:03 system | worker_long.1 stopped (rc=-15)
07:30:03 system | web.1 stopped (rc=-15)

dbench init fails

Env

$ docker version
Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:24:56 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:23:21 2018
  OS/Arch:          linux/amd64
  Experimental:     false
$ docker-compose version
docker-compose version 1.22.0, build f46880fe
docker-py version: 3.4.1
CPython version: 3.6.6
OpenSSL version: OpenSSL 1.1.0f  25 May 2017
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.5 LTS
Release:	16.04
Codename:	xenial

setup

$ docker-compose up -d
Pulling mariadb (mariadb:)...
latest: Pulling from library/mariadb
124c757242f8: Pull complete
9d866f8bde2a: Pull complete
fa3f2f277e67: Pull complete
398d32b153e8: Pull complete
afde35469481: Pull complete
31f2ae82b3e3: Pull complete
3eeaf7e45ea6: Pull complete
716982328e17: Pull complete
34ce605c9036: Pull complete
4502ed9073c0: Pull complete
2afafbdf5a96: Pull complete
43d52b11dd31: Pull complete
30c7b70556f3: Pull complete
8b1b39f2f89a: Pull complete
41480b9319d7: Pull complete
Digest: sha256:b7894bd08e5752acdd41fea654cb89467c99e67b8293975bb5d787b27e66ce1a
Status: Downloaded newer image for mariadb:latest
redis-cache is up-to-date
redis-queue is up-to-date
redis-socketio is up-to-date
Creating mariadb ... done
Recreating frappe ... done

Problem

$ ./dbench init
INFO:bench.utils:virtualenv -q env -p /usr/bin/python
Already using interpreter /usr/bin/python
INFO:bench.utils:env/bin/pip -q install --upgrade pip
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7cab9f7d90>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7cab9f7ed0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7caba1a050>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7caba1a190>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f7caba1a2d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/pip/
INFO:bench.utils:env/bin/pip -q install wheel
INFO:bench.utils:env/bin/pip -q install six
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f096aeebe50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/six/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f096aeebf50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/six/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f096af130d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/six/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f096af13190>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/six/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x7f096af132d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',)': /simple/six/
  Could not find a version that satisfies the requirement six (from versions: )
No matching distribution found for six
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/make.py", line 30, in init
    python 		 = python)
  File "/home/frappe/bench-repo/bench/utils.py", line 65, in init
    setup_env(bench_path=path, python = python)
  File "/home/frappe/bench-repo/bench/utils.py", line 180, in setup_env
    exec_cmd('{} -q install six'.format(pip), cwd=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 159, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: env/bin/pip -q install six
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgpm2 libpython3.5 vim-common vim-runtime
Suggested packages:
  gpm ctags vim-doc vim-scripts vim-gnome-py2 | vim-gtk-py2 | vim-gtk3-py2 | vim-athena-py2 | vim-nox-py2
The following NEW packages will be installed:
  libgpm2 libpython3.5 vim vim-common vim-runtime
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 7679 kB of archives.
After this operation, 35.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgpm2 amd64 1.20.4-6.1
  Temporary failure resolving 'archive.ubuntu.com'
Err:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 vim-common amd64 2:7.4.1689-3ubuntu1.2
  Temporary failure resolving 'archive.ubuntu.com'
Ign:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython3.5 amd64 3.5.2-2ubuntu0~16.04.4
Ign:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1.2
Ign:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 vim amd64 2:7.4.1689-3ubuntu1.2
Err:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 vim-common amd64 2:7.4.1689-3ubuntu1.2
  Temporary failure resolving 'archive.ubuntu.com'
Err:3 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libpython3.5 amd64 3.5.2-2ubuntu0~16.04.4
  Temporary failure resolving 'archive.ubuntu.com'
Err:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1.2
  Temporary failure resolving 'archive.ubuntu.com'
Err:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 vim amd64 2:7.4.1689-3ubuntu1.2
  Temporary failure resolving 'archive.ubuntu.com'
E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/g/gpm/libgpm2_1.20.4-6.1_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/v/vim/vim-common_7.4.1689-3ubuntu1.2_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/python3.5/libpython3.5_3.5.2-2ubuntu0~16.04.4_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/v/vim/vim-runtime_7.4.1689-3ubuntu1.2_all.deb  Temporary failure resolving 'archive.ubuntu.com'

E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/v/vim/vim_7.4.1689-3ubuntu1.2_amd64.deb  Temporary failure resolving 'archive.ubuntu.com'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
Usage: bench [OPTIONS] COMMAND [ARGS]...

Error: No such command "new-site".
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.github.com:443
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/make.py", line 40, in get_app
    get_app(git_url, branch=branch)
  File "/home/frappe/bench-repo/bench/app.py", line 106, in get_app
    res = requests.get(url)
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 72, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/api.py", line 58, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 512, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/sessions.py", line 622, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/requests/adapters.py", line 513, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='api.github.com', port=443): Max retries exceeded with url: /repos/frappe/erpnext (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7f6de3000e10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
/home/frappe/frappe-bench/env/bin/python: No module named frappe.utils

Multiple issue with rendering, updating and so on

Hi,

I deployed docker image (to an alpinelinux v3.7 host and another on ubuntu 16.04 host.

A. UPDATE: I have also tried to run in a Ubuntu 16.04 dockerhost instead of alpinelinux v3.7 as host, but the issue no. 1 below was unchanged, despite 'bench start' seemed to work without an error:

root@86aeaee4f8b6:/home/frappe/frappe-bench# bench start
2017-12-25 10:27:50 [67] [WARNING] Your terminal is not configured to receive UTF-8 encoded text. Please adjust your locale settings or force UTF-8 output by setting PYTHONIOENCODING="utf-8".
10:27:50 system           | worker_long.1 started (pid=85)
10:27:50 system           | watch.1 started (pid=90)
10:27:50 system           | schedule.1 started (pid=92)
10:27:50 system           | web.1 started (pid=91)
10:27:50 system           | worker_default.1 started (pid=95)
10:27:50 system           | socketio.1 started (pid=94)
10:27:50 system           | worker_short.1 started (pid=93)
10:27:52 socketio.1       | listening on *: 9000
10:27:55 web.1            |  * Running on http://0.0.0.0:8000/ (Press CTRL+C to quit)
10:27:55 web.1            |  * Restarting with inotify reloader
10:27:55 worker_long.1    | 10:27:55 RQ worker u'rq:worker:86aeaee4f8b6.97.long' started, version 0.9.2
10:27:55 worker_long.1    | 10:27:55 Cleaning registries for queue: long
10:27:55 worker_long.1    | 10:27:55
10:27:55 worker_long.1    | 10:27:55 *** Listening on long...
10:27:55 worker_default.1 | 10:27:55 RQ worker u'rq:worker:86aeaee4f8b6.105.default' started, version 0.9.2
10:27:55 worker_short.1   | 10:27:55 RQ worker u'rq:worker:86aeaee4f8b6.106.short' started, version 0.9.2
10:27:55 worker_default.1 | 10:27:55 Cleaning registries for queue: default
10:27:55 worker_short.1   | 10:27:55 Cleaning registries for queue: short
10:27:55 worker_default.1 | 10:27:55
10:27:55 worker_default.1 | 10:27:55 *** Listening on default...
10:27:55 worker_short.1   | 10:27:55
10:27:55 worker_short.1   | 10:27:55 *** Listening on short...
10:27:56 web.1            |  * Debugger is active!
10:27:56 web.1            |  * Debugger PIN: 724-973-074
10:27:56 watch.1          | compiling avatar.less
10:27:56 watch.1          | compiling calendar.less
10:27:56 watch.1          | compiling common.less
10:27:56 watch.1          | compiling controls.less
10:27:56 watch.1          | compiling desk.less
10:27:56 watch.1          | compiling desktop.less
10:27:56 watch.1          | compiling docs.less
10:27:56 watch.1          | compiling email.less
10:27:56 watch.1          | compiling form.less
10:27:56 watch.1          | compiling form_grid.less
10:27:56 watch.1          | compiling gantt.less
10:27:56 watch.1          | compiling indicator.less
10:27:56 watch.1          | compiling kanban.less
10:27:56 watch.1          | compiling list.less
10:27:56 watch.1          | compiling mixins.less
10:27:56 watch.1          | compiling mobile.less
10:27:56 watch.1          | compiling module.less
10:27:56 watch.1          | compiling navbar.less
10:27:56 watch.1          | compiling page.less
10:27:56 watch.1          | compiling report.less
10:27:56 watch.1          | compiling role_editor.less
10:27:56 watch.1          | compiling sidebar.less
10:27:56 watch.1          | compiling slickgrid.less
10:27:56 watch.1          | compiling tags.less
10:27:56 watch.1          | compiling tree.less
10:27:56 watch.1          | compiling website.less
10:27:56 watch.1          | compiling email.less
10:27:56 watch.1          | compiling erpnext.less
10:27:56 watch.1          | compiling hub.less
10:27:56 watch.1          | compiling pos.less
10:27:56 watch.1          | compiling website.less
10:27:56 watch.1          | file watching on *: 6787
10:27:57 watch.1          | Less files compiled
10:27:57 watch.1          | Wrote css/frappe-web.css - 65.43 KB
10:27:57 watch.1          | Wrote js/frappe-web.min.js - 135.3 KB
10:27:57 watch.1          | Wrote js/control.min.js - 81.33 KB
10:27:57 watch.1          | Wrote js/dialog.min.js - 124.04 KB
10:27:57 watch.1          | Wrote css/desk.min.css - 310.76 KB
10:27:57 watch.1          | Wrote css/frappe-rtl.css - 32.73 KB
10:27:57 watch.1          | Wrote js/libs.min.js - 1.12 MB
10:27:57 watch.1          | Wrote js/desk.min.js - 475.77 KB
10:27:57 watch.1          | Wrote css/module.min.css - 2.16 KB
10:27:57 watch.1          | Wrote css/form.min.css - 4.55 KB
10:27:57 watch.1          | Wrote js/form.min.js - 205.4 KB
10:27:57 watch.1          | Wrote css/list.min.css - 13.66 KB
10:27:57 watch.1          | Wrote js/list.min.js - 161.49 KB
10:27:57 watch.1          | Wrote css/report.min.css - 8.31 KB
10:27:58 watch.1          | Wrote js/report.min.js - 262.89 KB
10:27:58 watch.1          | Wrote js/web_form.min.js - 248.66 KB
10:27:58 watch.1          | Wrote css/web_form.css - 24.69 KB
10:27:58 watch.1          | Wrote js/print_format_v3.min.js - 25.87 KB
10:27:58 watch.1          | Wrote css/erpnext.css - 8.08 KB
10:27:58 watch.1          | Wrote js/erpnext-web.min.js - 4.22 KB
10:27:58 watch.1          | Wrote js/erpnext.min.js - 167.93 KB
10:27:58 watch.1          | Wrote js/item-dashboard.min.js - 8.22 KB

B. dockerhost=alpinelinux v3.7.

dockerhost:~/gitrepos/frappe_docker# docker ps
CONTAINER ID        IMAGE                 COMMAND                  CREATED             STATUS              PORTS                                                                    NAMES
a381e3123a51        frappedocker_frappe   "/bin/bash"              20 hours ago        Up 10 minutes       0.0.0.0:6787->6787/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:9000->9000/tcp   frappe
81b27de35ff4        redis:alpine          "docker-entrypoint..."   20 hours ago        Up 10 minutes       6379/tcp                                                                 redis-cache
836037a84ce1        redis:alpine          "docker-entrypoint..."   20 hours ago        Up 10 minutes       6379/tcp                                                                 redis-queue
ec758d0d4631        redis:alpine          "docker-entrypoint..."   20 hours ago        Up 10 minutes       6379/tcp                                                                 redis-socketio
d97f12fff7ef        mariadb               "docker-entrypoint..."   20 hours ago        Up 10 minutes       0.0.0.0:3307->3306/tcp                                                   mariadb

Issue no. 1:

trying to access to external_ip:8000 gives a blank page.

Issue No. 2:

As explained in #19 (comment) start' fails to run.

Issue no. 3:

Trying to update the bench gave the following error:

dockerhost:~/gitrepos/frappe_docker# ./dbench -c update

This update will remove Celery config and prepare the bench to use Python RQ.
And it will overwrite Procfile and supervisor.conf.
If you don't know what this means, type Y ;)

Do you want to continue? [y/N]: y

This update will replace ERPNext's Redis configuration files to fix a major security issue.
If you don't know what this means, type Y ;)

Do you want to continue? [y/N]: y
/bin/sh: 1: redis-server: not found
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/update.py", line 31, in update
    patches.run(bench_path='.')
  File "/home/frappe/bench-repo/bench/patches/__init__.py", line 21, in run
    result = execute(bench_path)
  File "/home/frappe/bench-repo/bench/patches/v3/redis_bind_ip.py", line 10, in execute
    generate_config(bench_path)
  File "/home/frappe/bench-repo/bench/config/redis.py", line 39, in generate_config
    "redis_version": get_redis_version(),
  File "/home/frappe/bench-repo/bench/config/redis.py", line 59, in get_redis_version
    version_string = subprocess.check_output('redis-server --version', shell=True).decode().strip()
  File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'redis-server --version' returned non-zero exit status 127

Memory is adequately set aside and does not seem to be an issue unlike it was stated at https://discuss.erpnext.com/t/fails-to-build-docker-frappe/31896

dockerhost:~/gitrepos/frappe_docker# free -m
             total       used       free     shared    buffers     cached
Mem:          7973        761       7212         19         47        313
-/+ buffers/cache:        400       7573
Swap:         4095          0       4095

Issue no. 4

Upon some research, it seemed like it was related to #19 (comment). Even https://github.com/ierturk/frappe_docker repo gives an error './dbench init_frappe' as in two accounts (npm and sudo) as shown in bold below:

...
Successfully tagged ierturkfrappedocker_frappe:latest
WARNING: Image for service frappe was built because it did not already exist. To rebuild this image you must use `docCreating redis-socketio ... done
Creating frappe ... done
Creating redis-cache ... 
Creating redis-socketio ... 
Creating mariadb ... 
Creating frappe ... 
dockerhost:~/gitrepos/ierturk_frappe_docker# ./dbench init_frappe
INFO:bench.utils:virtualenv -q env -p /usr/bin/python
Already using interpreter /usr/bin/python
INFO:bench.utils:./env/bin/pip -q install --upgrade pip
INFO:bench.utils:./env/bin/pip -q install wheel
INFO:bench.utils:./env/bin/pip -q install -e git+https://github.com/frappe/python-pdfkit.git#egg=pdfkit
INFO:bench.app:getting app frappe
INFO:bench.utils:git clone https://github.com/frappe/frappe.git   --origin upstream
Cloning into 'frappe'...
remote: Counting objects: 147638, done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 147638 (delta 0), reused 1 (delta 0), pack-reused 147632
Receiving objects: 100% (147638/147638), 125.52 MiB | 801.00 KiB/s, done.
Resolving deltas: 100% (112118/112118), done.

_**Checking connectivity... done.
('installing', u'frappe')
INFO:bench.app:installing frappe
INFO:bench.utils:frappe-bench/env/bin/pip install -q  -e frappe-bench/apps/frappe --no-cache-dir
Updating node libraries...
INFO:bench.utils:npm install
Segmentation fault
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 11, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/frappe/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/frappe/bench-repo/bench/commands/make.py", line 21, in init
    verbose=verbose, clone_from=clone_from, skip_bench_mkdir=skip_bench_mkdir, skip_redis_config_generation=skip_redis_config_generation)
  File "/home/frappe/bench-repo/bench/utils.py", line 72, in init
    update_npm_packages(bench_path=path)
  File "/home/frappe/bench-repo/bench/utils.py", line 441, in update_npm_packages
    exec_cmd('npm install', cwd=bench_path)
  File "/home/frappe/bench-repo/bench/utils.py", line 140, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: npm install**_

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  libgpm2 libpython3.5 vim-common vim-runtime
Suggested packages:
  gpm ctags vim-doc vim-scripts vim-gnome-py2 | vim-gtk-py2 | vim-gtk3-py2 | vim-athena-py2 | vim-nox-py2
The following NEW packages will be installed:
  libgpm2 libpython3.5 vim vim-common vim-runtime
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 7679 kB of archives.
After this operation, 35.1 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgpm2 amd64 1.20.4-6.1 [16.5 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim-common amd64 2:7.4.1689-3ubuntu1.2 [103 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libpython3.5 amd64 3.5.2-2ubuntu0~16.04.4 [1360 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim-runtime all 2:7.4.1689-3ubuntu1.2 [5164 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim amd64 2:7.4.1689-3ubuntu1.2 [1036 kB]          
Fetched 7679 kB in 14s (523 kB/s)                                                                                   
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 5.)
debconf: falling back to frontend: Readline
Selecting previously unselected package libgpm2:amd64.
(Reading database ... 31432 files and directories currently installed.)
Preparing to unpack .../libgpm2_1.20.4-6.1_amd64.deb ...
Unpacking libgpm2:amd64 (1.20.4-6.1) ...
Selecting previously unselected package vim-common.
Preparing to unpack .../vim-common_2%3a7.4.1689-3ubuntu1.2_amd64.deb ...
Unpacking vim-common (2:7.4.1689-3ubuntu1.2) ...
Selecting previously unselected package libpython3.5:amd64.
Preparing to unpack .../libpython3.5_3.5.2-2ubuntu0~16.04.4_amd64.deb ...
Unpacking libpython3.5:amd64 (3.5.2-2ubuntu0~16.04.4) ...
Selecting previously unselected package vim-runtime.
Preparing to unpack .../vim-runtime_2%3a7.4.1689-3ubuntu1.2_all.deb ...
Adding 'diversion of /usr/share/vim/vim74/doc/help.txt to /usr/share/vim/vim74/doc/help.txt.vim-tiny by vim-runtime'
Adding 'diversion of /usr/share/vim/vim74/doc/tags to /usr/share/vim/vim74/doc/tags.vim-tiny by vim-runtime'
Unpacking vim-runtime (2:7.4.1689-3ubuntu1.2) ...
Selecting previously unselected package vim.
Preparing to unpack .../vim_2%3a7.4.1689-3ubuntu1.2_amd64.deb ...
Unpacking vim (2:7.4.1689-3ubuntu1.2) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Setting up libgpm2:amd64 (1.20.4-6.1) ...
Setting up vim-common (2:7.4.1689-3ubuntu1.2) ...
Setting up libpython3.5:amd64 (3.5.2-2ubuntu0~16.04.4) ...
Setting up vim-runtime (2:7.4.1689-3ubuntu1.2) ...
Setting up vim (2:7.4.1689-3ubuntu1.2) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  sudo
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 390 kB of archives.
After this operation, 1618 kB of additional disk space will be used.

_**Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 sudo amd64 1.8.16-0ubuntu1.5 [390 kB]
Fetched 390 kB in 1s (378 kB/s)
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76, <> line 1.)
debconf: falling back to frontend: Readline
Selecting previously unselected package sudo.
(Reading database ... 33218 files and directories currently installed.)
Preparing to unpack .../sudo_1.8.16-0ubuntu1.5_amd64.deb ...
Unpacking sudo (1.8.16-0ubuntu1.5) ...
dpkg: error processing archive /var/cache/apt/archives/sudo_1.8.16-0ubuntu1.5_amd64.deb (--unpack):
 error setting permissions of './usr/bin/sudo': Permission denied
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
unknown argument --> abort-install
Errors were encountered while processing:
 /var/cache/apt/archives/sudo_1.8.16-0ubuntu1.5_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)**_

Installing frappe...
Updating DocTypes for frappe        : [========================================]
Updating country info               : [========================================]
*** Scheduler is disabled ***
INFO:bench.app:getting app erpnext
INFO:bench.utils:git clone https://github.com/frappe/erpnext  --depth 1 --origin upstream
Cloning into 'erpnext'...
remote: Counting objects: 6325, done.
remote: Compressing objects: 100% (5571/5571), done.
remote: Total 6325 (delta 1204), reused 3275 (delta 590), pack-reused 0
Receiving objects: 100% (6325/6325), 179.03 MiB | 818.00 KiB/s, done.
Resolving deltas: 100% (1204/1204), done.
Checking connectivity... done.
Checking out files: 100% (6281/6281), done.
('installing', u'erpnext')
INFO:bench.app:installing erpnext
INFO:bench.utils:./env/bin/pip install -q  -e ./apps/erpnext --no-cache-dir

Installing erpnext...
Updating DocTypes for erpnext       : [========================================]
dockerhost:~/gitrepos/ierturk_frappe_docker# docker-compose start
Starting mariadb        ... done
Starting redis-queue    ... done
Starting redis-cache    ... done
Starting redis-socketio ... done
Starting frappe         ... done
dockerhost:~/gitrepos/ierturk_frappe_docker# 

Any clues?

Disable CORS

Hi I am trying to disable the CORS in the NGINX in the docker but unable to find the nginx service. Is that something need to be done additionally?

Python 3 and V10?

Hi everyone,

Does the current docker release support python 3 and v10?
Thanks!

Edge image not built

There is no develop branch here, so edge images are not being built by Travis.

Improve Documentation

- Move Documentation to frappe website. Unnecessary to trigger builds on documentation changes

  • Describe each image separately in documentation
  • Section for single host docker-compose
  • Section for multi node Docker swarm
  • Add and document Helm Charts for kubernetes based installation
  • Section to build production images based on frappe or erpnext images

bench -c not passing arguments

According to documentation

All bench commands can also be directly run from the host machine by using dbench. For instance bench start can be executed by running ./dbench -c start. Just preface the option with ./dbench -c

this should work:
./dbench -c new-site site_name

However, the site_name argument is not being passed to the container.
The problem may be here https://github.com/frappe/frappe_docker/blob/master/dbench#L36
I am not familiar with bash but when I hardcode like this
docker exec -it frappe bash -c "bench $OPTARG site_name" it works

Developer mode

Hello,
How is it possible to enable the developer mode in the new frappe_docker?
David

UnicodeDecodeError during the setup wizard process

I got this error while going through the set wizard for a new site.

Traceback (most recent call last):
  File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 57, in application
    response = frappe.handler.handle()
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 22, in handle
    data = execute_cmd(cmd)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 53, in execute_cmd
    return frappe.call(method, **frappe.form_dict)
  File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 922, in call
    return fn(*args, **newargs)
  File "/home/frappe/frappe-bench/apps/erpnext/erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py", line 108, in get_charts_for_country
    if (fname.startswith(country_code) or fname.startswith(country)) and fname.endswith(".json"):
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 19: ordinal not in range(128)

This error occurs specifically when trying to parse the filename string fr_plan_comptable_général.json. Probably because of the é characters. (So, the setup wizard progresses fine when I move or rename this file.)

Initially while doing executing bench start I got this [WARNING]-

Your terminal is not configured to receive UTF-8 encoded text. Please adjust your locale settings or force UTF-8 output by setting PYTHONIOENCODING="utf-8".

So, I set this environment variable, which doesn't solve this issue.

I then found the locale is not set. Which is where I got stuck. I haven't figured which locale variable to set. Maybe I am approaching this all wrong. Any suggestion regarding this would be tremendously helpful.

BTW, the host machine is running Arch Linux - kernel: 4.12.8-2-ARCH

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.