mirror of
https://github.com/hoellen/dockerfiles.git
synced 2025-04-20 04:19:18 +00:00
add cryptpad
This commit is contained in:
parent
108b0bad3e
commit
644f8c8619
23
cryptpad/Dockerfile
Normal file
23
cryptpad/Dockerfile
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
FROM node:8-alpine
|
||||||
|
|
||||||
|
ARG VERSION=1.10.1
|
||||||
|
|
||||||
|
WORKDIR /cryptpad
|
||||||
|
|
||||||
|
RUN apk add --no-cache git tini su-exec ca-certificates libressl tar \
|
||||||
|
&& wget -qO- https://github.com/xwiki-labs/cryptpad/archive/${VERSION}.tar.gz | tar xz --strip 1 \
|
||||||
|
&& npm install \
|
||||||
|
&& npm install -g bower \
|
||||||
|
&& bower install --allow-root
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
VOLUME /cryptpad/datastore
|
||||||
|
VOLUME /cryptpad/customize
|
||||||
|
|
||||||
|
ENV UID=991 GID=991
|
||||||
|
ENV USE_SSL=false
|
||||||
|
ENV STORAGE='./storage/file'
|
||||||
|
ENV LOG_TO_STDOUT=true
|
||||||
|
|
||||||
|
CMD ["/cryptpad/container-start.sh"]
|
13
cryptpad/container-start.sh
Executable file
13
cryptpad/container-start.sh
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Creating customize folder
|
||||||
|
mkdir -p customize
|
||||||
|
[ -z "$(ls -A customize)" ] && echo "Creating customize folder" \
|
||||||
|
&& cp -R customize.dist/* customize/ \
|
||||||
|
&& cp config.example.js customize/config.js
|
||||||
|
|
||||||
|
# Linking config.js
|
||||||
|
[ ! -h config.js ] && echo "Linking config.js" && ln -s customize/config.js config.js
|
||||||
|
|
||||||
|
chown -R $UID:$GID /cryptpad
|
||||||
|
exec su-exec $UID:$GID /sbin/tini -- node ./server.js
|
Loading…
x
Reference in New Issue
Block a user