Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
laclasse
etherpad
Commits
2f2c5b2d
Commit
2f2c5b2d
authored
Feb 11, 2020
by
Daniel LACROIX
Browse files
work in progress
parent
17bdd46a
Changes
4
Hide whitespace changes
Inline
Side-by-side
1.7.0.tar.gz
0 → 100644
View file @
2f2c5b2d
File added
Dockerfile
View file @
2f2c5b2d
FROM
node:slim
FROM
node:alpine
ARG
ETHERPAD_VERSION=1.7.5
ARG
NODE_ENV=production
ARG
NODE_ENV=production
RUN
echo
"Getting version:
${
ETHERPAD_VERSION
}
"
&&
\
RUN
mkdir
/app
&&
apk update
&&
apk add curl gettext
curl
\
COPY
./1.7.0.tar.gz /app
--location
\
WORKDIR
/app
--fail
\
RUN
tar
zxvf 1.7.0.tar.gz
--strip
1
-C
/app
&&
\
--silent
\
rm
/app/1.7.0.tar.gz
--show-error
\
RUN
/app/bin/installDeps.sh
--output
/opt/etherpad-lite.tar.gz
\
COPY
./settings.json.tmpl /app/settings.json.tmpl
https://github.com/ether/etherpad-lite/archive/
"
${
ETHERPAD_VERSION
}
"
.tar.gz
&&
\
COPY
./docker-entrypoint.sh /docker-entrypoint.sh
mkdir
/opt/etherpad-lite
&&
\
EXPOSE
80
tar
xf /opt/etherpad-lite.tar.gz
\
CMD
[ "/docker-entrypoint.sh" ]
--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"]
docker-entrypoint.sh
0 → 100755
View file @
2f2c5b2d
#!/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
settings.json
→
settings.json
.tmpl
View file @
2f2c5b2d
...
@@ -8,42 +8,18 @@
...
@@ -8,42 +8,18 @@
//IP and port which etherpad should bind at
//IP and port which etherpad should bind at
"ip": "0.0.0.0",
"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
// Option to hide/show the settings.json in admin page, default option is set to true
"showSettingsInAdminPage" : true,
"showSettingsInAdminPage" : true,
/*
// MySQL Configuration
//
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
"dbType" : "mysql",
"dbType" : "mysql",
"dbSettings" : {
"dbSettings" : {
"user"
:
"etherpad
v3
"
,
"user" : "etherpad",
"host" : "db",
"host" : "db",
"password"
:
"
toortoor
"
,
"password": "
${DB_PASSWORD}
",
"database"
:
"etherpad
v3
"
,
"database": "etherpad",
"charset" : "utf8mb4"
"charset" : "utf8mb4"
},
},
...
@@ -113,21 +89,6 @@
...
@@ -113,21 +89,6 @@
/* Privacy: disable IP logging */
/* Privacy: disable IP logging */
"disableIPlogging" : false,
"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
// restrict socket.io transport methods
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
...
@@ -166,40 +127,9 @@
...
@@ -166,40 +127,9 @@
// You can add as many appenders as you want here:
// You can add as many appenders as you want here:
"logconfig" :
"logconfig" :
{ "appenders": [
{ "appenders": [
{
"type"
:
"console"
{
//
,
"category"
:
"access"
//
only
logs
pad
access
"type": "console"
}
}
/*
,
{
"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/andris
9
/Nodemailer#possible-transport-methods
"host"
:
"smtp.example.com"
,
"port"
:
465
,
"secureConnection"
:
true
,
"auth"
:
{
"user"
:
"foo@example.com"
,
"pass"
:
"bar_foo"
}
}
}
}
*/
]
]
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment