Compare commits

..

16 Commits

Author SHA1 Message Date
0371059706 Match tag exactly for deletion by only checking what's between the periods. 2025-11-28 15:05:35 -07:00
1796a21579 Change is working great! env-docker became the tag. 2025-11-28 14:56:28 -07:00
8bfe49c947 Add note as to what's about to change with backup script. 2025-11-28 14:55:05 -07:00
361c29cf25 Add a note not to edit files in the LetsEncrypt folders. 2025-11-28 14:31:53 -07:00
921c450f03 Remove TBD's in FDroid env file. 2025-11-21 18:03:23 -07:00
933d307254 Create a share directory for FDroid Server so that items can be copied in and out for testing. 2025-11-21 17:57:55 -07:00
6a2dcba0f9 Move guide URL for FDroid Server to README. 2025-11-21 17:57:19 -07:00
2d565c94f0 Run pull and build before taking the container down. 2025-11-21 08:29:22 -07:00
b490c84b37 Add note for removing FDroid repo config lines if they already exist. 2025-11-17 14:04:05 -07:00
fa25327462 Reorder the FDroid build file so that the base image settings are separate from the advanced configuration. 2025-11-17 14:02:55 -07:00
9ab6335a3c Pull and the build the container while it's still up, reducing downtime. 2025-11-16 07:00:45 -07:00
0eb2ecf033 Changes to compose and env files to get FDroid build working successfully. 2025-11-11 20:12:33 -07:00
a233f32751 Run script is no longer needed to keep the container running, build file uses nginx as the command which also provides the web log. 2025-11-11 20:10:42 -07:00
99afb5ac50 Container is now working!! Apps do not register though, likely since they are missing metadata. 2025-11-11 20:09:15 -07:00
f16b44a5b6 Start the container in root's home, not /. 2025-11-11 20:08:13 -07:00
87a571c89a Create super simple container for playing around in. 2025-11-11 15:51:00 -07:00
11 changed files with 107 additions and 84 deletions

View File

@@ -46,8 +46,8 @@ fi
echo "nameserver 1.1.1.1" > /etc/resolv.conf
echo -e "\n*** Start the docker container ***"
docker compose down
docker compose build
docker compose down
docker compose up -d
echo -e "\n*** Now use the local process for DNS ***\n/etc/resolv.conf:"

View File

@@ -1,16 +1,50 @@
# Build a container which hosts Android apps through an F-Droid repository.
# https://f-droid.org/en/docs/Setup_an_F-Droid_App_Repo/
# Base Image #
FROM debian:trixie-slim
# Setup #
# variables #
ARG REPO
ENV REPO="$REPO"
ARG WEBROOT
ENV WEBROOT="$WEBROOT"
ENV WEBROOT="/var/www/html"
ENV FDROID="/root/fdroid"
ENV REPO="$FDROID/repo"
# Install Packages#
# https://f-droid.org/en/docs/Installing_the_Server_and_Repo_Tools/#debianubuntumintetc
RUN apt-get update && apt-get install -y sudo bash curl git vim nginx
COPY files/debian-backports.sources /etc/apt/sources.list.d/
RUN apt-get update && apt-get install -y -t trixie-backports fdroidserver
# Generate F-Droid Repo #
USER root
RUN mkdir -pv "$FDROID"
WORKDIR "$FDROID"
RUN fdroid init
# Start Command #
CMD nginx -g "daemon off;"
# This is where the image would get published. #
# Configure F-Droid Repo #
ARG REPO_DOMAIN
ENV REPO_DOMAIN="$REPO_DOMAIN"
ARG REPO_NAME
ENV REPO_NAME="$REPO_NAME"
# TBD/TODO: Add commands to remove repo_url and repo_name if they already exist.
RUN sed -i "$ a repo_url: $REPO_DOMAIN/fdroid/repo" "$FDROID/config.yml"
RUN sed -i "$ a repo_name: $REPO_NAME" "$FDROID/config.yml"
RUN fdroid update
# Advanced Variables #
ARG FILE00
ENV FILE00="$FILE00"
@@ -53,37 +87,9 @@ ENV FILE18="$FILE18"
ARG FILE19
ENV FILE19="$FILE19"
USER root
RUN mkdir -pv "$REPO"
WORKDIR "$REPO"
# Install Packages#
# https://f-droid.org/en/docs/Installing_the_Server_and_Repo_Tools/#debianubuntumintetc
RUN apt-get update && apt-get install -y sudo bash curl git vim nginx
COPY files/debian-backports.sources /etc/apt/sources.list.d/
RUN apt-get update && apt-get install -y -t trixie-backports fdroidserver
# Generate F-Droid Repo #
# Publish to Docker Hub? #
#TBD/TODO
# Configure F-Droid Repo #
#RUN sed -i 's/TBD/TODO/g' TBD.cfg
# Download Remote Files #
# 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 mkdir -pv /root/fdroid/repo
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'
@@ -105,15 +111,8 @@ 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'
# TBD / TODO
#RUN bash -c 'cd "$REPO" && fdroid update'
RUN fdroid update -c
# Publish Repo to Web Root #
# Publish Repo Contents to Web Root #
#TBD/TODO
# Start Container #
COPY files/main.sh /root/
RUN chmod 755 /root/main.sh
CMD /root/main.sh
RUN cp -r "$REPO/"* "$WEBROOT/"

View File

@@ -9,7 +9,15 @@ 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 down
docker compose up -d
```
## Guide followed to create this Container
https://f-droid.org/en/docs/Setup_an_F-Droid_App_Repo/
## App Metadata
TBD

View File

@@ -8,8 +8,10 @@ services:
context: ./
network: host
args:
WEBROOT: ${WEBROOT}
REPO: ${REPO}
#WEBROOT: ${WEBROOT}
#REPO: ${REPO}
REPO_DOMAIN: ${REPO_DOMAIN}
REPO_NAME: ${REPO_NAME}
FILE00: ${FILE00}
FILE01: ${FILE01}
FILE02: ${FILE02}
@@ -31,9 +33,13 @@ services:
FILE18: ${FILE18}
FILE19: ${FILE19}
restart: always
ports:
- "8015:80"
environment:
- WEBROOT=$WEBROOT
- REPO=$REPO
#- WEBROOT=$WEBROOT
#- REPO=$REPO
- REPO_DOMAIN=$REPO_DOMAIN
- REPO_NAME=$REPO_NAME
- FILE00=$FILE00
- FILE01=$FILE01
- FILE02=$FILE02
@@ -55,8 +61,7 @@ services:
- FILE18=$FILE18
- FILE19=$FILE19
volumes:
- ../../Volumes/F-DroidRepo/fdroid:/root/fdroid
- ../../Volumes/F-DroidRepo/nginx:/var/www/html
- ../../Volumes/F-DroidRepo/share:/root/share
deploy:
mode: global
resources:

View File

@@ -11,28 +11,23 @@ MEM=0.25G
## Repo Settings ##
WEBROOT="/var/www/html"
REPO="/root/fdroid"
#WEBROOT="/var/www/html"
#REPO="/root/fdroid"
REPO_DOMAIN="https://fdroid.hyperling.com"
REPO_NAME="Hyperling's Apps"
REPO_LINK="https://fdroid.hyperling.com"
## Files ##
# Should be provided as URLs directly to the APK files.
# TBD: Eventually change APKs to not have version number in them.
# - Currently being done because Obtainium does not read the Gitea release/tag.
# 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"
FILE00="https://git.hyperling.com/me/android-carb-up/releases/download/latest/CarbUp_v1.0.1.apk"
FILE01="https://git.hyperling.com/me/flutter-expense-tracker/releases/download/latest/ExpenseTracker_v0.1.3.apk"
FILE02="https://git.hyperling.com/me/android-infinite-timer/releases/download/latest/InfiniteTimer_v1.1.1.apk"
FILE03="https://git.hyperling.com/me/android-45-minute-rule/releases/download/latest/The45MinuteRule_v1.0.7.apk"
FILE04="https://git.hyperling.com/me/android-tictactoe/releases/download/latest/TicTacToe_v1.1.0.apk"
FILE05="https://git.hyperling.com/me/android-hypergames/releases/download/latest/HyperGames_v0.0.11.apk"
FILE06=""
FILE07=""
FILE08=""

View File

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

View File

@@ -62,9 +62,9 @@ If the proxy needs turned off either stop or down may be used.
Upgrading the containers is as easy as this:
```
# docker compose down
# docker compose pull
# docker compose build
# docker compose down
# docker compose up -d
```
@@ -75,15 +75,15 @@ This may be possible to do when the system is up, but the best results have come
This is essentially an upgrade but there is no pull.
```
# docker compose down
# docker compose build
# docker compose down
# docker compose up -d
```
If wanted as a one-line command:
```
# docker compose down && docker compose build && docker compose up -d
# docker compose build && docker compose down && docker compose up -d
```
## Add New Config

View File

@@ -0,0 +1,11 @@
# 2025-11-11 Hyperling
# Basic container for testing commands in a blank slate environment.
services:
app:
container_name: sandbox
image: debian:trixie-slim
command: "tail -F /var/mail/*"
working_dir: /root
volumes:
- ../../Volumes/Sandbox/root-shared:/root/shared

View File

@@ -0,0 +1,10 @@
# DO NOT EDIT
Manual modifications in these directories is not recommended.
Changes should be done via the `certbot` command in the `rp-certbot` container.
```
manage -i rp-certbot
```
Example commands would be `certbot renew` and `certbot delete`.

View File

@@ -9,7 +9,7 @@ source "$DIR/../source.env"
## Variables ##
TAG="Docker"
TAG="${DIR##*/}"
DATE="`date "+%Y%m%d-%H%M%S"`"
BACKUP_DIR="/srv/backup"
BASENAME="Backup"
@@ -60,7 +60,7 @@ chown -Rv root:root "$BACKUP_DIR"
# Remove the last backup.
echo "`date` - Removing existing files."
cd "$BACKUP_DIR"
mv -v "$BASENAME"*"$TAG"* TRASH/
mv -v "$BASENAME."*".$TAG."* TRASH/
rm -v TRASH/*
if [[ "$down" == "TRUE" ]]; then

View File

@@ -179,11 +179,6 @@ if [[ -n $up || -n $down || -n $build || -n $pull || -n $maintenance ]]; then
fi
fi
# Shut off container.
if [[ $down == "Y" ]]; then
[ -e docker-compose.yml ] && docker compose down
fi
# Update container from remote source such as Docker Hub.
if [[ $pull == "Y" ]]; then
[ -e docker-compose.yml ] && docker compose pull
@@ -194,6 +189,11 @@ if [[ -n $up || -n $down || -n $build || -n $pull || -n $maintenance ]]; then
[ -e Dockerfile ] && docker compose build
fi
# Shut off container.
if [[ $down == "Y" ]]; then
[ -e docker-compose.yml ] && docker compose down
fi
# Run the container as a daemon.
if [[ $up == "Y" ]]; then
[ -e docker-compose.yml ] && docker compose up -d