init
This commit is contained in:
commit
bc78fb0011
|
@ -0,0 +1,31 @@
|
||||||
|
FROM alpine:3.6
|
||||||
|
|
||||||
|
ARG VERSION=1.20.0
|
||||||
|
|
||||||
|
ENV UID=991 GID=991
|
||||||
|
|
||||||
|
WORKDIR /cryptpad
|
||||||
|
|
||||||
|
RUN apk -U add --no-cache \
|
||||||
|
git \
|
||||||
|
tini \
|
||||||
|
su-exec \
|
||||||
|
ca-certificates \
|
||||||
|
libressl \
|
||||||
|
tar \
|
||||||
|
nodejs-current \
|
||||||
|
nodejs-current-npm \
|
||||||
|
&& 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
|
||||||
|
|
||||||
|
COPY run.sh /usr/local/bin/run.sh
|
||||||
|
|
||||||
|
RUN chmod +x /usr/local/bin/run.sh
|
||||||
|
|
||||||
|
EXPOSE 3000
|
||||||
|
|
||||||
|
VOLUME /cryptpad/datastore /cryptpad/customize
|
||||||
|
|
||||||
|
CMD ["run.sh"]
|
|
@ -0,0 +1,35 @@
|
||||||
|
## wonderfall/cryptpad
|
||||||
|
|
||||||
|
The Zero Knowledge Cloud.
|
||||||
|
|
||||||
|
#### Features
|
||||||
|
- Based on Alpine Linux
|
||||||
|
- Bundled with latest node.js available.
|
||||||
|
|
||||||
|
#### Build-time variables
|
||||||
|
- **VERSION** : version of Cryptpad
|
||||||
|
|
||||||
|
#### Environment variables
|
||||||
|
- **UID** : user id *(default : 991)*
|
||||||
|
- **GID** : group id *(default : 991)*
|
||||||
|
|
||||||
|
#### Volumes
|
||||||
|
- **/cryptpad/datastore** : Cryptpad data
|
||||||
|
- **/cryptpad/customize** : Cryptpad custom files
|
||||||
|
|
||||||
|
#### Ports
|
||||||
|
- **3000** [(reverse proxy!)](https://github.com/hardware/mailserver/wiki/Reverse-proxy-configuration)
|
||||||
|
|
||||||
|
#### docker-compose.yml sample
|
||||||
|
|
||||||
|
```
|
||||||
|
cryptpad:
|
||||||
|
image: wonderfall/cryptpad
|
||||||
|
container_name: cryptpad
|
||||||
|
environment:
|
||||||
|
- UID=1444
|
||||||
|
- GID=1444
|
||||||
|
volumes:
|
||||||
|
- /mnt/docker/cryptpad/files:/cryptpad/datastore
|
||||||
|
- /mnt/docker/cryptpad/customize:/cryptpad/customize
|
||||||
|
```
|
|
@ -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
|
Reference in New Issue