forked from cloudron-apps/gitea-app
Build from source again since we need patches
This commit is contained in:
parent
4d31dff567
commit
6d7bd395f3
2 changed files with 19 additions and 5 deletions
20
Dockerfile
20
Dockerfile
|
@ -6,11 +6,21 @@ RUN apt-get update && \
|
|||
|
||||
ADD supervisor/ /etc/supervisor/conf.d/
|
||||
|
||||
RUN cd /tmp && \
|
||||
wget https://github.com/gogits/gogs/releases/download/v0.6.1/linux_amd64.zip && \
|
||||
unzip linux_amd64.zip -d /home/cloudron && \
|
||||
chown -R cloudron:cloudron /home/cloudron/gogs && \
|
||||
rm linux_amd64.zip
|
||||
ENV GOPATH /home/cloudron/gows
|
||||
RUN mkdir -p /home/cloudron/gows /home/cloudron/gogs
|
||||
|
||||
## TODO: use redis as well
|
||||
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 start.sh /home/cloudron/start.sh
|
||||
|
|
4
start.sh
4
start.sh
|
@ -6,6 +6,10 @@ fqdn=$(hostname -f)
|
|||
|
||||
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
|
||||
sed -e "s/^Port .*/Port ${SSH_PORT}/" \
|
||||
-e "s/^#ListenAddress .*/ListenAddress 0.0.0.0/" \
|
||||
|
|
Loading…
Reference in a new issue