Skip to content

Commit

Permalink
install supervisor for xloader
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Bayr committed Mar 25, 2024
1 parent 3d86b43 commit 956aa63
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 3 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/edge-sddi-urban.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,9 @@ jobs:
with:
images: |
${{ env.REGISTRY }}/it-at-m/ckan-${{ matrix.context }}
flavor: latest=true
tags: |
type=edge,branch=sddi-urban-2.9.9,suffix=-2.9.9-dev
type=raw,value=udp-katalog-1.1.3
type=raw,value=udp-katalog-1.1.4-dev
labels: |
maintainer=it@m, Landeshauptstadt Muenchen (LHM)
org.opencontainers.image.vendor=it@m, Landeshauptstadt Muenchen (LHM)
Expand All @@ -66,7 +65,7 @@ jobs:
${{ env.REGISTRY }}/it-at-m/ckan-${{ matrix.context }}
tags: |
type=edge,branch=sddi-urban-2.9.9,suffix=-2.9.9-debug-dev
type=raw,value=udp-katalog-1.1.3-debug
type=raw,value=udp-katalog-1.1.4-debug-dev
labels: |
maintainer=it@m, Landeshauptstadt Muenchen (LHM)
org.opencontainers.image.vendor=it@m, Landeshauptstadt Muenchen (LHM)
Expand Down
6 changes: 6 additions & 0 deletions sddi-urban/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ RUN set -ex && \
RUN set -ex && \
pip install --no-index --find-links=${APP_DIR}/ext_wheels ckanext-iso

# install supervisor ########################################################
RUN set -ex && \
apt-get update && \
apt-get install supervisor
COPY supervisor/supervisor-ckan-worker.conf /etc/supervisor/conf.d


RUN set -ex && \
ckan config-tool "${CKAN_INI}" "ckan.plugins = ${CKAN__PLUGINS}" && \
Expand Down
42 changes: 42 additions & 0 deletions sddi-urban/supervisor/supervisor-ckan-worker.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
; =======================================================
; Supervisor configuration for CKAN background job worker
; =======================================================

; 1. Copy this file to /etc/supervisor/conf.d
; 2. Make sure the paths below match your setup


[program:ckan-worker]

; Use the full paths to the virtualenv and your configuration file here.
command=/usr/local/bin/ckan -c /srv/app/production.ini jobs worker


; User the worker runs as.
user=www-data


; Start just a single worker. Increase this number if you have many or
; particularly long running background jobs.
numprocs=1
process_name=%(program_name)s-%(process_num)02d


; Log files.
stdout_logfile=/srv/app/data/ckan-worker.stdout.log
stderr_logfile=/srv/app/data/ckan-worker.stderr.log


; Make sure that the worker is started on system start and automatically
; restarted if it crashes unexpectedly.
autostart=true
autorestart=true


; Number of seconds the process has to run before it is considered to have
; started successfully.
startsecs=10

; Need to wait for currently executing tasks to finish at shutdown.
; Increase this if you have very long running tasks.
stopwaitsecs = 600

0 comments on commit 956aa63

Please sign in to comment.