Commit 2f2c5b2d authored by Daniel LACROIX's avatar Daniel LACROIX
Browse files

work in progress

parent 17bdd46a
File added
FROM node:slim
ARG ETHERPAD_VERSION=1.7.5
FROM node:alpine
ARG NODE_ENV=production
RUN echo "Getting version: ${ETHERPAD_VERSION}" && \
curl \
--location \
--fail \
--silent \
--show-error \
--output /opt/etherpad-lite.tar.gz \
https://github.com/ether/etherpad-lite/archive/"${ETHERPAD_VERSION}".tar.gz && \
mkdir /opt/etherpad-lite && \
tar xf /opt/etherpad-lite.tar.gz \
--directory /opt/etherpad-lite \
--strip-components=1 && \
rm /opt/etherpad-lite.tar.gz
RUN /opt/etherpad-lite/bin/installDeps.sh
COPY settings.json /opt/etherpad-lite/settings.json
EXPOSE 9001
WORKDIR /opt/etherpad-lite/
CMD ["node", "node_modules/ep_etherpad-lite/node/server.js"]
RUN mkdir /app && apk update && apk add curl gettext
COPY ./1.7.0.tar.gz /app
WORKDIR /app
RUN tar zxvf 1.7.0.tar.gz --strip 1 -C /app && \
rm /app/1.7.0.tar.gz
RUN /app/bin/installDeps.sh
COPY ./settings.json.tmpl /app/settings.json.tmpl
COPY ./docker-entrypoint.sh /docker-entrypoint.sh
EXPOSE 80
CMD [ "/docker-entrypoint.sh" ]
#!/bin/sh
set -e
REPLACE_VARS='DB_PASSWORD'
# check if needed vars are present
if [ -z "$DB_PASSWORD" ] ; then
echo "Error: The following environment variables MUST be defined."
echo " - DB_PASSWORD: database password"
exit 1
fi
# generate setup files
envsubst "$(printf '${%s} ' $REPLACE_VARS)" < /app/settings.json.tmpl > /app/settings.json
node node_modules/ep_etherpad-lite/node/server.js
......@@ -8,42 +8,18 @@
//IP and port which etherpad should bind at
"ip": "0.0.0.0",
"port" : 9001,
"port" : 80,
// Option to hide/show the settings.json in admin page, default option is set to true
"showSettingsInAdminPage" : true,
/*
// Node native SSL support
// this is disabled by default
//
// make sure to have the minimum and correct file access permissions set
// so that the Etherpad server can access them
"ssl" : {
"key" : "/path-to-your/epl-server.key",
"cert" : "/path-to-your/epl-server.crt",
"ca": ["/path-to-your/epl-intermediate-cert1.crt", "/path-to-your/epl-intermediate-cert2.crt"]
},
*/
//The Type of the database. You can choose between dirty, postgres, sqlite and mysql
//You shouldn't use "dirty" for for anything else than testing or development
/* "dbType" : "dirty",
//the database specific settings
"dbSettings" : {
"filename" : "var/dirty.db"
},
*/
// An Example of MySQL Configuration
// MySQL Configuration
"dbType" : "mysql",
"dbSettings" : {
"user" : "etherpadv3",
"user" : "etherpad",
"host" : "db",
"password": "toortoor",
"database": "etherpadv3",
"password": "${DB_PASSWORD}",
"database": "etherpad",
"charset" : "utf8mb4"
},
......@@ -113,21 +89,6 @@
/* Privacy: disable IP logging */
"disableIPlogging" : false,
/* Users for basic authentication. is_admin = true gives access to /admin.
If you do not uncomment this, /admin will not be available! */
/*
"users": {
"admin": {
"password": "changeme1",
"is_admin": true
},
"user": {
"password": "changeme1",
"is_admin": false
}
},
*/
// restrict socket.io transport methods
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
......@@ -166,40 +127,9 @@
// You can add as many appenders as you want here:
"logconfig" :
{ "appenders": [
{ "type": "console"
//, "category": "access"// only logs pad access
}
/*
, { "type": "file"
, "filename": "your-log-file-here.log"
, "maxLogSize": 1024
, "backups": 3 // how many log files there're gonna be at max
//, "category": "test" // only log a specific category
}*/
/*
, { "type": "logLevelFilter"
, "level": "warn" // filters out all log messages that have a lower level than "error"
, "appender":
{ Use whatever appender you want here }
}*/
/*
, { "type": "logLevelFilter"
, "level": "error" // filters out all log messages that have a lower level than "error"
, "appender":
{ "type": "smtp"
, "subject": "An error occurred in your EPL instance!"
, "recipients": "bar@blurdybloop.com, baz@blurdybloop.com"
, "sendInterval": 300 // 60 * 5 = 5 minutes -- will buffer log messages; set to 0 to send a mail for every message
, "transport": "SMTP", "SMTP": { // see https://github.com/andris9/Nodemailer#possible-transport-methods
"host": "smtp.example.com", "port": 465,
"secureConnection": true,
"auth": {
"user": "foo@example.com",
"pass": "bar_foo"
}
}
{
"type": "console"
}
}*/
]
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment