Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
sysadmin
etherpad
Commits
69527d5c
Commit
69527d5c
authored
Mar 29, 2018
by
Jordi Mallach
🔥
Committed by
Maxime Buquet
Apr 18, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a script that initialises a Postgresql DB
parent
1ecc9b1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
1 deletion
+13
-1
Dockerfile
Dockerfile
+4
-1
init_psql_db
init_psql_db
+9
-0
No files found.
Dockerfile
View file @
69527d5c
...
...
@@ -20,13 +20,14 @@ RUN apt-get update && apt-get install -y \
libssl-dev
\
pkg-config
\
python
\
sudo
\
supervisor
\
&& rm -rf /var/lib/apt/lists/*
# Grab the latest Git version
RUN
mkdir
-p
/srv/etherpad.collabora.com
&&
cd
/srv/etherpad.collabora.com
&&
git clone https://gitlab.collabora.com/sysadmin/etherpad-lite.git etherpad
RUN
mkdir
-p
/srv/etherpad.collabora.com
/bin
&&
cd
/srv/etherpad.collabora.com
&&
git clone https://gitlab.collabora.com/sysadmin/etherpad-lite.git etherpad
# Install node dependencies
RUN
/srv/etherpad.collabora.com/etherpad/bin/installDeps.sh
...
...
@@ -34,6 +35,8 @@ RUN /srv/etherpad.collabora.com/etherpad/bin/installDeps.sh
# Add conf files
ADD
settings.json.collabora /srv/etherpad.collabora.com/etherpad/settings.json
ADD
supervisor.conf /etc/supervisor/supervisor.conf
ADD
init_pgsql_db /srv/etherpad.collabora.com/bin
EXPOSE
9001
CMD
["/srv/etherpad.collabora.com/bin/init_pgsql_db"]
CMD
["supervisord", "-c", "/etc/supervisor/supervisor.conf", "-n"]
init_psql_db
0 → 100755
View file @
69527d5c
#/bin/sh
set -e
if ! sudo -u postgres psql -l |grep "^ etherpad "; then
sudo -u postgres createuser etherpad
echo "ALTER USER etherpad WITH PASSWORD 'eet4kaeYpoL9Aesh';" |sudo -u postgres psql
echo "CREATE DATABASE etherpad OWNER etherpad;" | sudo -u postgres psql
fi
Write
Preview
Markdown
is supported
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