diff options
author | drebs <drebs@leap.se> | 2016-05-30 13:45:51 -0300 |
---|---|---|
committer | drebs <drebs@leap.se> | 2016-06-06 21:40:37 -0300 |
commit | f829832457237b7342e510e4112f66819be3ab3d (patch) | |
tree | fc682e18c9a1926d1c1198bd54bfeb70d82f1d65 /scripts/docker/files/start-server.sh | |
parent | 3e4870f8bd6186f3d0821f392a0dafc5d5247ad4 (diff) |
[test] add files to create docker image
Diffstat (limited to 'scripts/docker/files/start-server.sh')
-rwxr-xr-x | scripts/docker/files/start-server.sh | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/scripts/docker/files/start-server.sh b/scripts/docker/files/start-server.sh new file mode 100755 index 00000000..ea14aa5a --- /dev/null +++ b/scripts/docker/files/start-server.sh @@ -0,0 +1,25 @@ +#!/bin/sh + +# Start a soledad server inside a docker container. +# +# This script is meant to be copied to the docker container and run upon +# container start. + +CMD="/usr/local/soledad/test-env.py" +REPO="/var/local/soledad" + +if [ ! -z "${SOLEDAD_REMOTE}" ]; then + git -C ${REPO} remote add test ${SOLEDAD_REMOTE} + git -C ${REPO} fetch test +fi + +if [ ! -z "${SOLEDAD_BRANCH}" ]; then + git -C ${REPO} checkout ${SOLEDAD_BRANCH} +fi + +${CMD} couch start +${CMD} user-db create +${CMD} token-db create +${CMD} token-db insert-token +${CMD} cert create +${CMD} soledad-server start --no-daemonize |