To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / extra / soundsoftware / dockertest / start.sh @ 1575:42618fc5ab46

History | View | Annotate | Download (608 Bytes)

1
#!/bin/bash
2

    
3
dbpwd="$1"
4
if [ -z "$dbpwd" ]; then
5
    echo "Usage: $0 <database-password>" 1>&2
6
    exit 2
7
fi
8

    
9
set -eu
10

    
11
dockerdir=./extra/soundsoftware/dockertest
12
if [ ! -d "$dockerdir" ]; then
13
    echo "Run this script from the root of a working copy of soundsoftware-site"
14
    exit 2
15
fi
16

    
17
for f in database.yml code.conf ; do
18
    cat "$dockerdir/$f" |
19
        sed 's/INSERT_POSTGRES_PASSWORD_HERE/'"$dbpwd"'/g' > \
20
            "$dockerdir/$f.interpolated"
21
done
22

    
23
dockertag="cannam/soundsoftware-site"
24

    
25
sudo docker build -t "$dockertag" -f "$dockerdir/Dockerfile" .
26
sudo docker run -p 8080:80 -d "$dockertag"
27