ifpen / chalk-it

Drag-and-drop Python webapps
https://ifpen.github.io/chalk-it/
Apache License 2.0
48 stars 7 forks source link

Docker run with Gunicorn regression #321

Closed bengaid closed 1 month ago

bengaid commented 1 month ago

Dockerfile :

FROM python:3.11

WORKDIR /app

# assume your dashboard is named dashboard.xprjson
COPY . /app/

# install py-chalk-it and gunicorn
RUN pip install py-chalk-it-0.5.0.tar.gz
RUN pip install gunicorn

# this configuration is needed for your app to work, do not change it
ENTRYPOINT ["gunicorn", "chlkt.render:app", "run", "--bind", "0.0.0.0:80"]
docker build . -t application
docker run -p 5000:80 application

Error is the following:

[2024-05-21 09:11:25 +0000] [1] [INFO] Starting gunicorn 22.0.0
[2024-05-21 09:11:25 +0000] [1] [INFO] Listening at: http://0.0.0.0:80 (1)
[2024-05-21 09:11:25 +0000] [1] [INFO] Using worker: sync
[2024-05-21 09:11:25 +0000] [8] [INFO] Booting worker with pid: 8
Failed to find attribute 'app' in 'chlkt.render'.
[2024-05-21 09:11:25 +0000] [8] [INFO] Worker exiting (pid: 8)
[2024-05-21 09:11:25 +0000] [1] [ERROR] Worker (pid:8) exited with code 4
[2024-05-21 09:11:25 +0000] [1] [ERROR] Shutting down: Master
[2024-05-21 09:11:25 +0000] [1] [ERROR] Reason: App failed to loa
bengaid commented 1 month ago

Fixed