Migrate OpenMapKit to S6 supervisor

This commit is contained in:
Disassembler 2018-04-29 21:58:33 +02:00
parent 887b99c63b
commit 98cfa74e88
Signed by: Disassembler
GPG Key ID: 524BD33A0EE29499
3 changed files with 14 additions and 5 deletions

View File

@ -10,8 +10,8 @@ RUN \
&& apk --no-cache del paxctl
RUN \
# Install Python2 runtime
apk --no-cache add python2
# Install runtime dependencies
apk --no-cache add python2 s6
RUN \
# Install build dependencies
@ -34,9 +34,9 @@ RUN \
&& rm -rf /usr/local/share/.cache \
&& rm -rf /root/.cache /root/.config /root/.node-gyp /root/.npm
COPY docker/ /
VOLUME ["/srv/openmapkit/data"]
EXPOSE 8080
USER omk
ENV NODE_ENV production
CMD ["node", "/srv/openmapkit/server.js"]
CMD ["s6-svscan", "/etc/services.d"]

View File

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

View File

@ -0,0 +1,6 @@
#!/bin/execlineb -P
fdmove -c 2 1
export NODE_ENV production
s6-setuidgid 8007:8007
/usr/bin/node /srv/openmapkit/server.js