Commit 69527d5c authored by Jordi Mallach's avatar Jordi Mallach 🔥 Committed by Maxime Buquet
Browse files

Add a script that initialises a Postgresql DB

parent 1ecc9b1f
......@@ -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/ && cd /srv/ && git clone etherpad
RUN mkdir -p /srv/ && cd /srv/ && git clone etherpad
# Install node dependencies
RUN /srv/
......@@ -34,6 +35,8 @@ RUN /srv/
# Add conf files
ADD settings.json.collabora /srv/
ADD supervisor.conf /etc/supervisor/supervisor.conf
ADD init_pgsql_db /srv/
CMD ["/srv/"]
CMD ["supervisord", "-c", "/etc/supervisor/supervisor.conf", "-n"]
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
Markdown is supported
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