./priv/roles/Backend.sh in stacco-0.1.23 vs ./priv/roles/Backend.sh in stacco-0.1.24
- old
+ new
@@ -22,29 +22,38 @@
]}
]
]
EOF
-
-docker-define-service "bexio/postgresql"
-
-docker-define-service "bexio/bitcoind" \
- --volume "/volumes/bitcoind:/var/lib/bitcoin"
-
cat >/usr/local/sbin/bexng-before-start <<EOF
+docker pull bexio/postgresql:latest && \
docker run --rm \
\$(docker-container-links-for -w 'postgresql') \
+ -e "DB_ADMIN_USERNAME=\${DB_ADMIN_USERNAME}" \
+ -e "DB_ADMIN_PASSWORD=\${DB_ADMIN_PASSWORD}" \
'bexio/postgresql:latest' \
- db:create 'bexng'
+ db:create 'bexng' "\${BEXNG_DB_SECRET}"
EOF
chmod a+x /usr/local/sbin/bexng-before-start
+
+
+
+#docker-define-service "bexio/postgresql"
+
+docker-define-ambassador-service "postgresql" \
+ "${DB_HOST}" "${DB_PORT}"
+
+docker-define-service "bexio/bitcoind" \
+ --volume "/volumes/bitcoind:/var/lib/bitcoin"
+
docker-define-service "bexio/bexng" \
--dependency "bitcoind" \
--dependency "postgresql" \
- --before-start "/usr/local/sbin/bexng-before-start" \
+ --before-start "$(cat /usr/local/sbin/bexng-before-start)" \
--volume "/etc/bexng:/target" \
- --publish="51607:51607"
+ --publish="51607:51607" \
+ -e "DB_SECRET=${BEXNG_DB_SECRET}"
docker-define-service "bexio/bexng-frontend" \
--dependency "bexng" \
--publish="80:8080"