GithubHelp home page GithubHelp logo

django-cms / django-cms-quickstart Goto Github PK

View Code? Open in Web Editor NEW
86.0 5.0 348.0 90 KB

A Dockerised django CMS project, ready to deploy on Divio or another Docker-based cloud platform, and run locally in Docker on your own machine. A Divio account is not required.

Home Page: https://docs.django-cms.org/en/latest/introduction/01-install.html

License: MIT License

Dockerfile 1.62% Python 62.68% HTML 35.70%
quickstart docker djangocms

django-cms-quickstart's Introduction

pythonapp

django CMS quickstart

A dockerised django CMS project, ready to deploy on Divio or another Docker-based cloud platform, and run locally in Docker on your own machine.

This version uses Python 3.11 and the most up-to-date versions of Django 4.2, and django CMS 4.1.0

This project is endorsed by the django CMS Association. That means that it is officially accepted by the dCA as being in line with our roadmap vision and development/plugin policy. Join us on Slack for more information or questions.

The documentation for version 4.1 is still work in progress and - for the time being - can be found here: https://django-cms-docs.readthedocs.io/en/latest/

Installation

You need to have Docker installed on your system to run this project.

Try it

git clone [email protected]:django-cms/django-cms-quickstart.git
cd django-cms-quickstart
docker compose build web
docker compose up -d database_default
docker compose run web python manage.py migrate
docker compose run web python manage.py createsuperuser
docker compose up -d

Then open http://django-cms-quickstart.127.0.0.1.nip.io:8000 (or just http://127.0.0.1:8000) in your browser.

You can stop the server with docker compose stop without destroying the containers and restart it with docker compose start.

With docker compose down the containers are deleted, but the database content is still preserved in the named volume django-cms-quickstart_postgres-data and the media files are stored in the file system in data/media. Then you can update the project e. g. by changing the requirements and settings. Finally you can rebuild the web image and start the server again:

docker compose build web
docker compose up -d

Note: Since Compose V2, docker-compose is now included inside docker. For more information, checkout the Compose V2 Documentation.

Customising the project

This project is ready-to-go without making any changes at all, but also gives you some options.

As-is, it will include a number of useful django CMS plugins and Bootstrap 4 for the frontend. You don't have to use these; they're optional. If you don't want to use them, read through the settings.py and requirements.txt files to see sections that can be removed - in each case, the section is noted with a comment containing the word 'optional'.

Options are also available for using Postgres/MySQL, uWSGI/Gunicorn/Guvicorn, etc.

Updating requirements

The project uses a 2 step approach, freezing all dependencies with pip-tools. Read more about how to handle it here: https://blog.typodrive.com/2020/02/04/always-freeze-requirements-with-pip-compile-to-avoid-unpleasant-surprises/

Features

Static Files with Whitenoise

This quickstart demo has a cloud-ready static files setup via django-whitenoise.

In the containerized cloud the application is not served by a web server like nginx but directly through uwsgi. django-whitenoise is the glue that's needed to serve static files in your application directly through uwsgi.

See the django-whitenoise settings in settings.py and the quickstart/templates/whitenoise-static-files-demo.html demo page template that serves a static file.

Contribution

Here is the official django CMS repository: https://github.com/django-cms/django-cms-quickstart/.

Deployment

Note that this is just a demo project to get you started. If you want a full production ready site with all the bells and whistles we recommend you have a look at https://github.com/django-cms/djangocms-template instead.

Env variables

  • to deploy this project in testing mode (recommended) set the environment variable DEBUG to True in your hosting environment.
  • For production environment (if DEBUG is false) django requires you to whitelist the domain. Set the env var DOMAIN to the host, i.e. www.domain.com or *.domain.com.
  • If you want the media hosted on S3 set the DEFAULT_FILE_STORAGE variable accordingly.
  • If you want to access the PostgreSQL database from the host system, set DB_PORT to the desired port number. 5432 is the standard port number. If you run PosgreSQL on your host system, you may want to set another port number. If this variable is empty (the default), the PosgreSQL instance in the container is only reachable within docker, but not from outside.

Deployment Commands

Configure your hosting environment to run the following commands on every deployment:

  • ./manage.py migrate

Divio Deployment

divio.com is a cloud hosting platform optimized for django web applications. It's the quickest way to deploy this project. Here is a video tutorial and a description of the deployment steps that are mostly applicable for this quickstart project.

django-cms-quickstart's People

Contributors

abdur-rahmaanj avatar aiky30 avatar crydotsnake avatar evildmp avatar fp4code avatar fsbraun avatar jpvm5jyyre1vikl avatar maclake avatar marksweb avatar nicolairidani avatar trexchard avatar vinitkumar 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

Watchers

 avatar  avatar  avatar  avatar  avatar

django-cms-quickstart's Issues

Error Trying to Update `requirements.txt`

When I run pip-compile --output-file=requirements.txt requirements.in, I get an error.

