Compare commits

..

10 Commits

8 changed files with 63 additions and 52 deletions

View File

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

View File

@@ -1,25 +1,50 @@
# Build a container which hosts Android apps through an F-Droid repository. # 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 # # Base Image #
FROM debian:trixie-slim FROM debian:trixie-slim
# Setup # # variables #
#ARG REPO ENV WEBROOT="/var/www/html"
#ENV REPO="$REPO" ENV FDROID="/root/fdroid"
#ARG WEBROOT ENV REPO="$FDROID/repo"
#ENV WEBROOT="$WEBROOT"
# 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 ARG REPO_DOMAIN
ENV REPO_DOMAIN="$REPO_DOMAIN" ENV REPO_DOMAIN="$REPO_DOMAIN"
ARG REPO_NAME ARG REPO_NAME
ENV REPO_NAME="$REPO_NAME" ENV REPO_NAME="$REPO_NAME"
ENV WEBROOT="/var/www/html" # TBD/TODO: Add commands to remove repo_url and repo_name if they already exist.
ENV FDROID="/root/fdroid"
ENV REPO="$FDROID/repo" 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 ARG FILE00
ENV FILE00="$FILE00" ENV FILE00="$FILE00"
@@ -62,27 +87,6 @@ ENV FILE18="$FILE18"
ARG FILE19 ARG FILE19
ENV FILE19="$FILE19" ENV FILE19="$FILE19"
# 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
# Configure F-Droid Repo #
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
# Download Remote Files # # Download Remote Files #
RUN mkdir -pv /root/fdroid/repo RUN mkdir -pv /root/fdroid/repo
@@ -112,8 +116,3 @@ RUN fdroid update -c
# Publish Repo Contents to Web Root # # Publish Repo Contents to Web Root #
RUN cp -r "$REPO/"* "$WEBROOT/" RUN cp -r "$REPO/"* "$WEBROOT/"
RUN service nginx start
# Start Container #
CMD nginx -g "daemon off;"

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. If any apps get updated, rebuilding the container should pull any changes.
``` shell ``` shell
docker compose down
docker compose build docker compose build
docker compose down
docker compose up -d 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

@@ -60,9 +60,8 @@ services:
- FILE17=$FILE17 - FILE17=$FILE17
- FILE18=$FILE18 - FILE18=$FILE18
- FILE19=$FILE19 - FILE19=$FILE19
#volumes: volumes:
# #- ../../Volumes/F-DroidRepo/fdroid:/root/fdroid - ../../Volumes/F-DroidRepo/share:/root/share
# - ../../Volumes/F-DroidRepo/nginx:/var/www/html
deploy: deploy:
mode: global mode: global
resources: resources:

View File

@@ -19,14 +19,9 @@ REPO_NAME="Hyperling's Apps"
## Files ## ## Files ##
# Should be provided as URLs directly to the APK 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/latest/CarbUp_v1.0.1.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" 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" FILE02="https://git.hyperling.com/me/android-infinite-timer/releases/download/latest/InfiniteTimer_v1.1.1.apk"

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: Upgrading the containers is as easy as this:
``` ```
# docker compose down
# docker compose pull # docker compose pull
# docker compose build # docker compose build
# docker compose down
# docker compose up -d # 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. This is essentially an upgrade but there is no pull.
``` ```
# docker compose down
# docker compose build # docker compose build
# docker compose down
# docker compose up -d # docker compose up -d
``` ```
If wanted as a one-line command: 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 ## Add New Config

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