Skip to content

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