ciur / papermerge

Open Source Document Management System for Digital Archives (Scanned Documents)
https://papermerge.com
Apache License 2.0
2.41k stars 257 forks source link

Docker installation for PaperMerge 3.2 #620

Closed alz3abi closed 2 weeks ago

alz3abi commented 2 weeks ago

Discussed in https://github.com/ciur/papermerge/discussions/619

Originally posted by **alz3abi** June 21, 2024 Hello Folks, I'm trying to install papermerge on docker, tried there Setup guide with no luck looks like django not reading the configurations properly. i used this compose filw with no luck ( error with port, container listen to 7000 and setup added as 80) ``` version: "3.9" x-backend: &common image: papermerge/papermerge:3.2 environment: PAPERMERGE__SECURITY__SECRET_KEY: 12345 PAPERMERGE__AUTH__USERNAME: admin PAPERMERGE__AUTH__PASSWORD: admin PAPERMERGE__REDIS__URL: redis://redis:6379/0 volumes: - data:/db - index_db:/core_app/index_db - media:/core_app/media services: web: <<: *common ports: - "12000:80" depends_on: - redis worker: <<: *common command: worker redis: image: redis:6 volumes: data: index_db: media: ``` then updated 12000:7000 a got it running with error of 500 in webUI any help on this ?
alz3abi commented 2 weeks ago

log of web server

2024-06-21 11:48:50 /venv/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version!
2024-06-21 11:48:50   warnings.warn(
2024-06-21 11:48:51 /venv/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version!
2024-06-21 11:48:51   warnings.warn(
2024-06-21 11:48:50 
2024-06-21 11:48:50 45 static files copied to '/app/static'.
2024-06-21 11:48:51 Operations to perform:
2024-06-21 11:48:51   Apply all migrations: auth, authtoken, contenttypes, core, dynamic_preferences, dynamic_preferences_users, knox, sessions, sites
2024-06-21 11:48:51 Running migrations:
2024-06-21 11:48:51   Applying contenttypes.0001_initial... OK
2024-06-21 11:48:51   Applying contenttypes.0002_remove_content_type_name... OK
2024-06-21 11:48:51   Applying auth.0001_initial... OK
2024-06-21 11:48:51   Applying auth.0002_alter_permission_name_max_length... OK
2024-06-21 11:48:51   Applying auth.0003_alter_user_email_max_length... OK
2024-06-21 11:48:51   Applying auth.0004_alter_user_username_opts... OK
2024-06-21 11:48:51   Applying auth.0005_alter_user_last_login_null... OK
2024-06-21 11:48:51   Applying auth.0006_require_contenttypes_0002... OK
2024-06-21 11:48:51   Applying auth.0007_alter_validators_add_error_messages... OK
2024-06-21 11:48:51   Applying auth.0008_alter_user_username_max_length... OK
2024-06-21 11:48:51   Applying auth.0009_alter_user_last_name_max_length... OK
2024-06-21 11:48:51   Applying auth.0010_alter_group_name_max_length... OK
2024-06-21 11:48:51   Applying auth.0011_update_proxy_permissions... OK
2024-06-21 11:48:51   Applying auth.0012_alter_user_first_name_max_length... OK
2024-06-21 11:48:51   Applying core.0001_initial... OK
2024-06-21 11:48:51   Applying authtoken.0001_initial... OK
2024-06-21 11:48:51   Applying authtoken.0002_auto_20160226_1747... OK
2024-06-21 11:48:51   Applying authtoken.0003_tokenproxy... OK
2024-06-21 11:48:51   Applying core.0002_auto_20220619_0847... OK
2024-06-21 11:48:51   Applying core.0003_alter_basetreenode_polymorphic_ctype_and_more... OK
2024-06-21 11:48:52   Applying core.0004_remove_automate_dst_folder_remove_automate_tags_and_more... OK
2024-06-21 11:48:52   Applying core.0005_basetreenode_unique title per parent... OK
2024-06-21 11:48:52   Applying core.0006_alter_basetreenode_options_remove_basetreenode_level_and_more... OK
2024-06-21 11:48:52   Applying core.0007_basetreenode_parent_title_uniq_when_parent_is_null... OK
2024-06-21 11:48:52   Applying core.0008_remove_basetreenode_parent_title_uniq_when_parent_is_null_and_more... OK
2024-06-21 11:48:52   Applying core.0009_remove_basetreenode_unique title per parent_and_more... OK
2024-06-21 11:48:52   Applying dynamic_preferences.0001_initial... OK
2024-06-21 11:48:52   Applying dynamic_preferences.0002_auto_20150712_0332... OK
2024-06-21 11:48:52   Applying dynamic_preferences.0003_auto_20151223_1407... OK
2024-06-21 11:48:52   Applying dynamic_preferences.0004_move_user_model... OK
2024-06-21 11:48:52   Applying dynamic_preferences.0005_auto_20181120_0848... OK
2024-06-21 11:48:52   Applying dynamic_preferences.0006_auto_20191001_2236... OK
2024-06-21 11:48:52   Applying dynamic_preferences_users.0001_initial... OK
2024-06-21 11:48:52   Applying dynamic_preferences_users.0002_auto_20200821_0837... OK
2024-06-21 11:48:52   Applying knox.0001_initial... OK
2024-06-21 11:48:52   Applying knox.0002_auto_20150916_1425... OK
2024-06-21 11:48:52   Applying knox.0003_auto_20150916_1526... OK
2024-06-21 11:48:52   Applying knox.0004_authtoken_expires... OK
2024-06-21 11:48:52   Applying knox.0005_authtoken_token_key... OK
2024-06-21 11:48:52   Applying knox.0006_auto_20160818_0932... OK
2024-06-21 11:48:52   Applying knox.0007_auto_20190111_0542... OK
2024-06-21 11:48:52   Applying knox.0008_remove_authtoken_salt... OK
2024-06-21 11:48:52   Applying sessions.0001_initial... OK
2024-06-21 11:48:52   Applying sites.0001_initial... OK
2024-06-21 11:48:52   Applying sites.0002_alter_domain_unique... OK
2024-06-21 11:48:52 Creating superuser username=admin
2024-06-21 11:48:53 Superuser created successfully.
2024-06-21 11:48:53 2024-06-21 07:48:53,578 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2024-06-21 11:48:53 2024-06-21 07:48:53,579 INFO supervisord started with pid 1
2024-06-21 11:48:54 Indexing 0 Documents
2024-06-21 11:48:54 Indexing 2 Folders
2024-06-21 11:48:54 2024-06-21 07:48:54,584 INFO spawned: 'uwsgi' with pid 33
2024-06-21 11:48:54 2024-06-21 07:48:54,587 INFO spawned: 'nginx' with pid 34
2024-06-21 11:48:54 2024-06-21 07:48:54,590 INFO spawned: 'redis-server' with pid 35
2024-06-21 11:48:54 2024-06-21 07:48:54,592 INFO spawned: 'ws_server' with pid 36
2024-06-21 11:48:53 /venv/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version!
2024-06-21 11:48:53   warnings.warn(
2024-06-21 11:48:53 /usr/lib/python3/dist-packages/supervisor/options.py:474: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
2024-06-21 11:48:53   self.warnings.warn(
2024-06-21 11:48:54 /venv/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version!
2024-06-21 11:48:54   warnings.warn(
2024-06-21 11:48:54 [uWSGI] getting INI configuration from /etc/uwsgi/papermerge.ini
2024-06-21 11:48:54 *** Starting uWSGI 2.0.21 (64bit) on [Fri Jun 21 07:48:54 2024] ***
2024-06-21 11:48:54 compiled with version: 10.2.1 20210110 on 01 April 2023 06:31:55
2024-06-21 11:48:54 os: Linux-6.6.31-linuxkit #1 SMP Thu May 23 08:36:57 UTC 2024
2024-06-21 11:48:54 nodename: 911df9e326d1
2024-06-21 11:48:54 machine: aarch64
2024-06-21 11:48:54 clock source: unix
2024-06-21 11:48:54 pcre jit disabled
2024-06-21 11:48:54 detected number of CPU cores: 8
2024-06-21 11:48:54 current working directory: /app
2024-06-21 11:48:54 detected binary path: /venv/bin/uwsgi
2024-06-21 11:48:54 uWSGI running as root, you can use --uid/--gid/--chroot options
2024-06-21 11:48:54 *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
2024-06-21 11:48:54 your memory page size is 4096 bytes
2024-06-21 11:48:54 detected max file descriptor number: 1048576
2024-06-21 11:48:54 lock engine: pthread robust mutexes
2024-06-21 11:48:54 thunder lock: disabled (you can enable it with --thunder-lock)
2024-06-21 11:48:54 uwsgi socket 0 bound to TCP address :9000 fd 3
2024-06-21 11:48:54 uWSGI running as root, you can use --uid/--gid/--chroot options
2024-06-21 11:48:54 *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
2024-06-21 11:48:54 Python version: 3.10.10 (main, Mar 23 2023, 03:59:01) [GCC 10.2.1 20210110]
2024-06-21 11:48:54 PEP 405 virtualenv detected: /venv
2024-06-21 11:48:54 Set PythonHome to /venv
2024-06-21 11:48:54 Python main interpreter initialized at 0xaaaaf99294b0
2024-06-21 11:48:54 uWSGI running as root, you can use --uid/--gid/--chroot options
2024-06-21 11:48:54 *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
2024-06-21 11:48:54 python threads support enabled
2024-06-21 11:48:54 your server socket listen backlog is limited to 100 connections
2024-06-21 11:48:54 your mercy for graceful operations on workers is 60 seconds
2024-06-21 11:48:54 mapped 312864 bytes (305 KB) for 8 cores
2024-06-21 11:48:54 *** Operational MODE: preforking+threaded ***
2024-06-21 11:48:55 2024-06-21 09:48:55,240 INFO     pikepdf C++ to Python logger bridge initialized
2024-06-21 11:48:55 /venv/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version!
2024-06-21 11:48:55   warnings.warn(
2024-06-21 11:48:55 /venv/lib/python3.10/site-packages/requests/__init__.py:109: RequestsDependencyWarning: urllib3 (1.26.13) or chardet (None)/charset_normalizer (3.0.1) doesn't match a supported version!
2024-06-21 11:48:55   warnings.warn(
2024-06-21 11:48:55 WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0xaaaaf99294b0 pid: 33 (default app)
2024-06-21 11:48:55 uWSGI running as root, you can use --uid/--gid/--chroot options
2024-06-21 11:48:55 *** WARNING: you are running uWSGI as root !!! (use the --uid flag) *** 
2024-06-21 11:48:55 *** uWSGI is running in multiple interpreter mode ***
2024-06-21 11:48:55 spawned uWSGI master process (pid: 33)
2024-06-21 11:48:55 spawned uWSGI worker 1 (pid: 45, cores: 4)
2024-06-21 11:48:55 spawned uWSGI worker 2 (pid: 49, cores: 4)
2024-06-21 11:48:55 2024-06-21 09:48:55,455 INFO     Starting server at tcp:port=7000:interface=0.0.0.0
2024-06-21 11:48:55 2024-06-21 09:48:55,455 INFO     HTTP/2 support not enabled (install the http2 and tls Twisted extras)
2024-06-21 11:48:55 2024-06-21 09:48:55,455 INFO     Configuring endpoint tcp:port=7000:interface=0.0.0.0
2024-06-21 11:48:55 2024-06-21 09:48:55,456 INFO     Listening on TCP address 0.0.0.0:7000
2024-06-21 11:48:56 2024-06-21 07:48:56,462 INFO success: uwsgi entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-06-21 11:48:56 2024-06-21 07:48:56,462 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-06-21 11:48:56 2024-06-21 07:48:56,463 INFO success: redis-server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-06-21 11:48:56 2024-06-21 07:48:56,463 INFO success: ws_server entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
alz3abi commented 2 weeks ago

in case you reached here you can fix this problem with adding line to compose file before image line

platform: linux/x86_64

to be like this

Screenshot 2024-06-23 at 1 45 39 AM