Compare commits

...
13 Commits
19 changed files with 86 additions and 32 deletions

No files matched your search

+4
View File
@@ -70,3 +70,7 @@ DEV-*
Config/Prosody/conf.avail Config/Prosody/conf.avail
Config/Prosody/etc/conf.avail Config/Prosody/etc/conf.avail
Config/Prosody/etc/ Config/Prosody/etc/
# Ignore private F-Droid Config.
Config/F-DroidRepo/files/keystore.p12
Config/F-DroidRepo/files/config.yml
+1
View File
@@ -8,6 +8,7 @@
services: services:
app: app:
container_name: dns-app container_name: dns-app
image: hyperling/dns:latest
build: build:
context: ./ context: ./
restart: always restart: always
+5
View File
@@ -181,6 +181,11 @@ RUN mv -v "$DOWNLOAD"/*.yml "$METADATA"/ || \
RUN mv -v "$DOWNLOAD"/*.png "$FDROID"/ || \ RUN mv -v "$DOWNLOAD"/*.png "$FDROID"/ || \
(echo "WARNING! No PNG file(s) to copy." && sleep 10) (echo "WARNING! No PNG file(s) to copy." && sleep 10)
# Install Keystore #
COPY files/keystore.p12 "$FDROID"/keystore.p12
COPY files/config.yml "$FDROID"/config.yml
# Configure F-Droid Repo # # Configure F-Droid Repo #
ARG REPO_DOMAIN ARG REPO_DOMAIN
@@ -11,7 +11,7 @@ volumes:
services: services:
app: app:
container_name: fd-app container_name: fdroid
build: build:
context: ./ context: ./
args: args:
@@ -61,6 +61,7 @@ services:
FILE37: ${FILE37} FILE37: ${FILE37}
FILE38: ${FILE38} FILE38: ${FILE38}
FILE39: ${FILE39} FILE39: ${FILE39}
image: hyperling/fdroid-server:latest
restart: always restart: always
ports: ports:
- "8015:80" - "8015:80"
+22 -17
View File
@@ -23,25 +23,30 @@ REPO_NAME="Hyperling's Apps"
REPO_ICON="peace.png" REPO_ICON="peace.png"
## Files ## ## 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.
FILE00="https://hyperling.com/files/media/icons/peace.png" FILE00="https://hyperling.com/files/media/icons/peace.png"
FILE01="https://git.hyperling.com/me/android-carb-up/releases/download/latest/CarbUp_v1.0.1.apk"
FILE02="https://git.hyperling.com/me/android-carb-up/raw/branch/main/com.hyperling.carbupbeta.yml" FILE01="https://git.hyperling.com/me/android-carb-up/releases/download/latest/CarbUp.apk"
FILE03="https://git.hyperling.com/me/flutter-expense-tracker/releases/download/latest/ExpenseTracker_v0.1.3.apk" FILE02="https://git.hyperling.com/me/android-carb-up/raw/branch/dev/com.hyperling.carbupbeta.yml"
FILE04="https://git.hyperling.com/me/flutter-expense-tracker/raw/branch/main/com.hyperling.expense_tracker.yml"
FILE05="https://git.hyperling.com/me/android-infinite-timer/releases/download/latest/InfiniteTimer_v1.1.1.apk" FILE03="https://git.hyperling.com/me/flutter-expense-tracker/releases/download/latest/ExpenseTracker.apk"
FILE06="https://git.hyperling.com/me/android-infinite-timer/raw/branch/main/com.hyperling.apps.infinitetimer.yml" FILE04="https://git.hyperling.com/me/flutter-expense-tracker/raw/branch/dev/com.hyperling.expense_tracker.yml"
FILE07="https://git.hyperling.com/me/android-45-minute-rule/releases/download/latest/The45MinuteRule_v1.0.7.apk"
FILE08="https://git.hyperling.com/me/android-45-minute-rule/raw/branch/main/com.hyperling.apps.the45minuterule.yml" FILE05="https://git.hyperling.com/me/android-infinite-timer/releases/download/latest/InfiniteTimer.apk"
FILE09="https://git.hyperling.com/me/android-tictactoe/releases/download/latest/TicTacToe_v1.1.0.apk" FILE06="https://git.hyperling.com/me/android-infinite-timer/raw/branch/dev/com.hyperling.apps.infinitetimer.yml"
FILE10="https://git.hyperling.com/me/android-tictactoe/raw/branch/main/com.hyperling.tictactoe.yml"
FILE11="https://git.hyperling.com/me/android-hypergames/releases/download/latest/HyperGames_v0.0.11.apk" FILE07="https://git.hyperling.com/me/android-45-minute-rule/releases/download/latest/The45MinuteRule.apk"
FILE12="https://git.hyperling.com/me/android-hypergames/raw/branch/main/apps.hyperling.com.platformer.yml" FILE08="https://git.hyperling.com/me/android-45-minute-rule/raw/branch/dev/com.hyperling.apps.the45minuterule.yml"
FILE13=""
FILE14="" FILE09="https://git.hyperling.com/me/android-tictactoe/releases/download/latest/TicTacToe.apk"
FILE10="https://git.hyperling.com/me/android-tictactoe/raw/branch/dev/com.hyperling.tictactoe.yml"
FILE11="https://git.hyperling.com/me/android-hypergames/releases/download/latest/HyperGames.apk"
FILE12="https://git.hyperling.com/me/android-hypergames/raw/branch/dev/apps.hyperling.com.platformer.yml"
FILE13="https://git.hyperling.com/me/flutter-sunset-alarm/releases/download/latest/SunsetAlarm.apk"
FILE14="https://git.hyperling.com/me/flutter-sunset-alarm/raw/branch/dev/com.hyperling.sunset_alarm.yml"
FILE15="" FILE15=""
FILE16="" FILE16=""
FILE17="" FILE17=""
Binary file not shown.
+17 -1
View File
@@ -6,12 +6,28 @@
## Setup ## ## Setup ##
DIR="$(dirname -- "${BASH_SOURCE[0]}")" DIR="$(dirname -- "${BASH_SOURCE[0]}")"
source $DIR/.env env="$DIR"/.env
if [[ ! -f "$env" ]]; then
cp -v "$DIR"/example.env "$env"
fi
source "$env"
## Main ## ## Main ##
# Create folders. # Create folders.
mkdir -pv $FDROID_DATA mkdir -pv $FDROID_DATA
keystore="$DIR"/files/keystore.p12
if [[ ! -f "$keystore" ]]; then
echo "ERROR: $keystore not detected. Please create it and config.yml using 'fdroid init'."
exit 1
fi
config="$DIR"/files/config.yml
if [[ ! -f "$config" ]]; then
echo "ERROR: $config not detected. Please copy the file that came with your keystore.p12 from 'fdroid init'."
exit 1
fi
# Finish successfully. # Finish successfully.
exit 0 exit 0
+1 -1
View File
@@ -47,4 +47,4 @@ RUN chmod +x /root/main.sh
## Main ## ## Main ##
# Install + Run Website # Install + Run Website
WORKDIR /var/www/ WORKDIR /var/www/
CMD /root/main.sh "$REPO" "$BRANCH" "$PROD" "$DEV" CMD /root/main.sh "$REPO" "$BRANCH" "$PROD" "$DEV" "$BASEURL"
@@ -6,16 +6,17 @@ services:
container_name: hugo container_name: hugo
build: build:
context: ./ context: ./
image: hyperling-hugo:$BRANCH image: hyperling/hugo:$BRANCH
restart: always restart: always
ports: ports:
- $PROD_PORT:80 # Production minified files served using NGINX. - $NGINX_PORT:80 # Production minified files served using NGINX.
#- $DEV_PORT:1380 # Development files with drafts served by Hugo Server. #- $HUGO_PORT:1380 # Development files with drafts served by Hugo Server.
environment: environment:
- REPO=$REPO - REPO=$REPO
- BRANCH=$BRANCH - BRANCH=$BRANCH
- PROD=$PROD - PROD=$NGINX
- DEV=$DEV - DEV=$HUGO
- BASEURL=$BASEURL
healthcheck: healthcheck:
test: curl -sS http://localhost:80 || curl -sS http://localhost:1380 || exit 1 test: curl -sS http://localhost:80 || curl -sS http://localhost:1380 || exit 1
interval: 1m interval: 1m
+6 -4
View File
@@ -16,12 +16,14 @@ BRANCH=prod
# Please use values YES/TRUE and NO/FALSE. # Please use values YES/TRUE and NO/FALSE.
# Whether to start NGINX # Whether to start NGINX
PROD=YES NGINX=YES
PROD_PORT=8013 NGINX_PORT=8013
# Whether to start Hugo Server # Whether to start Hugo Server
DEV=NO HUGO=NO
DEV_PORT=1380 HUGO_PORT=1380
BASEURL=https://blog.hyperling.com
# #
## Resources ## ## Resources ##
+2 -1
View File
@@ -3,6 +3,7 @@
cd /var/www/hugo/site cd /var/www/hugo/site
FORCE="$1" FORCE="$1"
BASEURL="$2"
echo "*** Running cronjob @ `date` ***" echo "*** Running cronjob @ `date` ***"
@@ -16,7 +17,7 @@ if [[ $status != 0 && -e /var/www/html/index.html && -z $FORCE ]]; then
fi fi
# If the project was not already up to date, build the new files for NGINX. # If the project was not already up to date, build the new files for NGINX.
/usr/local/bin/hugo --gc --minify /usr/local/bin/hugo $BASEURL --gc --minify
status="$?" status="$?"
echo "* Hugo status is '$status', FORCE is '$FORCE'." echo "* Hugo status is '$status', FORCE is '$FORCE'."
if [[ $status == 0 && -e public/index.html ]]; then if [[ $status == 0 && -e public/index.html ]]; then
+9 -2
View File
@@ -17,6 +17,13 @@ DEV="$4"
typeset -u DEV typeset -u DEV
echo "DEV='$DEV'" echo "DEV='$DEV'"
BASEURL="$5"
echo "BASEURL='$BASEURL'"
baseurl=""
if [[ -n "$BASEURL" ]]; then
baseurl="-b $BASEURL"
fi
SITE="/var/www/hugo/site" SITE="/var/www/hugo/site"
CLONE="/var/www/hugo/site-new" CLONE="/var/www/hugo/site-new"
@@ -40,7 +47,7 @@ mv -v $CLONE $SITE
echo "*** Copying Static Files to NGINX ***" echo "*** Copying Static Files to NGINX ***"
rm -rfv /var/www/html/* rm -rfv /var/www/html/*
sudo -u www-data /var/www/hugo/cronjob.sh sudo -u www-data /var/www/hugo/cronjob.sh "" "$baseurl"
echo "*** Starting Cron ***" echo "*** Starting Cron ***"
service cron start service cron start
@@ -73,7 +80,7 @@ if [[ "$DEV" == "Y"* || "$DEV" == "T"* ]]; then
echo "* Dev server not detected, starting..." echo "* Dev server not detected, starting..."
cd $SITE cd $SITE
killall hugo 2>/dev/null killall hugo 2>/dev/null
sudo -u www-data hugo server -D -F --noBuildLock --bind 0.0.0.0 -p 1380 & sudo -u www-data hugo server $baseurl -D -F --noBuildLock --bind 0.0.0.0 -p 1380 &
fi fi
sleep 30 sleep 30
done & done &
@@ -6,6 +6,7 @@ services:
container_name: www-app container_name: www-app
build: build:
context: ./ context: ./
image: hyperling/website:latest
restart: always restart: always
ports: ports:
- 8317:8080 - 8317:8080
@@ -26,6 +26,7 @@ services:
container_name: lt-app container_name: lt-app
build: build:
context: ./ context: ./
image: hyperling/libretranslate:latest
restart: always restart: always
ports: ports:
- "5000:5000" - "5000:5000"
@@ -72,6 +72,7 @@ services:
container_name: nc-app container_name: nc-app
build: build:
context: ./ context: ./
image: hyperling/nextcloud:latest
restart: always restart: always
ports: ports:
- 8080:80 - 8080:80
@@ -72,6 +72,7 @@ services:
container_name: nc-app container_name: nc-app
build: build:
context: ./ context: ./
image: hyperling/nextcloud:latest
restart: always restart: always
ports: ports:
- 8080:80 - 8080:80
@@ -32,6 +32,7 @@ services:
container_name: prosody container_name: prosody
build: build:
context: ./ context: ./
image: hyperling/prosody:latest
restart: always restart: always
ports: ports:
- 5222:5222 - 5222:5222
@@ -19,6 +19,7 @@ services:
args: args:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_ARCH: ${EXTRA_ARCH} EXTRA_ARCH: ${EXTRA_ARCH}
image: hyperling/provision-test:arch
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -47,6 +48,7 @@ services:
args: args:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_DEBIAN: ${EXTRA_DEBIAN} EXTRA_DEBIAN: ${EXTRA_DEBIAN}
image: hyperling/provision-test:debian
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -75,6 +77,7 @@ services:
args: args:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_FEDORA: ${EXTRA_FEDORA} EXTRA_FEDORA: ${EXTRA_FEDORA}
image: hyperling/provision-test:fedora
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -103,6 +106,7 @@ services:
args: args:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_OPENSUSE: ${EXTRA_OPENSUSE} EXTRA_OPENSUSE: ${EXTRA_OPENSUSE}
image: hyperling/provision-test:opensuse
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -131,6 +135,7 @@ services:
args: args:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_UBUNTU: ${EXTRA_UBUNTU} EXTRA_UBUNTU: ${EXTRA_UBUNTU}
image: hyperling/provision-test:ubuntu
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -11,6 +11,7 @@ services:
container_name: rp-app container_name: rp-app
build: build:
context: ./ context: ./
image: hyperling/nginx-reverse-proxy:latest
restart: always restart: always
ports: ports:
- "80:80" - "80:80"