Migrate OpenMapKit to S6 supervisor
This commit is contained in:
parent
887b99c63b
commit
98cfa74e88
@ -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"]
|
||||
|
3
openmapkit/docker/etc/services.d/.s6-svscan/finish
Executable file
3
openmapkit/docker/etc/services.d/.s6-svscan/finish
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
/bin/true
|
6
openmapkit/docker/etc/services.d/openmapkit/run
Executable file
6
openmapkit/docker/etc/services.d/openmapkit/run
Executable 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
|
Loading…
Reference in New Issue
Block a user