Create untested configuration for hosting an F-Droid repository.
This commit is contained in:
		
							
								
								
									
										49
									
								
								Config/F-DroidRepo/Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										49
									
								
								Config/F-DroidRepo/Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,49 @@
 | 
			
		||||
# Build a container which hosts Android apps through an F-Droid repository.
 | 
			
		||||
 | 
			
		||||
# Base Image #
 | 
			
		||||
 | 
			
		||||
FROM debian:trixie-slim
 | 
			
		||||
 | 
			
		||||
# Setup #
 | 
			
		||||
 | 
			
		||||
RUN mkdir -pv "$REPO/"
 | 
			
		||||
 | 
			
		||||
# Install Packages#
 | 
			
		||||
 | 
			
		||||
# TBD/TODO: get list of packages
 | 
			
		||||
RUN apt-get update && apt-get install bash curl fdroidserver
 | 
			
		||||
 | 
			
		||||
# Download Files #
 | 
			
		||||
 | 
			
		||||
# TBD/TODO: is a remove necessary to get updates if the files already exist?
 | 
			
		||||
#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'
 | 
			
		||||
 | 
			
		||||
# Start Container #
 | 
			
		||||
 | 
			
		||||
USER root
 | 
			
		||||
WORKDIR "$REPO"
 | 
			
		||||
CMD cd "$REPO" && \
 | 
			
		||||
      fdroid update \
 | 
			
		||||
      && tail -F /var/mail/mail & \
 | 
			
		||||
      && wait -n
 | 
			
		||||
							
								
								
									
										15
									
								
								Config/F-DroidRepo/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								Config/F-DroidRepo/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,15 @@
 | 
			
		||||
# F-Droid Repo
 | 
			
		||||
 | 
			
		||||
Simple container to create a 3rd party repository to be imported into F-Droid.
 | 
			
		||||
 | 
			
		||||
Downloads all the APKs during the build process and loads them automatically,
 | 
			
		||||
does not need any interaction other than modifying the `.env` with the URLs
 | 
			
		||||
of the apps you would like to be present.
 | 
			
		||||
 | 
			
		||||
If any apps get updated, rebuilding the container should pull any changes.
 | 
			
		||||
 | 
			
		||||
``` shell
 | 
			
		||||
docker compose down
 | 
			
		||||
docker compose build
 | 
			
		||||
docker compose up -d
 | 
			
		||||
```
 | 
			
		||||
							
								
								
									
										41
									
								
								Config/F-DroidRepo/docker-compose.example.yml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								Config/F-DroidRepo/docker-compose.example.yml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
# 2025-11-01 Hyperling
 | 
			
		||||
# Create a 3rd party F-Droid repository for providing app updates.
 | 
			
		||||
 | 
			
		||||
services:
 | 
			
		||||
 | 
			
		||||
  app:
 | 
			
		||||
    container_name: fd-app
 | 
			
		||||
    build:
 | 
			
		||||
      context: ./
 | 
			
		||||
      network: host
 | 
			
		||||
    restart: always
 | 
			
		||||
    environment:
 | 
			
		||||
      - REPO=$REPO
 | 
			
		||||
      - FILE0=$FILE0
 | 
			
		||||
      - FILE1=$FILE1
 | 
			
		||||
      - FILE2=$FILE2
 | 
			
		||||
      - FILE3=$FILE3
 | 
			
		||||
      - FILE4=$FILE4
 | 
			
		||||
      - FILE5=$FILE5
 | 
			
		||||
      - FILE6=$FILE6
 | 
			
		||||
      - FILE7=$FILE7
 | 
			
		||||
      - FILE8=$FILE8
 | 
			
		||||
      - FILE9=$FILE9
 | 
			
		||||
      - FILE10=$FILE10
 | 
			
		||||
      - FILE11=$FILE11
 | 
			
		||||
      - FILE12=$FILE12
 | 
			
		||||
      - FILE13=$FILE13
 | 
			
		||||
      - FILE14=$FILE14
 | 
			
		||||
      - FILE15=$FILE15
 | 
			
		||||
      - FILE16=$FILE16
 | 
			
		||||
      - FILE17=$FILE17
 | 
			
		||||
      - FILE18=$FILE18
 | 
			
		||||
      - FILE19=$FILE19
 | 
			
		||||
    volumes:
 | 
			
		||||
      - ../../Volumes/F-DroidRepo:$REPO
 | 
			
		||||
    deploy:
 | 
			
		||||
      mode: global
 | 
			
		||||
      resources:
 | 
			
		||||
        limits:
 | 
			
		||||
          cpus: $CPU
 | 
			
		||||
          memory: $RAM
 | 
			
		||||
							
								
								
									
										41
									
								
								Config/F-DroidRepo/example.env
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										41
									
								
								Config/F-DroidRepo/example.env
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,41 @@
 | 
			
		||||
# This file will need copied as `.env` and to have its values changed.
 | 
			
		||||
 | 
			
		||||
## Docker ##
 | 
			
		||||
 | 
			
		||||
COMPOSE_BAKE=true
 | 
			
		||||
 | 
			
		||||
## Performance ##
 | 
			
		||||
 | 
			
		||||
CPU=0.25
 | 
			
		||||
MEM=0.25G
 | 
			
		||||
 | 
			
		||||
## Repo Settings ##
 | 
			
		||||
 | 
			
		||||
REPO="/var/www/html/fdroid/repo"
 | 
			
		||||
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=""
 | 
			
		||||
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=""
 | 
			
		||||
FILE13=""
 | 
			
		||||
FILE14=""
 | 
			
		||||
FILE15=""
 | 
			
		||||
FILE16=""
 | 
			
		||||
FILE17=""
 | 
			
		||||
FILE18=""
 | 
			
		||||
FILE19=""
 | 
			
		||||
		Reference in New Issue
	
	Block a user