Skip to content

always serve STATIC_ROOT, for users who don't want debug mode & don't want an nginx proxy stitching things together #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

drewp
Copy link

@drewp drewp commented May 11, 2025

FYE, it seems to almost work to run just this and serve up port 8080:

gunicorn  -c  /opt/apprise/webapp/gunicorn.conf.py  -b  :8080  --worker-tmp-dir /dev/shm core.wsgi

This let me run local forks using pdm and k8s. The missing piece was the serving of STATIC_ROOT, so this PR enables static file serving all the time. I presume this harmless if you do have the ngnix proxy layer-- apprise-api simply won't get the requests.

For reference, Dockerfile:

WORKDIR /opt/apprise
RUN pdm init minimal --non-interactive
RUN pdm add django gevent gunicorn requests "paho-mqtt < 2.0.0" gntp cryptography django-prometheus

COPY apprise/ ./apprise/
RUN pdm add "/opt/apprise/apprise"

COPY apprise-api/apprise_api/ ./webapp/

k8s deployment:

      containers:
      - name: main
        image: reg:5000/apprise_image
        workingDir: /opt/apprise
        command: 
        - pdm
        - run
        - gunicorn 
        - -c 
        - /opt/apprise/webapp/gunicorn.conf.py 
        - -b 
        - :8080 
        - --worker-tmp-dir
        - /dev/shm
        - core.wsgi
        env:
          - name: APPRISE_CONFIG_DIR
            value: /config
          - name: APPRISE_WORKER_COUNT
            value: "2"
        volumeMounts:
         - {name: data, subPath: config, mountPath: /config}

…'t want an nginx proxy stitching things together

--HG--
branch : always-serve-static-files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant