taler-deployment

Deployment scripts and configuration files
Log | Files | Refs | README

anastasis-entrypoint.sh (1306B)


      1 #!/usr/bin/env sh
      2 set -e
      3 
      4 if ! [ -d "/etc/anastasis" ]; then
      5   echo -e "
      6 \x1b[0;31;1mFATAL\x1b[0m Anastasis-Docker needs /etc/anastasis mounted.
      7       If you're calling docker directly, pass '-v ./anastasis-config:/etc/anastasis' to docker run
      8       If you're using a docker compose, add the below to the service:
      9         volumes:
     10           - ./anastasis-config:/etc/anastasis:rw" 1>&2;
     11   exit 1;
     12 fi;
     13 if ! [ -f "/etc/anastasis/anastasis.conf" ]; then
     14   echo -e "\x1b[0;33;1mWARN\x1b[0m Anastasis-Docker needs /etc/anastasis/anastasis.conf.
     15      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! :)
     16      Otherwise, see below for information on adding a volume binding:
     17        If you're calling docker directly, pass '-v ./anastasis-config:/etc/anastasis' to docker run
     18        If you're using a docker compose, add the below to the service:
     19         volumes:
     20           - ./anastasis-config:/etc/anastasis:rw" 1>&2;
     21   echo '[anastasis]
     22 SERVE = tcp
     23 PORT = 9977
     24 DB = postgres
     25 
     26 [stasis-postgres]
     27 CONFIG = postgres://admin:password@172.168.111.10:5432/postgres
     28 ' > /etc/anastasis/anastasis.conf
     29 fi;
     30 
     31 set -ax
     32 
     33 anastasis-dbinit -c /etc/anastasis/anastasis.conf
     34 anastasis-httpd -c /etc/anastasis/anastasis.conf $@