Build from source again since we need patches

This commit is contained in:
Girish Ramakrishnan 2015-06-24 14:26:43 -07:00
parent 4d31dff567
commit 6d7bd395f3
2 changed files with 19 additions and 5 deletions

View File

@ -6,11 +6,21 @@ RUN apt-get update && \
ADD supervisor/ /etc/supervisor/conf.d/ ADD supervisor/ /etc/supervisor/conf.d/
RUN cd /tmp && \ ENV GOPATH /home/cloudron/gows
wget https://github.com/gogits/gogs/releases/download/v0.6.1/linux_amd64.zip && \ RUN mkdir -p /home/cloudron/gows /home/cloudron/gogs
unzip linux_amd64.zip -d /home/cloudron && \
chown -R cloudron:cloudron /home/cloudron/gogs && \ ## TODO: use redis as well
rm linux_amd64.zip RUN mkdir -p ${GOPATH}/src/github.com/gogits && \
cd ${GOPATH}/src/github.com/gogits && \
git clone https://github.com/cloudron-io/gogs.git && \
cd gogs && \
go get ./... && \
go build && \
go install && \
mv ${GOPATH}/bin/gogs /home/cloudron/gogs/ && \
cp -r ${GOPATH}/src/github.com/gogits/gogs/templates/ /home/cloudron/gogs/. && \
cp -r ${GOPATH}/src/github.com/gogits/gogs/public/ /home/cloudron/gogs/. && \
rm -rf ${GOPATH}
ADD app.ini.template /home/cloudron/app.ini.template ADD app.ini.template /home/cloudron/app.ini.template
ADD start.sh /home/cloudron/start.sh ADD start.sh /home/cloudron/start.sh

View File

@ -6,6 +6,10 @@ fqdn=$(hostname -f)
chown -R cloudron.cloudron /app/data chown -R cloudron.cloudron /app/data
# clean up old logs
rm -rf /home/cloudron/gogs/log && mkdir -p /home/cloudron/gogs/log
chown cloudron:cloudron /home/cloudron/gogs/log
# Dockerfile changes the ownership of this file to make it writable by cloudron user # Dockerfile changes the ownership of this file to make it writable by cloudron user
sed -e "s/^Port .*/Port ${SSH_PORT}/" \ sed -e "s/^Port .*/Port ${SSH_PORT}/" \
-e "s/^#ListenAddress .*/ListenAddress 0.0.0.0/" \ -e "s/^#ListenAddress .*/ListenAddress 0.0.0.0/" \