summaryrefslogtreecommitdiff
path: root/docker-entrypoint.sh
diff options
context:
space:
mode:
authorAshlynn Anderson <pea@pea.sh>2019-08-02 22:28:48 -0400
committerAshlynn Anderson <pea@pea.sh>2019-08-03 00:21:54 -0400
commit4a418698db71016447f2f246f7c5579b3dc0b08c (patch)
treecb4fd89c93d6366a46b8fa1a66b4d6fc5b098f11 /docker-entrypoint.sh
parent7efca4317b568c408a10b71799f9b8261ac5e8e6 (diff)
Create docker.exs and docker-entrypoint + round out Dockerfile
At this point, the implementation is completely working and has been tested running live and federating with other instances.
Diffstat (limited to 'docker-entrypoint.sh')
-rwxr-xr-xdocker-entrypoint.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/docker-entrypoint.sh b/docker-entrypoint.sh
new file mode 100755
index 000000000..f56f8c50a
--- /dev/null
+++ b/docker-entrypoint.sh
@@ -0,0 +1,14 @@
+#!/bin/ash
+
+set -e
+
+echo "-- Waiting for database..."
+while ! pg_isready -U ${DB_USER:-pleroma} -d postgres://${DB_HOST:-db}:5432/${DB_NAME:-pleroma} -t 1; do
+ sleep 1s
+done
+
+echo "-- Running migrations..."
+$HOME/bin/pleroma_ctl migrate
+
+echo "-- Starting!"
+exec $HOME/bin/pleroma start