summaryrefslogtreecommitdiff
path: root/packaging/docker-alpine/build-files/anastasis-entrypoint.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packaging/docker-alpine/build-files/anastasis-entrypoint.sh')
-rwxr-xr-xpackaging/docker-alpine/build-files/anastasis-entrypoint.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/packaging/docker-alpine/build-files/anastasis-entrypoint.sh b/packaging/docker-alpine/build-files/anastasis-entrypoint.sh
new file mode 100755
index 0000000..ec72716
--- /dev/null
+++ b/packaging/docker-alpine/build-files/anastasis-entrypoint.sh
@@ -0,0 +1,34 @@
+#!/usr/bin/env sh
+set -e
+
+if ! [ -d "/etc/anastasis" ]; then
+ echo -e "
+\x1b[0;31;1mFATAL\x1b[0m Anastasis-Docker needs /etc/anastasis mounted.
+ If you're calling docker directly, pass '-v ./anastasis-config:/etc/anastasis' to docker run
+ If you're using a docker compose, add the below to the service:
+ volumes:
+ - ./anastasis-config:/etc/anastasis:rw" 1>&2;
+ exit 1;
+fi;
+if ! [ -f "/etc/anastasis/anastasis.conf" ]; then
+ echo -e "\x1b[0;33;1mWARN\x1b[0m Anastasis-Docker needs /etc/anastasis/anastasis.conf.
+ If you're seeing this for the first time after setting up a volume binding, simply continue by modifying your config. A config was just created for you! :)
+ Otherwise, see below for information on adding a volume binding:
+ If you're calling docker directly, pass '-v ./anastasis-config:/etc/anastasis' to docker run
+ If you're using a docker compose, add the below to the service:
+ volumes:
+ - ./anastasis-config:/etc/anastasis:rw" 1>&2;
+ echo '[anastasis]
+SERVE = tcp
+PORT = 9977
+DB = postgres
+
+[stasis-postgres]
+CONFIG = postgres://admin:password@172.168.111.10:5432/postgres
+' > /etc/anastasis/anastasis.conf
+fi;
+
+set -ax
+
+anastasis-dbinit -c /etc/anastasis/anastasis.conf
+anastasis-httpd -c /etc/anastasis/anastasis.conf $@