Page MenuHomeDevCentral

No OneTemporary

diff --git a/Dockerfile b/Dockerfile
index 18440fc..5d517c3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -1,40 +1,37 @@
#
# Docker image for Etherpad
#
FROM debian:buster
# Forked from Tony Motakis <tvelocity@gmail.com>
MAINTAINER Sébastien Santoro aka Dereckson <dereckson+nasqueron-docker@espace-win.org>
ENV NODE_ENV=production
RUN apt update && \
apt install -y curl unzip mariadb-client git sudo python libssl-dev pkg-config build-essential abiword && \
curl -sL https://deb.nodesource.com/setup_10.x | bash && \
apt install -y nodejs && \
rm -r /var/lib/apt/lists/*
RUN cd /opt && \
git clone https://github.com/ether/etherpad-lite && \
useradd --uid 9001 --create-home etherpad && \
chown -R etherpad:0 /opt/etherpad-lite
WORKDIR /opt/etherpad-lite
USER etherpad
RUN bin/installDeps.sh && \
rm -rf ~/.npm/_cacache && \
npm install ep_ether-o-meter && \
npm install ep_author_neat && \
rm settings.json
-COPY entrypoint.sh /entrypoint.sh
-
VOLUME /opt/etherpad-lite/var
RUN ln -s /opt/etherpad-lite/var/settings.json /opt/etherpad-lite/settings.json
EXPOSE 9001
-ENTRYPOINT ["/entrypoint.sh"]
CMD ["node", "node_modules/ep_etherpad-lite/node/server.js"]
diff --git a/entrypoint.sh b/entrypoint.sh
deleted file mode 100755
index 14134b2..0000000
--- a/entrypoint.sh
+++ /dev/null
@@ -1,82 +0,0 @@
-#!/bin/bash
-set -e
-
-if [ -z "$MYSQL_PORT_3306_TCP_ADDR" ]; then
- echo >&2 'error: missing MYSQL_PORT_3306_TCP environment variable'
- echo >&2 ' Did you forget to --link some_mysql_container:mysql ?'
- exit 1
-fi
-
-# if we're linked to MySQL, and we're using the root user, and our linked
-# container has a default "root" password set up and passed through... :)
-: ${ETHERPAD_DB_USER:=root}
-if [ "$ETHERPAD_DB_USER" = 'root' ]; then
- : ${ETHERPAD_DB_PASSWORD:=$MYSQL_ENV_MYSQL_ROOT_PASSWORD}
-fi
-: ${ETHERPAD_DB_NAME:=etherpad}
-
-ETHERPAD_DB_NAME=$( echo $ETHERPAD_DB_NAME | sed 's/\./_/g' )
-
-if [ -z "$ETHERPAD_DB_PASSWORD" ]; then
- echo >&2 'error: missing required ETHERPAD_DB_PASSWORD environment variable'
- echo >&2 ' Did you forget to -e ETHERPAD_DB_PASSWORD=... ?'
- echo >&2
- echo >&2 ' (Also of interest might be ETHERPAD_DB_USER and ETHERPAD_DB_NAME.)'
- exit 1
-fi
-
-: ${ETHERPAD_TITLE:=Etherpad}
-: ${ETHERPAD_PORT:=9001}
-: ${ETHERPAD_SESSION_KEY:=$(
- node -p "require('crypto').randomBytes(32).toString('hex')")}
-
-# Check if database already exists
-RESULT=`mysql -u${ETHERPAD_DB_USER} -p${ETHERPAD_DB_PASSWORD} \
- -hmysql --skip-column-names \
- -e "SHOW DATABASES LIKE '${ETHERPAD_DB_NAME}'"`
-
-if [ "$RESULT" != $ETHERPAD_DB_NAME ]; then
- # mysql database does not exist, create it
- echo "Creating database ${ETHERPAD_DB_NAME}"
-
- mysql -u${ETHERPAD_DB_USER} -p${ETHERPAD_DB_PASSWORD} -hmysql \
- -e "create database ${ETHERPAD_DB_NAME}"
-fi
-
-if [ ! -f settings.json ]; then
-
- cat <<- EOF > settings.json
- {
- "title": "${ETHERPAD_TITLE}",
- "ip": "0.0.0.0",
- "port" :${ETHERPAD_PORT},
- "sessionKey" : "${ETHERPAD_SESSION_KEY}",
- "dbType" : "mysql",
- "dbSettings" : {
- "user" : "${ETHERPAD_DB_USER}",
- "host" : "mysql",
- "password": "${ETHERPAD_DB_PASSWORD}",
- "database": "${ETHERPAD_DB_NAME}"
- },
- EOF
-
- if [ $ETHERPAD_ADMIN_PASSWORD ]; then
-
- : ${ETHERPAD_ADMIN_USER:=admin}
-
- cat <<- EOF >> settings.json
- "users": {
- "${ETHERPAD_ADMIN_USER}": {
- "password": "${ETHERPAD_ADMIN_PASSWORD}",
- "is_admin": true
- }
- },
- EOF
- fi
-
- cat <<- EOF >> settings.json
- }
- EOF
-fi
-
-exec "$@"

File Metadata

Mime Type
text/x-diff
Expires
Thu, Dec 26, 17:03 (21 h, 42 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2315281
Default Alt Text
(3 KB)

Event Timeline