diff options
author | Lance Ju <lance@crenolab.com> | 2014-04-16 00:55:39 +0800 |
---|---|---|
committer | Lance Ju <lance@crenolab.com> | 2014-04-16 00:55:39 +0800 |
commit | f456f964ecdd5e01b3a54df09493a2e6adc35c09 (patch) | |
tree | 46d2af73fa20aa149b30aa2cb2484bf4b8f33e38 /dockerfiles | |
parent | 1f989d0b9881c8c0c3d0d1926fa9882dc880a141 (diff) | |
download | gitea-f456f964ecdd5e01b3a54df09493a2e6adc35c09.tar.gz gitea-f456f964ecdd5e01b3a54df09493a2e6adc35c09.zip |
Add the apt source when installing potgres.
Replace the host with $DB_PORT, which is dependent to the database imagae's exposed port.
Diffstat (limited to 'dockerfiles')
-rw-r--r-- | dockerfiles/images/gogits/deploy.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dockerfiles/images/gogits/deploy.sh b/dockerfiles/images/gogits/deploy.sh index 8c0e246b15..47e13260c7 100644 --- a/dockerfiles/images/gogits/deploy.sh +++ b/dockerfiles/images/gogits/deploy.sh @@ -14,6 +14,8 @@ if [ $DB_TYPE = "postgres" ] then # Add the postgres in gogs image. apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8 + echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" > /etc/apt/sources.list.d/pgdg.list + apt-get update apt-get -y -q install python-software-properties software-properties-common apt-get -y -q install postgresql-9.3 postgresql-client-9.3 postgresql-contrib-9.3 fi @@ -24,7 +26,9 @@ fi # DB_PORT_3306_TCP_PORT=3306 # DB_PORT_3306_TCP_PROTO=tcp # DB_PORT_3306_TCP_ADDR=172.17.0.2 -sed -i "/HOST = 127.0.0.1:3306/c\HOST = $DB_PORT_3306_TCP_ADDR:$DB_PORT_3306_TCP_PORT" $GOPATH/src/github.com/gogits/gogs/conf/app.ini +#sed -i "/HOST = 127.0.0.1:3306/c\HOST = $DB_PORT_3306_TCP_ADDR:$DB_PORT_3306_TCP_PORT" $GOPATH/src/github.com/gogits/gogs/conf/app.ini +sed -i "/HOST = 127.0.0.1:3306/c\HOST = `echo $DB_PORT | cut -d '/' -f 3`" $GOPATH/src/github.com/gogits/gogs/conf/app.ini + cd $GOPATH/src/github.com/gogits/gogs/ # The sudo is a must here, or the go within docker container won't get the current user by os.Getenv("USERNAME") |