Error

    × python setup.py egg_info did not run successfully.
    │ exit code: 1
    ╰─> [25 lines of output]
        /opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/setuptools/config/setupcfg.py:508: SetuptoolsDeprecationWarning: The license_file parameter is deprecated, use license_files instead.
          warnings.warn(msg, warning_class)
        running egg_info
        creating /private/var/folders/dc/zbpxqspx1835__8gfbwrwl_c0000gp/T/pip-pip-egg-info-c1pq6gf_/psycopg2.egg-info
        writing /private/var/folders/dc/zbpxqspx1835__8gfbwrwl_c0000gp/T/pip-pip-egg-info-c1pq6gf_/psycopg2.egg-info/PKG-INFO
        writing dependency_links to /private/var/folders/dc/zbpxqspx1835__8gfbwrwl_c0000gp/T/pip-pip-egg-info-c1pq6gf_/psycopg2.egg-info/dependency_links.txt
        writing top-level names to /private/var/folders/dc/zbpxqspx1835__8gfbwrwl_c0000gp/T/pip-pip-egg-info-c1pq6gf_/psycopg2.egg-info/top_level.txt
        writing manifest file '/private/var/folders/dc/zbpxqspx1835__8gfbwrwl_c0000gp/T/pip-pip-egg-info-c1pq6gf_/psycopg2.egg-info/SOURCES.txt'
        
        Error: pg_config executable not found.
        
        pg_config is required to build psycopg2 from source.  Please add the directory
        containing pg_config to the $PATH or specify the full executable path with the
        option:
        
            python setup.py build_ext --pg-config /path/to/pg_config build ...
        
        or with the pg_config option in 'setup.cfg'.
        
        If you prefer to avoid building psycopg2 from source, please install the PyPI
        'psycopg2-binary' package instead.
        
        For further information please check the 'doc/src/install.rst' file (also at
        <https://www.psycopg.org/docs/install.html>).
        
        [end of output]
    
    note: This error originates from a subprocess, and is likely not a problem with pip.
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 64, in generate_metadata
    call_subprocess(
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/utils/subprocess.py", line 224, in call_subprocess
    raise error
pip._internal.exceptions.InstallationSubprocessError: python setup.py egg_info exited with 1

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/opt/homebrew/bin/pip-compile", line 8, in <module>
    sys.exit(cli())
             ^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/click/decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/piptools/scripts/compile.py", line 592, in cli
    results = resolver.resolve(max_rounds=max_rounds)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/piptools/resolver.py", line 253, in resolve
    has_changed, best_matches = self._resolve_one_round()
                                ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/piptools/resolver.py", line 343, in _resolve_one_round
    their_constraints.extend(self._iter_dependencies(best_match))
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/piptools/resolver.py", line 456, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/piptools/repositories/local.py", line 87, in get_dependencies
    return self.repository.get_dependencies(ireq)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/piptools/repositories/pypi.py", line 242, in get_dependencies
    self._dependencies_cache[ireq] = self.resolve_reqs(
                                     ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/piptools/repositories/pypi.py", line 202, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/resolution/legacy/resolver.py", line 509, in _resolve_one
    dist = self._get_dist_for(req_to_install)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/resolution/legacy/resolver.py", line 462, in _get_dist_for
    dist = self.preparer.prepare_linked_requirement(req)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 491, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 577, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/operations/prepare.py", line 69, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/distributions/sdist.py", line 61, in prepare_distribution_metadata
    self.req.prepare_metadata()
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/req/req_install.py", line 541, in prepare_metadata
    self.metadata_directory = generate_metadata_legacy(
                              ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/pip-tools/6.13.0/libexec/lib/python3.11/site-packages/pip/_internal/operations/build/metadata_legacy.py", line 71, in generate_metadata
    raise MetadataGenerationFailed(package_details=details) from error
pip._internal.exceptions.MetadataGenerationFailed: metadata generation failed

Resolution I Found

I changed psycopg2==2.8.5 to psycopg2-binary==2.9.6 in requirements.in. See:

Questions

  1. Is this a problem on my system?
  2. Is there a more appropriate way to solve this?

Docker build don't work

My Docker build didn't work, I think becaus of django filler...
Am I doing somthing wrong ?

`XYZ:~/_dev/development/django-cms-quickstart$ sudo docker-compose build web
Building web
Sending build context to Docker daemon 188.9kB
Step 1/6 : FROM python:3.9
3.9: Pulling from library/python
5492f66d2700: Pull complete
540ff8c0841d: Pull complete
a0bf850a0df0: Pull complete
d751dc38ae51: Pull complete
9720a112e886: Pull complete
f97b81fbdbd9: Pull complete
e0fc7cdc10cb: Pull complete
c749d2e5ce0f: Pull complete
71985ebd4155: Pull complete
Digest: sha256:0208c1b66de6e22480b3ad6334fc4fe2ef030572cf1fb1f699e68038fafcad00
Status: Downloaded newer image for python:3.9
---> 40264b427ab5
Step 2/6 : WORKDIR /app
---> Running in c7118202e88e
Removing intermediate container c7118202e88e
---> 9b576bf5f2cb
Step 3/6 : COPY . /app
---> f63e7e1eb0fa
Step 4/6 : RUN pip install -r requirements.txt
---> Running in 1ae5bcc35214
Collecting django-filer@ https://github.com/django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e3d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c57f6d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e760>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e280>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e0d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /django-cms/django-filer/archive/refs/tags/2.1.1.zip (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e4f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
ERROR: Service 'web' failed to build : Build failed
`

Drop Django 3.1 from requirements

Support for Django 3.1 ended early December 2021, so I see two choices.

We either drop back to 2.2 which ends LTS in April, or we move to 3.2 and drop admin style.

Database is not persistent

After shutting down the server with docker compose down and restarting with docker compose up the previously populated database is not mounted anymore because the database files aren’t saved in a named volume.

I’m going to create a PR to fix that.

Postgres port conflict when postgres is running on host

It’s not unusual that a web devoloper runs an own postgres instance on the host, which also uses port 5432. In this case django-cms-quickstart fails to launch as it also wants to expose port 5432 on the host.

  database_default:
  #
    ports:
      - "5432:5432/tcp"  # allow your local dev env to connect to the db

Possible solutions:

  • Don’t expose the port on the host:
-  ":5432/tcp"  # Don’t allow your local dev env to connect to the db
  • Expose a non-standard port:
- "5433:5432/tcp"  # allow your local dev env to connect to the db on a non-standard port
  • Use an environment variable and let the user decide.

Failed to build docker image

I am following the installation guide on docs and encountered failure when trying to build docker image. It seems that it is caused by a new dependency resolver of pip.

Environment:

  • System: Ubuntu 20.04 LTS
  • Docker: version 20.10.8, build 3967b7d28e
  • Docker Compose: version 1.26.2, build eefe0d31
  • django-cms-quickstart: hash 38fedf7719

Output:

ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.                                                                                                                                   

django-filer 2.1rc4 requires easy-thumbnails>=2.8rc0, but you'll have easy-thumbnails 2.7.1 which is incompatible.                                                                                                                                            
Successfully installed Pillow-8.3.2 Unidecode-1.1.2 asgiref-3.4.1 boto3-1.14.49 botocore-1.17.63 dj-database-url-0.5.0 django-3.1.13 django-classy-tags-2.0.0 django-cms-3.9.0 django-filer-2.1rc4 django-formtools-2.3 django-js-asset-1.2.2 django-mptt-0.13.4 django-polymorphic-3.0.0 django-sekizai-2.0.0 django-storage-url-0.5.0 django-storages-1.11.1 django-treebeard-4.5.1 djangocms-admin-style-2.0.2 djangocms-attributes-field-2.0.0 djangocms-bootstrap5-0.1.0 djangocms-file-3.0.0 djangocms-googlemap-2.0.0 djangocms-icon-2.0.0 djangocms-link-3.0.0 djangocms-picture-3.0.0 djangocms-style-3.0.0 djangocms-text-ckeditor-4.0.0 djangocms-video-3.0.0 docutils-0.15.2 easy-thumbnails-2.7.1 furl-2.1.3 html5lib-1.1 jmespath-0.10.0 orderedmultidict-1.0.1 psycopg2-2.8.5 python-dateutil-2.8.2 pytz-2021.1 s3transfer-0.3.7 six-1.16.0 sqlparse-0.4.2 urllib3-1.25.11 uwsgi-2.0.19.1 webencodings-0.5.1 whitenoise-5.2.0
WARNING: You are using pip version 20.2.4; however, version 21.2.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.                                                                                                                                                           
Removing intermediate container dbfc9d54476b
 ---> bf2103f4c737
Step 5/6 : RUN python manage.py collectstatic --noinput
 ---> Running in 26bde774232b
Traceback (most recent call last):
  File "manage.py", line 22, in <module>                                                                                                                                                                                                                      
    main()                                                                                                                                                                                                                                                    
  File "manage.py", line 18, in main                                                                                                                                                                                                                          
    execute_from_command_line(sys.argv)                                                                                                                                                                                                                       
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line                                                                                                                                    
    utility.execute()                                                                                                                                                                                                                                         
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute                                                                                                                                                      
    django.setup()                                                                                                                                                                                                                                            
  File "/usr/local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup                                                                                                                                                                         
    apps.populate(settings.INSTALLED_APPS)                                                                                                                                                                                                                    
  File "/usr/local/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate                                                                                                                                                                
    app_config.import_models()                                                                                                                                                                                                                                
  File "/usr/local/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models                                                                                                                                                             
    self.models_module = import_module(models_module_name)                                                                                                                                                                                                    
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module                                                                                                                                                                           
    return _bootstrap._gcd_import(name[level:], package, level)                                                                                                                                                                                               
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import                                                                                                                                                                                             
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load                                                                                                                                                                                           
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked                                                                                                                                                                                  
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked                                                                                                                                                                                           
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module                                                                                                                                                                                     
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed                                                                                                                                                                                
  File "/usr/local/lib/python3.8/site-packages/filer/models/__init__.py", line 4, in <module>                                                                                                                                                                 
    from .imagemodels import *  # noqa                                                                                                                                                                                                                        
  File "/usr/local/lib/python3.8/site-packages/filer/models/imagemodels.py", line 9, in <module>                                                                                                                                                              
    from .abstract import BaseImage                                                                                                                                                                                                                           
  File "/usr/local/lib/python3.8/site-packages/filer/models/abstract.py", line 7, in <module>                                                                                                                                                                 
    from easy_thumbnails.VIL import Image as VILImage                                                                                                                                                                                                         
ModuleNotFoundError: No module named 'easy_thumbnails.VIL'                                                                                                                                                                                                    
ERROR: Service 'web' failed to build: The command '/bin/sh -c python manage.py collectstatic --noinput' returned a non-zero code: 1
Full output
database_default uses an image, skipping
Building web
Step 1/6 : FROM python:3.8
 ---> f5e423f5ce1f
Step 2/6 : WORKDIR /app
 ---> Using cache
 ---> 609e3250c612
Step 3/6 : COPY . /app
 ---> 61d65883f31d
Step 4/6 : RUN pip install -r requirements.txt
 ---> Running in dbfc9d54476b
Collecting django<3.2,>=3.1
  Downloading Django-3.1.13-py3-none-any.whl (7.8 MB)
Collecting dj-database-url==0.5.0
  Downloading dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
Collecting django-storage-url==0.5.0
  Downloading django_storage_url-0.5.0-py2.py3-none-any.whl (6.5 kB)
Collecting whitenoise==5.2.0
  Downloading whitenoise-5.2.0-py2.py3-none-any.whl (19 kB)
Collecting boto3==1.14.49
  Downloading boto3-1.14.49-py2.py3-none-any.whl (129 kB)
Collecting psycopg2==2.8.5
  Downloading psycopg2-2.8.5.tar.gz (380 kB)
Collecting uwsgi==2.0.19.1
  Downloading uWSGI-2.0.19.1.tar.gz (803 kB)
Collecting django-cms<4
  Downloading django_cms-3.9.0-py2.py3-none-any.whl (2.1 MB)
Collecting django-classy-tags>=2.0
  Downloading django_classy_tags-2.0.0-py3-none-any.whl (23 kB)
Collecting django-sekizai>=2.0
  Downloading django_sekizai-2.0.0-py3-none-any.whl (12 kB)
Collecting six
  Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting pytz
  Downloading pytz-2021.1-py2.py3-none-any.whl (510 kB)
Collecting djangocms-admin-style<3.0,>=2.0
  Downloading djangocms_admin_style-2.0.2-py3-none-any.whl (404 kB)
Collecting djangocms-text-ckeditor<5.0,>=4.0
  Downloading djangocms_text_ckeditor-4.0.0-py3-none-any.whl (2.1 MB)
Collecting djangocms-link<4.0,>=3.0
  Downloading djangocms_link-3.0.0-py3-none-any.whl (202 kB)
Collecting djangocms-icon<3.0,>=2.0
  Downloading djangocms_icon-2.0.0-py3-none-any.whl (162 kB)
Collecting djangocms-style<4.0,>=3.0
  Downloading djangocms_style-3.0.0-py3-none-any.whl (127 kB)
Collecting djangocms-googlemap<3.0,>=2.0
  Downloading djangocms_googlemap-2.0.0-py3-none-any.whl (217 kB)
Collecting djangocms-video<4.0,>=3.0
  Downloading djangocms_video-3.0.0-py3-none-any.whl (165 kB)
Collecting djangocms-file<4.0,>=3.0
  Downloading djangocms_file-3.0.0-py3-none-any.whl (140 kB)
Collecting djangocms-picture<4.0,>=3.0
  Downloading djangocms_picture-3.0.0-py3-none-any.whl (208 kB)
Collecting djangocms_bootstrap5
  Downloading https://github.com/gl-agnx/djangocms-bootstrap5/archive/refs/heads/master.zip
Collecting django-filer
  Downloading https://github.com/django-cms/django-filer/archive/refs/tags/2.1rc4.zip (1.7 MB)
Collecting sqlparse>=0.2.2
  Downloading sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting asgiref<4,>=3.2.10
  Downloading asgiref-3.4.1-py3-none-any.whl (25 kB)
Collecting furl
  Downloading furl-2.1.3-py2.py3-none-any.whl (20 kB)
Collecting django-storages
  Downloading django_storages-1.11.1-py3-none-any.whl (42 kB)
Collecting botocore<1.18.0,>=1.17.49
  Downloading botocore-1.17.63-py2.py3-none-any.whl (6.6 MB)
Collecting jmespath<1.0.0,>=0.7.1
  Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting s3transfer<0.4.0,>=0.3.0
  Downloading s3transfer-0.3.7-py2.py3-none-any.whl (73 kB)
Collecting django-treebeard>=4.3
  Downloading django_treebeard-4.5.1-py3-none-any.whl (103 kB)
Collecting django-formtools>=2.1
  Downloading django_formtools-2.3-py3-none-any.whl (148 kB)
Collecting Pillow
  Downloading Pillow-8.3.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (3.0 MB)
Collecting html5lib>=1
  Downloading html5lib-1.1-py2.py3-none-any.whl (112 kB)
Collecting djangocms-attributes-field>=1
  Downloading djangocms_attributes_field-2.0.0-py3-none-any.whl (16 kB)
Collecting easy-thumbnails
  Downloading easy-thumbnails-2.7.1.tar.gz (72 kB)
Collecting django-mptt<1.0,>=0.6
  Downloading django_mptt-0.13.4-py3-none-any.whl (137 kB)
Collecting django-polymorphic<3.1,>=2
  Downloading django_polymorphic-3.0.0-py2.py3-none-any.whl (64 kB)
Collecting Unidecode<1.2,>=0.04
  Downloading Unidecode-1.1.2-py2.py3-none-any.whl (239 kB)
Collecting orderedmultidict>=1.0.1
  Downloading orderedmultidict-1.0.1-py2.py3-none-any.whl (11 kB)
Collecting python-dateutil<3.0.0,>=2.1
  Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting urllib3<1.26,>=1.20; python_version != "3.4"
  Downloading urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
Collecting docutils<0.16,>=0.10
  Downloading docutils-0.15.2-py3-none-any.whl (547 kB)
Collecting webencodings
  Downloading webencodings-0.5.1-py2.py3-none-any.whl (11 kB)
Collecting django-js-asset
  Downloading django_js_asset-1.2.2-py2.py3-none-any.whl (5.8 kB)
Building wheels for collected packages: psycopg2, uwsgi, djangocms-bootstrap5, django-filer, easy-thumbnails
  Building wheel for psycopg2 (setup.py): started
  Building wheel for psycopg2 (setup.py): finished with status 'done'
  Created wheel for psycopg2: filename=psycopg2-2.8.5-cp38-cp38-linux_x86_64.whl size=500503 sha256=937bcb9af4c61ab310562a6a0d969d10d2e6e977103a11e2f14dd1ce852e0055
  Stored in directory: /root/.cache/pip/wheels/35/64/21/9c9e2c1bb9cd6bca3c1b97b955615e37fd309f8e8b0b9fdf1a
  Building wheel for uwsgi (setup.py): started
  Building wheel for uwsgi (setup.py): finished with status 'done'
  Created wheel for uwsgi: filename=uWSGI-2.0.19.1-cp38-cp38-linux_x86_64.whl size=583342 sha256=de8612c54c58c9b8a221567ba62d495bf647f233383cc1cd96bf480140198baa
  Stored in directory: /root/.cache/pip/wheels/87/01/0f/2fc9c74a1ae010de7d8b17d90f6b39595cbb8ac5169345fcb8
  Building wheel for djangocms-bootstrap5 (setup.py): started
  Building wheel for djangocms-bootstrap5 (setup.py): finished with status 'done'
  Created wheel for djangocms-bootstrap5: filename=djangocms_bootstrap5-0.1.0-py3-none-any.whl size=180986 sha256=a1c4925503cb04433c361ff7da29708272b1a91009099c7e7cf118135ddf269a
  Stored in directory: /tmp/pip-ephem-wheel-cache-98qp7vyh/wheels/34/c6/0d/bf51cff0c5c39e4b647e19fe8df3dbed9cac7dc9248bf3119a
  Building wheel for django-filer (setup.py): started
  Building wheel for django-filer (setup.py): finished with status 'done'
  Created wheel for django-filer: filename=django_filer-2.1rc4-py3-none-any.whl size=1137686 sha256=8a026c6c00a07c5fa1fc202a430b0b205cb59c22ba02487c9d8ec78722a9312b
  Stored in directory: /tmp/pip-ephem-wheel-cache-98qp7vyh/wheels/db/01/b2/758b2af96fcd5efd95fd3af73aa52d873700669e9768ba32ce
  Building wheel for easy-thumbnails (setup.py): started
  Building wheel for easy-thumbnails (setup.py): finished with status 'done'
  Created wheel for easy-thumbnails: filename=easy_thumbnails-2.7.1-py3-none-any.whl size=69767 sha256=57a8d774f16a5ffc5be0b8a2c71924e309d2a7a2c25b6cba6a1a01ef97e414aa
  Stored in directory: /root/.cache/pip/wheels/3d/6d/dd/af96f3bfbf4c094f5aedb9ee2c2068aca25e2aa17feef501ee
Successfully built psycopg2 uwsgi djangocms-bootstrap5 django-filer easy-thumbnails
Installing collected packages: sqlparse, pytz, asgiref, django, dj-database-url, six, orderedmultidict, furl, django-storages, django-storage-url, whitenoise, python-dateutil, urllib3, jmespath, docutils, botocore, s3transfer, boto3, psycopg2, uwsgi, djangocms-admin-style, django-classy-tags, django-sekizai, django-treebeard, django-formtools, django-cms, Pillow, webencodings, html5lib, djangocms-text-ckeditor, django-js-asset, django-mptt, django-polymorphic, easy-thumbnails, Unidecode, django-filer, djangocms-attributes-field, djangocms-link, djangocms-icon, djangocms-style, djangocms-googlemap, djangocms-video, djangocms-file, djangocms-picture, djangocms-bootstrap5
ERROR: After October 2020 you may experience errors when installing or updating packages. This is because pip will change the way that it resolves dependency conflicts.

We recommend you use --use-feature=2020-resolver to test your packages with the new resolver before it becomes the default.                                                                                                                                   

django-filer 2.1rc4 requires easy-thumbnails>=2.8rc0, but you'll have easy-thumbnails 2.7.1 which is incompatible.                                                                                                                                            
Successfully installed Pillow-8.3.2 Unidecode-1.1.2 asgiref-3.4.1 boto3-1.14.49 botocore-1.17.63 dj-database-url-0.5.0 django-3.1.13 django-classy-tags-2.0.0 django-cms-3.9.0 django-filer-2.1rc4 django-formtools-2.3 django-js-asset-1.2.2 django-mptt-0.13.4 django-polymorphic-3.0.0 django-sekizai-2.0.0 django-storage-url-0.5.0 django-storages-1.11.1 django-treebeard-4.5.1 djangocms-admin-style-2.0.2 djangocms-attributes-field-2.0.0 djangocms-bootstrap5-0.1.0 djangocms-file-3.0.0 djangocms-googlemap-2.0.0 djangocms-icon-2.0.0 djangocms-link-3.0.0 djangocms-picture-3.0.0 djangocms-style-3.0.0 djangocms-text-ckeditor-4.0.0 djangocms-video-3.0.0 docutils-0.15.2 easy-thumbnails-2.7.1 furl-2.1.3 html5lib-1.1 jmespath-0.10.0 orderedmultidict-1.0.1 psycopg2-2.8.5 python-dateutil-2.8.2 pytz-2021.1 s3transfer-0.3.7 six-1.16.0 sqlparse-0.4.2 urllib3-1.25.11 uwsgi-2.0.19.1 webencodings-0.5.1 whitenoise-5.2.0
WARNING: You are using pip version 20.2.4; however, version 21.2.4 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.                                                                                                                                                           
Removing intermediate container dbfc9d54476b
 ---> bf2103f4c737
Step 5/6 : RUN python manage.py collectstatic --noinput
 ---> Running in 26bde774232b
Traceback (most recent call last):
  File "manage.py", line 22, in <module>                                                                                                                                                                                                                      
    main()                                                                                                                                                                                                                                                    
  File "manage.py", line 18, in main                                                                                                                                                                                                                          
    execute_from_command_line(sys.argv)                                                                                                                                                                                                                       
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line                                                                                                                                    
    utility.execute()                                                                                                                                                                                                                                         
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 377, in execute                                                                                                                                                      
    django.setup()                                                                                                                                                                                                                                            
  File "/usr/local/lib/python3.8/site-packages/django/__init__.py", line 24, in setup                                                                                                                                                                         
    apps.populate(settings.INSTALLED_APPS)                                                                                                                                                                                                                    
  File "/usr/local/lib/python3.8/site-packages/django/apps/registry.py", line 114, in populate                                                                                                                                                                
    app_config.import_models()                                                                                                                                                                                                                                
  File "/usr/local/lib/python3.8/site-packages/django/apps/config.py", line 211, in import_models                                                                                                                                                             
    self.models_module = import_module(models_module_name)                                                                                                                                                                                                    
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module                                                                                                                                                                           
    return _bootstrap._gcd_import(name[level:], package, level)                                                                                                                                                                                               
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import                                                                                                                                                                                             
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load                                                                                                                                                                                           
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked                                                                                                                                                                                  
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked                                                                                                                                                                                           
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module                                                                                                                                                                                     
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed                                                                                                                                                                                
  File "/usr/local/lib/python3.8/site-packages/filer/models/__init__.py", line 4, in <module>                                                                                                                                                                 
    from .imagemodels import *  # noqa                                                                                                                                                                                                                        
  File "/usr/local/lib/python3.8/site-packages/filer/models/imagemodels.py", line 9, in <module>                                                                                                                                                              
    from .abstract import BaseImage                                                                                                                                                                                                                           
  File "/usr/local/lib/python3.8/site-packages/filer/models/abstract.py", line 7, in <module>                                                                                                                                                                 
    from easy_thumbnails.VIL import Image as VILImage                                                                                                                                                                                                         
ModuleNotFoundError: No module named 'easy_thumbnails.VIL'                                                                                                                                                                                                    
ERROR: Service 'web' failed to build: The command '/bin/sh -c python manage.py collectstatic --noinput' returned a non-zero code: 1

No css is loaded

Trying this out for the first time, and the css is not available. I'm guessing it needs bootstrap 5?
I'm using docker container to run this.

RuntimeError: can't start new thread

Well, it seems like there is an error and I don't know what I should do.

My os is centos7.9

[root@iZ2zedlcj4rmyxonj7ks6wZ django-cms-quickstart]# docker-compose build web
Building web
Step 1/6 : FROM python:3.9
---> 49d20c6af9a6
Step 2/6 : WORKDIR /app
---> Using cache
---> 462b8ea25057
Step 3/6 : COPY . /app
---> Using cache
---> 11c7a1963625
Step 4/6 : RUN pip install -r requirements.txt
---> Running in f3bda0017904
Collecting asgiref==3.7.2
Downloading asgiref-3.7.2-py3-none-any.whl (24 kB)
Collecting boto3==1.14.49
Downloading boto3-1.14.49-py2.py3-none-any.whl (129 kB)
ERROR: Exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/base_command.py", line 160, in exc_logging_wrapper
status = run_func(*args)
File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/req_command.py", line 247, in wrapper
return func(self, options, args)
File "/usr/local/lib/python3.9/site-packages/pip/_internal/commands/install.py", line 419, in run
requirement_set = resolver.resolve(
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/resolver.py", line 92, in resolve
result = self._result = resolver.resolve(
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 481, in resolve
state = resolution.resolve(requirements, max_rounds=max_rounds)
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 348, in resolve
self._add_to_criteria(self.state.criteria, r, parent=None)
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/resolvelib/resolvers.py", line 172, in _add_to_criteria
if not criterion.candidates:
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/resolvelib/structs.py", line 151, in bool
return bool(self._sequence)
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 155, in bool
return any(self)
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 143, in
return (c for c in iterator if id(c) not in self._incompatible_ids)
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/found_candidates.py", line 47, in _iter_built
candidate = func()
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/factory.py", line 206, in _make_candidate_from_link
self._link_candidate_cache[link] = LinkCandidate(
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 297, in init
super().init(
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 162, in init
self.dist = self._prepare()
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 231, in _prepare
dist = self._prepare_distribution()
File "/usr/local/lib/python3.9/site-packages/pip/_internal/resolution/resolvelib/candidates.py", line 308, in _prepare_distribution
return preparer.prepare_linked_requirement(self._ireq, parallel_builds=True)
File "/usr/local/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 491, in prepare_linked_requirement
return self._prepare_linked_requirement(req, parallel_builds)
File "/usr/local/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 536, in _prepare_linked_requirement
local_file = unpack_url(
File "/usr/local/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 166, in unpack_url
file = get_http_url(
File "/usr/local/lib/python3.9/site-packages/pip/_internal/operations/prepare.py", line 107, in get_http_url
from_path, content_type = download(link, temp_dir.path)
File "/usr/local/lib/python3.9/site-packages/pip/_internal/network/download.py", line 147, in call
for chunk in chunks:
File "/usr/local/lib/python3.9/site-packages/pip/_internal/cli/progress_bars.py", line 52, in _rich_progress_bar
with progress:
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/rich/progress.py", line 1169, in enter
self.start()
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/rich/progress.py", line 1160, in start
self.live.start(refresh=True)
File "/usr/local/lib/python3.9/site-packages/pip/_vendor/rich/live.py", line 132, in start
self._refresh_thread.start()
File "/usr/local/lib/python3.9/threading.py", line 899, in start
_start_new_thread(self._bootstrap, ())
RuntimeError: can't start new thread

[notice] A new release of pip is available: 23.0.1 -> 23.2.1
[notice] To update, run: pip install --upgrade pip
ERROR: Service 'web' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 2

Logs file

Hello, is there a file where the logs are saved?

Fresh cloned repo fail to start migrations

I try to install using instruction :

git clone [email protected]:django-cms/django-cms-quickstart.git
cd django-cms-quickstart
docker compose build web
docker compose up -d database_default
docker compose run web python manage.py migrate
docker compose run web python manage.py createsuperuser
docker compose up -d

After manual fix #16 by using double quotes .
Next command which fail is : "docker compose run web python manage.py migrate"

It fail with :

 ⠿ Container b2b-database_default-1  Started                                                                                                                                                                                                                                                                       0.7s
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.8/site-packages/psycopg2/__init__.py", line 127, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
psycopg2.OperationalError: could not connect to server: Connection refused
        Is the server running on host "database_default" (172.18.0.2) and accepting
        TCP/IP connections on port 5432?


The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 401, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.8/site-packages/django/core/management/__init__.py", line 395, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 330, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 371, in execute
    output = self.handle(*args, **options)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/base.py", line 85, in wrapped
    res = handle_func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/core/management/commands/migrate.py", line 92, in handle
    executor = MigrationExecutor(connection, self.migration_progress_callback)
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/loader.py", line 53, in __init__
    self.build_graph()
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/loader.py", line 216, in build_graph
    self.applied_migrations = recorder.applied_migrations()
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 77, in applied_migrations
    if self.has_table():
  File "/usr/local/lib/python3.8/site-packages/django/db/migrations/recorder.py", line 55, in has_table
    with self.connection.cursor() as cursor:
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 259, in cursor
    return self._cursor()
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 235, in _cursor
    self.ensure_connection()
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.8/site-packages/django/db/utils.py", line 90, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection
    self.connect()
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect
    self.connection = self.get_new_connection(conn_params)
  File "/usr/local/lib/python3.8/site-packages/django/utils/asyncio.py", line 26, in inner
    return func(*args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/django/db/backends/postgresql/base.py", line 187, in get_new_connection
    connection = Database.connect(**conn_params)
  File "/usr/local/lib/python3.8/site-packages/psycopg2/__init__.py", line 127, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
django.db.utils.OperationalError: could not connect to server: Connection refused
        Is the server running on host "database_default" (172.18.0.2) and accepting
        TCP/IP connections on port 5432?

Docker build don't work

My Docker build didn't work

$docker compose build web
[+] Building 11.1s (9/9) FINISHED                                       docker:desktop-linux
 => [web internal] load build definition from Dockerfile                                   
 => => transferring dockerfile: 212B                               
 => [web internal] load .dockerignore                    
 => => transferring context: 2B     
 => [web internal] load metadata for docker.io/library/python:3.11                                      
 => [web 1/5] FROM docker.io/library/python:3.11@sha256:204d3ef2fd0fcd127c0a3735cd190865e68c3b0b5db2c333eba50a50f7833be 
 => [web internal] load build context                                        
 => => transferring context: 2.95kB
 => CACHED [web 2/5] WORKDIR /app
 => CACHED [web 3/5] COPY . /app
 => CACHED [web 4/5] RUN pip install -r requirements.txt
 => ERROR [web 5/5] RUN python manage.py collectstatic --noinput
------                                                                                                                        
 > [web 5/5] RUN python manage.py collectstatic --noinput:

uWSGI not support in windows

(venv) E:\cms>pip install -r requirements.txt
Collecting asgiref==3.5.2
Using cached asgiref-3.5.2-py3-none-any.whl (22 kB)
Collecting boto3==1.14.49
Using cached boto3-1.14.49-py2.py3-none-any.whl (129 kB)
Collecting botocore==1.17.63
Using cached botocore-1.17.63-py2.py3-none-any.whl (6.6 MB)
Collecting build==0.8.0
Using cached build-0.8.0-py3-none-any.whl (17 kB)
Collecting click==8.1.3
Using cached click-8.1.3-py3-none-any.whl (96 kB)
Collecting cssselect2==0.7.0
Using cached cssselect2-0.7.0-py3-none-any.whl (15 kB)
Collecting dj-database-url==0.5.0
Using cached dj_database_url-0.5.0-py2.py3-none-any.whl (5.5 kB)
Collecting django==3.2
Using cached Django-3.2-py3-none-any.whl (7.9 MB)
Collecting django-appconf==1.0.5
Using cached django_appconf-1.0.5-py3-none-any.whl (6.4 kB)
Collecting django-classy-tags==3.0.1
Using cached django_classy_tags-3.0.1-py3-none-any.whl (14 kB)
Collecting django-cms==3.11.0
Using cached django_cms-3.11.0-py2.py3-none-any.whl (2.1 MB)
Collecting django-entangled==0.4
Using cached django-entangled-0.4.tar.gz (10 kB)
Collecting django-filer==2.2.3
Using cached django_filer-2.2.3-py3-none-any.whl (1.1 MB)
Collecting django-formtools==2.3
Using cached django_formtools-2.3-py3-none-any.whl (148 kB)
Collecting django-js-asset==2.0.0
Using cached django_js_asset-2.0.0-py3-none-any.whl (4.9 kB)
Collecting django-mptt==0.13.4
Using cached django_mptt-0.13.4-py3-none-any.whl (137 kB)
Collecting django-polymorphic==3.1.0
Using cached django_polymorphic-3.1.0-py3-none-any.whl (63 kB)
Collecting django-sekizai==4.0.0
Using cached django_sekizai-4.0.0-py3-none-any.whl (8.6 kB)
Collecting django-select2==7.10.1
Using cached django_select2-7.10.1-py2.py3-none-any.whl (14 kB)
Collecting django-storage-url==0.5.0
Using cached django_storage_url-0.5.0-py2.py3-none-any.whl (6.5 kB)
Collecting django-storages==1.13.1
Using cached django_storages-1.13.1-py3-none-any.whl (46 kB)
Collecting django-treebeard==4.4
Using cached django_treebeard-4.4-py3-none-any.whl (103 kB)
Collecting djangocms-admin-style==3.2.0
Using cached djangocms_admin_style-3.2.0-py3-none-any.whl (406 kB)
Collecting djangocms-attributes-field==2.1.0
Using cached djangocms_attributes_field-2.1.0-py3-none-any.whl (16 kB)
Collecting djangocms-file==3.0.0
Using cached djangocms_file-3.0.0-py3-none-any.whl (140 kB)
Collecting djangocms-frontend==1.0.0
Using cached djangocms_frontend-1.0.0-py3-none-any.whl (296 kB)
Collecting djangocms-googlemap==2.0.0
Using cached djangocms_googlemap-2.0.0-py3-none-any.whl (217 kB)
Collecting djangocms-icon==2.0.0
Using cached djangocms_icon-2.0.0-py3-none-any.whl (162 kB)
Collecting djangocms-picture==3.0.0
Using cached djangocms_picture-3.0.0-py3-none-any.whl (208 kB)
Collecting djangocms-style==3.0.0
Using cached djangocms_style-3.0.0-py3-none-any.whl (127 kB)
Collecting djangocms-text-ckeditor==5.1.1
Using cached djangocms_text_ckeditor-5.1.1-py3-none-any.whl (2.1 MB)
Collecting djangocms-video==3.0.0
Using cached djangocms_video-3.0.0-py3-none-any.whl (165 kB)
Collecting docutils==0.15.2
Using cached docutils-0.15.2-py3-none-any.whl (547 kB)
Collecting easy-thumbnails[svg]==2.8.3
Using cached easy_thumbnails-2.8.3-py3-none-any.whl (75 kB)
Collecting furl==2.1.3
Using cached furl-2.1.3-py2.py3-none-any.whl (20 kB)
Collecting html5lib==1.1
Using cached html5lib-1.1-py2.py3-none-any.whl (112 kB)
Collecting jmespath==0.10.0
Using cached jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting lxml==4.9.1
Using cached lxml-4.9.1-cp310-cp310-win_amd64.whl (3.6 MB)
Collecting orderedmultidict==1.0.1
Using cached orderedmultidict-1.0.1-py2.py3-none-any.whl (11 kB)
Collecting packaging==21.3
Using cached packaging-21.3-py3-none-any.whl (40 kB)
Collecting pep517==0.13.0
Using cached pep517-0.13.0-py3-none-any.whl (18 kB)
Collecting pillow==9.2.0
Using cached Pillow-9.2.0-cp310-cp310-win_amd64.whl (3.3 MB)
Collecting pip-tools==6.8.0
Using cached pip_tools-6.8.0-py3-none-any.whl (51 kB)
Collecting psycopg2==2.8.5
Using cached psycopg2-2.8.5.tar.gz (380 kB)
Collecting pyparsing==3.0.9
Using cached pyparsing-3.0.9-py3-none-any.whl (98 kB)
Collecting python-dateutil==2.8.2
Using cached python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting pytz==2022.2.1
Using cached pytz-2022.2.1-py2.py3-none-any.whl (500 kB)
Collecting reportlab==3.6.11
Using cached reportlab-3.6.11-cp310-cp310-win_amd64.whl (2.3 MB)
Collecting s3transfer==0.3.7
Using cached s3transfer-0.3.7-py2.py3-none-any.whl (73 kB)
Collecting six==1.16.0
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Collecting sqlparse==0.4.2
Using cached sqlparse-0.4.2-py3-none-any.whl (42 kB)
Collecting svglib==1.4.1
Using cached svglib-1.4.1.tar.gz (913 kB)
Collecting tinycss2==1.1.1
Using cached tinycss2-1.1.1-py3-none-any.whl (21 kB)
Collecting tomli==2.0.1
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Collecting unidecode==1.1.2
Using cached Unidecode-1.1.2-py2.py3-none-any.whl (239 kB)
Collecting urllib3==1.25.11
Using cached urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
Collecting uwsgi==2.0.19.1
Using cached uWSGI-2.0.19.1.tar.gz (803 kB)
ERROR: Command errored out with exit status 1:
command: 'E:\cms\venv\Scripts\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Negative\AppData\Local\Temp\pip-install-kecf4rfi\uwsgi_6e72ecaf001a42c090536d95af70750f\setup.py'"'"'; file='"'"'C:\Users\Negative\AppData\Local\Temp\pip-install-kecf4rfi\uwsgi_6e72ecaf001a42c090536d95af70750f\setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\Negative\AppData\Local\Temp\pip-pip-egg-info-wi0se1se'
cwd: C:\Users\Negative\AppData\Local\Temp\pip-install-kecf4rfi\uwsgi_6e72ecaf001a42c090536d95af70750f
Complete output (7 lines):
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Negative\AppData\Local\Temp\pip-install-kecf4rfi\uwsgi_6e72ecaf001a42c090536d95af70750f\setup.py", line 3, in
import uwsgiconfig as uc
File "C:\Users\Negative\AppData\Local\Temp\pip-install-kecf4rfi\uwsgi_6e72ecaf001a42c090536d95af70750f\uwsgiconfig.py", line 8, in
uwsgi_os = os.uname()[0]
AttributeError: module 'os' has no attribute 'uname'. Did you mean: 'name'?
----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c7/75/45234f7b441c59b1eefd31ba3d1041a7e3c89602af24488e2a22e11e7259/uWSGI-2.0.19.1.tar.gz#sha256=faa85e053c0b1be4d5585b0858d3a511d2cd10201802e8676060fd0a109e5869 (from https://pypi.org/simple/uwsgi/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement uwsgi==2.0.19.1 (from versions: 1.4.9, 1.4.10, 1.9, 1.9.1, 1.9.2, 1.9.3, 1.9.4, 1.9.5, 1.9.6, 1.9.7, 1.9.8, 1.9.9, 1.9.10, 1.9.11, 1.9.12, 1.9.13, 1.9.14, 1.9.15, 1.9.16, 1.9.17, 1.9.17.1, 1.9.18, 1.9.18.1, 1.9.18.2, 1.9.19, 1.9.20, 1.9.21, 1.9.21.1, 2.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.5.1, 2.0.6, 2.0.7, 2.0.8, 2.0.9, 2.0.10, 2.0.11, 2.0.11.1, 2.0.11.2, 2.0.12, 2.0.13, 2.0.13.1, 2.0.14, 2.0.15, 2.0.16, 2.0.17, 2.0.17.1, 2.0.18, 2.0.19, 2.0.19.1, 2.0.20, 2.0.21)
ERROR: No matching distribution found for uwsgi==2.0.19.1

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.