Compare commits

..

2 Commits

5 changed files with 138 additions and 60 deletions

View File

@@ -8,9 +8,50 @@ FROM debian:trixie-slim
# Setup #
ARG REPO
ENV REPO="/root/fdroid"
ENV REPO="$REPO"
ARG WEBROOT
ENV WEBROOT="/var/www/html"
ENV WEBROOT="$WEBROOT"
ARG FILE00
ENV FILE00="$FILE00"
ARG FILE01
ENV FILE01="$FILE01"
ARG FILE02
ENV FILE02="$FILE02"
ARG FILE03
ENV FILE03="$FILE03"
ARG FILE04
ENV FILE04="$FILE04"
ARG FILE05
ENV FILE05="$FILE05"
ARG FILE06
ENV FILE06="$FILE06"
ARG FILE07
ENV FILE07="$FILE07"
ARG FILE08
ENV FILE08="$FILE08"
ARG FILE09
ENV FILE09="$FILE09"
ARG FILE10
ENV FILE10="$FILE10"
ARG FILE11
ENV FILE11="$FILE11"
ARG FILE12
ENV FILE12="$FILE12"
ARG FILE13
ENV FILE13="$FILE13"
ARG FILE14
ENV FILE14="$FILE14"
ARG FILE15
ENV FILE15="$FILE15"
ARG FILE16
ENV FILE16="$FILE16"
ARG FILE17
ENV FILE17="$FILE17"
ARG FILE18
ENV FILE18="$FILE18"
ARG FILE19
ENV FILE19="$FILE19"
USER root
RUN mkdir -pv "$REPO"
@@ -26,41 +67,46 @@ RUN apt-get update && apt-get install -y -t trixie-backports fdroidserver
# Generate F-Droid Repo #
# Publish? #
# Publish to Docker Hub? #
#TBD/TODO
# Configure F-Droid Repo #
RUN sed -i 's/TBD/TODO/g' TBD.cfg
#RUN sed -i 's/TBD/TODO/g' TBD.cfg
# Download Files #
# Download Remote Files #
# TBD/TODO: is a remove necessary to get updates if the files already exist?
# TBD/TODO
# is a remove necessary to get updates if the files already exist?
# or do they need to have the version in the filename?
# or do they need to start having metadata in the apk?
#RUN bash -c 'rm -rfv "$REPO"/*'
RUN bash -c 'if [[ -n "$FILE0" ]]; then curl "$FILE0" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE1" ]]; then curl "$FILE1" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE2" ]]; then curl "$FILE2" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE3" ]]; then curl "$FILE3" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE4" ]]; then curl "$FILE4" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE5" ]]; then curl "$FILE5" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE6" ]]; then curl "$FILE6" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE7" ]]; then curl "$FILE7" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE8" ]]; then curl "$FILE8" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE9" ]]; then curl "$FILE9" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE10" ]]; then curl "$FILE10" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE11" ]]; then curl "$FILE11" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE12" ]]; then curl "$FILE12" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE13" ]]; then curl "$FILE13" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE14" ]]; then curl "$FILE14" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE15" ]]; then curl "$FILE15" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE16" ]]; then curl "$FILE16" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE17" ]]; then curl "$FILE17" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE18" ]]; then curl "$FILE18" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE19" ]]; then curl "$FILE19" "$REPO"/; fi'
RUN bash -c 'if [[ -n "$FILE00" ]]; then wget -P "$REPO" "$FILE00"; fi'
RUN bash -c 'if [[ -n "$FILE01" ]]; then wget -P "$REPO" "$FILE01"; fi'
RUN bash -c 'if [[ -n "$FILE02" ]]; then wget -P "$REPO" "$FILE02"; fi'
RUN bash -c 'if [[ -n "$FILE03" ]]; then wget -P "$REPO" "$FILE03"; fi'
RUN bash -c 'if [[ -n "$FILE04" ]]; then wget -P "$REPO" "$FILE04"; fi'
RUN bash -c 'if [[ -n "$FILE05" ]]; then wget -P "$REPO" "$FILE05"; fi'
RUN bash -c 'if [[ -n "$FILE06" ]]; then wget -P "$REPO" "$FILE06"; fi'
RUN bash -c 'if [[ -n "$FILE07" ]]; then wget -P "$REPO" "$FILE07"; fi'
RUN bash -c 'if [[ -n "$FILE08" ]]; then wget -P "$REPO" "$FILE08"; fi'
RUN bash -c 'if [[ -n "$FILE09" ]]; then wget -P "$REPO" "$FILE09"; fi'
RUN bash -c 'if [[ -n "$FILE10" ]]; then wget -P "$REPO" "$FILE10"; fi'
RUN bash -c 'if [[ -n "$FILE11" ]]; then wget -P "$REPO" "$FILE11"; fi'
RUN bash -c 'if [[ -n "$FILE12" ]]; then wget -P "$REPO" "$FILE12"; fi'
RUN bash -c 'if [[ -n "$FILE13" ]]; then wget -P "$REPO" "$FILE13"; fi'
RUN bash -c 'if [[ -n "$FILE14" ]]; then wget -P "$REPO" "$FILE14"; fi'
RUN bash -c 'if [[ -n "$FILE15" ]]; then wget -P "$REPO" "$FILE15"; fi'
RUN bash -c 'if [[ -n "$FILE16" ]]; then wget -P "$REPO" "$FILE16"; fi'
RUN bash -c 'if [[ -n "$FILE17" ]]; then wget -P "$REPO" "$FILE17"; fi'
RUN bash -c 'if [[ -n "$FILE18" ]]; then wget -P "$REPO" "$FILE18"; fi'
RUN bash -c 'if [[ -n "$FILE19" ]]; then wget -P "$REPO" "$FILE19"; fi'
RUN bash -c 'cd "$REPO" && fdroid update'
# TBD / TODO
#RUN bash -c 'cd "$REPO" && fdroid update'
# Publish Repo to Web Root #
@@ -68,7 +114,6 @@ RUN bash -c 'cd "$REPO" && fdroid update'
# Start Container #
CMD sleep 5 \
&& tail -F /var/mail/* & \
&& tail -F /var/log/nginx/* & \
&& wait -n
COPY files/main.sh /root/
RUN chmod 755 /root/main.sh
CMD /root/main.sh

View File

@@ -2,29 +2,48 @@
# Create a 3rd party F-Droid repository for providing app updates.
services:
app:
container_name: fd-app
build:
context: ./
network: host
#args:
# WEBROOT: "/var/www/html"
# REPO: "/root/fdroid"
args:
WEBROOT: ${WEBROOT}
REPO: ${REPO}
FILE00: ${FILE00}
FILE01: ${FILE01}
FILE02: ${FILE02}
FILE03: ${FILE03}
FILE04: ${FILE04}
FILE05: ${FILE05}
FILE06: ${FILE06}
FILE07: ${FILE07}
FILE08: ${FILE08}
FILE09: ${FILE09}
FILE10: ${FILE10}
FILE11: ${FILE11}
FILE12: ${FILE12}
FILE13: ${FILE13}
FILE14: ${FILE14}
FILE15: ${FILE15}
FILE16: ${FILE16}
FILE17: ${FILE17}
FILE18: ${FILE18}
FILE19: ${FILE19}
restart: always
environment:
- WEBROOT="/var/www/html"
- REPO="/root/fdroid"
- FILE0=$FILE0
- FILE1=$FILE1
- FILE2=$FILE2
- FILE3=$FILE3
- FILE4=$FILE4
- FILE5=$FILE5
- FILE6=$FILE6
- FILE7=$FILE7
- FILE8=$FILE8
- FILE9=$FILE9
- WEBROOT=$WEBROOT
- REPO=$REPO
- FILE00=$FILE00
- FILE01=$FILE01
- FILE02=$FILE02
- FILE03=$FILE03
- FILE04=$FILE04
- FILE05=$FILE05
- FILE06=$FILE06
- FILE07=$FILE07
- FILE08=$FILE08
- FILE09=$FILE09
- FILE10=$FILE10
- FILE11=$FILE11
- FILE12=$FILE12

View File

@@ -11,23 +11,32 @@ MEM=0.25G
## Repo Settings ##
WEBROOT="/var/www/html"
REPO="/root/fdroid"
REPO_NAME="Hyperling's Apps"
REPO_LINK="https://fdroid.hyperling.com"
## Files ##
# Should be provided as URLs directly to the APK files.
# TBD/TODO
FILE0="https://git.hyperling.com/me/android-carb-up/releases/download/latest/TBD"
FILE1="https://git.hyperling.com/me/flutter-expense-tracker/releases/download/latest/TBD"
FILE2="https://git.hyperling.com/me/android-infinite-timer/releases/download/latest/TBD"
FILE3="https://git.hyperling.com/me/android-45-minute-rule/releases/download/latest/TBD"
FILE4="https://git.hyperling.com/me/android-tictactoe/releases/download/latest/TBD"
FILE5="https://git.hyperling.com/me/android-hypergames/releases/download/latest/TBD"
FILE6=""
FILE7=""
FILE8=""
FILE9=""
# TBD/TODO: Remove version from app and have it in the APK?
#FILE00="https://git.hyperling.com/me/android-carb-up/releases/download/latest/TBD"
#FILE01="https://git.hyperling.com/me/flutter-expense-tracker/releases/download/latest/TBD"
#FILE02="https://git.hyperling.com/me/android-infinite-timer/releases/download/latest/TBD"
#FILE03="https://git.hyperling.com/me/android-45-minute-rule/releases/download/latest/TBD"
#FILE04="https://git.hyperling.com/me/android-tictactoe/releases/download/latest/TBD"
#FILE05="https://git.hyperling.com/me/android-hypergames/releases/download/latest/TBD"
FILE00="https://git.hyperling.com/me/android-carb-up/releases/download/1.0.1/CarbUp_v1.0.1.apk"
FILE01="https://git.hyperling.com/me/flutter-expense-tracker/releases/download/0.1.3/ExpenseTracker_v0.1.3.apk"
FILE02="https://git.hyperling.com/me/android-infinite-timer/releases/download/1.1.1/InfiniteTimer_v1.1.1.apk"
FILE03="https://git.hyperling.com/me/android-45-minute-rule/releases/download/1.07/The45MinuteRule_v1.0.7.apk"
FILE04="https://git.hyperling.com/me/android-tictactoe/releases/download/1.1.0/TicTacToe_v1.1.0.apk"
FILE05="https://git.hyperling.com/me/android-hypergames/releases/download/0.0.11/HyperGames_v0.0.11.apk"
FILE06=""
FILE07=""
FILE08=""
FILE09=""
FILE10="https://git.hyperling.com/me/ebook-freedom-flyer/releases/download/latest/VoluntarySovereignty.pdf"
FILE11="https://git.hyperling.com/me/ebook-health-protocol/releases/download/latest/HyperlingsHealthProtocol.pdf"
FILE12=""

View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
tail -F /var/mail/* &
tail -F /var/log/nginx/* &
wait -n

View File

@@ -1,5 +1,5 @@
# Hyperling.com - files/
This is copied to the container's www/files/ folder for hosting static content.
This is a volume for the container's /var/www/files/ which hosts static content.
TBD: Make this a volume, rather than copying with `Dockerfile`.
TBD: Move this to Volumes?