|
@ -1,7 +1,7 @@ |
|
|
### |
|
|
### |
|
|
### Build Variables |
|
|
### Build Variables |
|
|
### |
|
|
### |
|
|
FROM localhost/debian:latest |
|
|
FROM localhost/debian |
|
|
|
|
|
|
|
|
# deploy options |
|
|
# deploy options |
|
|
# -p (port) and -v (volume) both go host:container |
|
|
# -p (port) and -v (volume) both go host:container |
|
@ -75,12 +75,6 @@ RUN mv pg_hba.conf /etc/postgresql/${PSQLV:?}/main/pg_hba.conf |
|
|
### Gitea |
|
|
### Gitea |
|
|
### |
|
|
### |
|
|
|
|
|
|
|
|
# Install templating engine |
|
|
|
|
|
RUN wget https://raw.githubusercontent.com/jirutka/esh/master/esh && \ |
|
|
|
|
|
chmod +x esh && \ |
|
|
|
|
|
mkdir -p /usr/local/lib/esh && \ |
|
|
|
|
|
mv esh /usr/local/lib/esh |
|
|
|
|
|
|
|
|
|
|
|
# dowload gitea |
|
|
# dowload gitea |
|
|
RUN wget https://dl.gitea.io/gitea/${GITEAV:?}/gitea-${GITEAV:?}-linux-amd64 && \ |
|
|
RUN wget https://dl.gitea.io/gitea/${GITEAV:?}/gitea-${GITEAV:?}-linux-amd64 && \ |
|
|
mv gitea-${GITEAV:?}-linux-amd64 /usr/local/bin/gitea && \ |
|
|
mv gitea-${GITEAV:?}-linux-amd64 /usr/local/bin/gitea && \ |
|
@ -93,21 +87,30 @@ RUN mkdir -p /var/lib/gitea/data/ /var/log/gitea /etc/gitea && \ |
|
|
ln -s /var/log/gitea /var/lib/gitea/log && \ |
|
|
ln -s /var/log/gitea /var/lib/gitea/log && \ |
|
|
ln -s /vol/data/custom /var/lib/gitea/custom |
|
|
ln -s /vol/data/custom /var/lib/gitea/custom |
|
|
|
|
|
|
|
|
# template config file |
|
|
# copy config file |
|
|
COPY assets/app.ini.esh.esh /etc/gitea/ |
|
|
COPY assets/app.config.ini /etc/gitea/ |
|
|
RUN cd /etc/gitea && \ |
|
|
|
|
|
esh app.ini.esh.esh && \ |
|
|
|
|
|
rm app.ini.esh.esh && \ |
|
|
|
|
|
chmod -R +r /etc/gitea |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# copy gitea service |
|
|
COPY assets/gitea.service /etc/systemd/system/ |
|
|
COPY assets/gitea.service /etc/systemd/system/ |
|
|
|
|
|
|
|
|
# make alias for running admin commands from command line easily |
|
|
# make alias for running admin commands from command line easily |
|
|
RUN echo "alias gitea='sudo -u gitea gitea --config /etc/gitea/app.ini'" >> /root/.bashrc |
|
|
RUN echo "alias gitea='sudo -u gitea gitea --config /etc/gitea/app.ini'" >> /root/.bashrc |
|
|
|
|
|
|
|
|
|
|
|
### |
|
|
|
|
|
### Data |
|
|
|
|
|
### |
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /vol/data |
|
|
|
|
|
|
|
|
|
|
|
# copy config files |
|
|
|
|
|
COPY data/ /vol/data/ |
|
|
|
|
|
# template secrets file to generate secrets |
|
|
|
|
|
RUN eval "echo \"$(cat app.secret.ini)\"" > app.secret.ini |
|
|
|
|
|
|
|
|
### |
|
|
### |
|
|
### Crontab |
|
|
### Crontab |
|
|
### |
|
|
### |
|
|
|
|
|
|
|
|
COPY assets/crontab /root/ |
|
|
COPY assets/crontab /root/ |
|
|
RUN crontab -u gitea /root/crontab |
|
|
RUN crontab -u gitea /root/crontab |
|
|
|
|
|
|
|
@ -116,5 +119,5 @@ RUN crontab -u gitea /root/crontab |
|
|
### |
|
|
### |
|
|
|
|
|
|
|
|
# bugfix for cron |
|
|
# bugfix for cron |
|
|
COPY bugfix/cronfix /root/ |
|
|
COPY assets/bugfix/cronfix /root/ |
|
|
RUN chmod +x /root/cronfix && /root/cronfix |
|
|
RUN chmod +x /root/cronfix && /root/cronfix |
|
|