Migrate CKAN to S6 supervisor

This commit is contained in:
Disassembler 2018-04-30 22:02:54 +02:00
parent 44035fba50
commit bcf4295086
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499
3 changed files with 12 additions and 3 deletions

View File

@ -13,7 +13,7 @@ RUN \
# Add edge/testing repository # Add edge/testing repository
echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories \ echo '@edge http://dl-cdn.alpinelinux.org/alpine/edge/testing' >>/etc/apk/repositories \
# Install runtime dependencies # Install runtime dependencies
&& apk --no-cache add geos@edge libjpeg-turbo libmagic libpq mailcap py2-pip zlib && apk --no-cache add geos@edge libjpeg-turbo libmagic libpq mailcap py2-pip s6 zlib
RUN \ RUN \
# Install build dependencies # Install build dependencies
@ -47,8 +47,9 @@ RUN \
&& find /srv/ckan/src -name '.git*' -exec rm -rf {} + \ && find /srv/ckan/src -name '.git*' -exec rm -rf {} + \
&& rm -rf /root/.cache && rm -rf /root/.cache
COPY docker/ /
VOLUME ["/etc/ckan", "/srv/ckan/storage"] VOLUME ["/etc/ckan", "/srv/ckan/storage"]
EXPOSE 8080 EXPOSE 8080
USER ckan CMD ["s6-svscan", "/etc/services.d"]
CMD ["paster", "serve", "/etc/ckan/ckan.ini"]

View File

@ -0,0 +1,3 @@
#!/bin/sh
/bin/true

View File

@ -0,0 +1,5 @@
#!/bin/execlineb -P
fdmove -c 2 1
s6-setuidgid 8003:8003
/usr/bin/paster serve /etc/ckan/ckan.ini