Compare commits

..
11 Commits
24 changed files with 87 additions and 44 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
+3 -2
View File
@@ -7,10 +7,11 @@
services: services:
app: app:
container_name: dns-app container_name: dns
image: hyperling/dns:latest
build: build:
context: ./ context: ./
image: hyperling/dns:latest
pull_policy: never
restart: always restart: always
ports: ports:
- "53:53/udp" - "53:53/udp"
+5 -4
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
@@ -202,10 +207,6 @@ RUN [ ! -z "$REPO_ICON" ] && \
RUN fdroid update -c RUN fdroid update -c
# Install Keystore #
COPY files/keystore.p12 "$FDROID"/keystore.p12
# Publish Repo Contents to Web Root # # Publish Repo Contents to Web Root #
RUN cp -rv "$FDROID" "$WEBROOT/" RUN cp -rv "$FDROID" "$WEBROOT/"
@@ -62,6 +62,7 @@ services:
FILE38: ${FILE38} FILE38: ${FILE38}
FILE39: ${FILE39} FILE39: ${FILE39}
image: hyperling/fdroid-server:latest image: hyperling/fdroid-server:latest
pull_policy: never
restart: always restart: always
ports: ports:
- "8015:80" - "8015:80"
+6 -12
View File
@@ -19,19 +19,13 @@ mkdir -pv $FDROID_DATA
keystore="$DIR"/files/keystore.p12 keystore="$DIR"/files/keystore.p12
if [[ ! -f "$keystore" ]]; then if [[ ! -f "$keystore" ]]; then
echo "ERROR: $keystore not detected. Please create it using 'keytool', like this:" echo "ERROR: $keystore not detected. Please create it and config.yml using 'fdroid init'."
cat <<- EOF exit 1
fi
keytool -genkeypair -v \\ config="$DIR"/files/config.yml
-storetype PKCS12 \\ if [[ ! -f "$config" ]]; then
-keystore keystore.p12 \\ echo "ERROR: $config not detected. Please copy the file that came with your keystore.p12 from 'fdroid init'."
-alias fdroid \\
-keyalg RSA -keysize 4096 \\
-validity 10000 \\
-dname "CN=YourName, OU=F-Droid"
EOF
echo "It will ask for passwords, it's recommended to make them both the same."
exit 1 exit 1
fi fi
+1 -1
View File
@@ -9,7 +9,7 @@ COMPOSE_BAKE=true
## Ghost ## ## Ghost ##
APP_NAME=ghost-app APP_NAME=ghost
URL='http://localhost:8368' URL='http://localhost:8368'
+3 -3
View File
@@ -13,12 +13,12 @@ services:
# SQL Lite # SQL Lite
## App ## ## App ##
container_name: gitea-app container_name: gitea
image: gitea/gitea:latest image: gitea/gitea:latest
restart: always restart: always
ports: ports:
- "3001:3000" - "$GITEA_WEB_PORT:3000"
- "2201:22" - "$GITEA_SSH_PORT:22"
volumes: volumes:
- ../../Volumes/Gitea/gitea:/data - ../../Volumes/Gitea/gitea:/data
- /etc/timezone:/etc/timezone:ro - /etc/timezone:/etc/timezone:ro
+5
View File
@@ -4,6 +4,11 @@
COMPOSE_BAKE=true COMPOSE_BAKE=true
## Gitea ##
GITEA_WEB_PORT=3001
GITEA_SSH_PORT=2201
## Performance ## ## Performance ##
# Micro Server # Micro Server
+1 -1
View File
@@ -13,7 +13,7 @@ services:
# SQL Lite # SQL Lite
## App ## ## App ##
container_name: gogs-app container_name: gogs
image: gogs/gogs:latest image: gogs/gogs:latest
restart: always restart: always
ports: ports:
+16 -2
View File
@@ -10,19 +10,33 @@ USER root
ARG DEBIAN_FRONTEND=noninteractive ARG DEBIAN_FRONTEND=noninteractive
# System Dependencies # System Dependencies
RUN echo "Install Dependencies"
RUN apt-get update && \ RUN apt-get update && \
apt-get install -y \ apt-get install -y \
git nginx cron curl bash sudo \ git nginx cron curl bash sudo \
golang gcc ca-certificates && \ ca-certificates \
golang gcc && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*
# Compile Hugo (same version Artix is currently shipping, rather than latest.) # Compile Hugo (same version Artix is currently shipping, rather than latest.)
RUN echo "Compile Hugo"
RUN CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.164.0 RUN CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@v0.164.0
# Install Hugo # Install Hugo
RUN echo "Install Hugo"
RUN mv -v $HOME/go/bin/hugo /usr/local/bin/hugo && \ RUN mv -v $HOME/go/bin/hugo /usr/local/bin/hugo && \
chmod -v 755 /usr/local/bin/hugo chmod -v 755 /usr/local/bin/hugo
RUN echo "Clean Up Go"
RUN rm -rfv /usr/local/go \
/root/go/pkg/mod \
/root/.cache/go-build \
/root/go && \
apt-get remove -y --purge golang gcc && \
apt-get autoremove -y && \
apt-get clean && \
rm -rfv /var/lib/apt/lists/* /tmp/*
# User and Group # User and Group
#RUN groupadd -r hugo && useradd -r -g hugo hugo #RUN groupadd -r hugo && useradd -r -g hugo hugo
@@ -47,4 +61,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"
@@ -7,15 +7,17 @@ services:
build: build:
context: ./ context: ./
image: hyperling/hugo:$BRANCH image: hyperling/hugo:$BRANCH
pull_policy: never
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 &
@@ -3,10 +3,11 @@
services: services:
app: app:
container_name: www-app container_name: www
build: build:
context: ./ context: ./
image: hyperling/website:latest image: hyperling/website:latest
pull_policy: never
restart: always restart: always
ports: ports:
- 8317:8080 - 8317:8080
@@ -23,10 +23,11 @@ services:
## Main ## ## Main ##
lt-app: lt-app:
container_name: lt-app container_name: lt
build: build:
context: ./ context: ./
image: hyperling/libretranslate:latest image: hyperling/libretranslate:latest
pull_policy: never
restart: always restart: always
ports: ports:
- "5000:5000" - "5000:5000"
+2 -1
View File
@@ -69,10 +69,11 @@ services:
## Nextcloud ## ## Nextcloud ##
nc-app: nc-app:
container_name: nc-app container_name: nc
build: build:
context: ./ context: ./
image: hyperling/nextcloud:latest image: hyperling/nextcloud:latest
pull_policy: never
restart: always restart: always
ports: ports:
- 8080:80 - 8080:80
+2 -1
View File
@@ -69,10 +69,11 @@ services:
## Nextcloud ## ## Nextcloud ##
nc-app: nc-app:
container_name: nc-app container_name: nc
build: build:
context: ./ context: ./
image: hyperling/nextcloud:latest image: hyperling/nextcloud:latest
pull_policy: never
restart: always restart: always
ports: ports:
- 8080:80 - 8080:80
+1 -1
View File
@@ -37,7 +37,7 @@
services: services:
pp-app: pp-app:
container_name: pp-app container_name: pp
image: photoprism/photoprism:latest image: photoprism/photoprism:latest
## Don't enable automatic restarts until PhotoPrism has been properly configured and tested! ## Don't enable automatic restarts until PhotoPrism has been properly configured and tested!
## If the service gets stuck in a restart loop, this points to a memory, filesystem, network, or database issue: ## If the service gets stuck in a restart loop, this points to a memory, filesystem, network, or database issue:
@@ -33,6 +33,7 @@ services:
build: build:
context: ./ context: ./
image: hyperling/prosody:latest image: hyperling/prosody:latest
pull_policy: never
restart: always restart: always
ports: ports:
- 5222:5222 - 5222:5222
@@ -20,6 +20,7 @@ services:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_ARCH: ${EXTRA_ARCH} EXTRA_ARCH: ${EXTRA_ARCH}
image: hyperling/provision-test:arch image: hyperling/provision-test:arch
pull_policy: never
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -49,6 +50,7 @@ services:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_DEBIAN: ${EXTRA_DEBIAN} EXTRA_DEBIAN: ${EXTRA_DEBIAN}
image: hyperling/provision-test:debian image: hyperling/provision-test:debian
pull_policy: never
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -78,6 +80,7 @@ services:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_FEDORA: ${EXTRA_FEDORA} EXTRA_FEDORA: ${EXTRA_FEDORA}
image: hyperling/provision-test:fedora image: hyperling/provision-test:fedora
pull_policy: never
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -107,6 +110,7 @@ services:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_OPENSUSE: ${EXTRA_OPENSUSE} EXTRA_OPENSUSE: ${EXTRA_OPENSUSE}
image: hyperling/provision-test:opensuse image: hyperling/provision-test:opensuse
pull_policy: never
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
@@ -136,6 +140,7 @@ services:
PACKAGES: ${PACKAGES} PACKAGES: ${PACKAGES}
EXTRA_UBUNTU: ${EXTRA_UBUNTU} EXTRA_UBUNTU: ${EXTRA_UBUNTU}
image: hyperling/provision-test:ubuntu image: hyperling/provision-test:ubuntu
pull_policy: never
restart: "no" restart: "no"
environment: environment:
- PACKAGES=$PACKAGES - PACKAGES=$PACKAGES
+1 -1
View File
@@ -23,7 +23,7 @@ How to first begin using this subproject.
``` ```
1. Verify it started correctly, no configuration file errors. 1. Verify it started correctly, no configuration file errors.
``` ```
# docker logs rp-app # docker logs rp
# docker logs rp-certbot # docker logs rp-certbot
``` ```
1. Create the real certificates. 1. Create the real certificates.
@@ -8,10 +8,11 @@
services: services:
app: app:
container_name: rp-app container_name: rp
build: build:
context: ./ context: ./
image: hyperling/nginx-reverse-proxy:latest image: hyperling/nginx-reverse-proxy:latest
pull_policy: never
restart: always restart: always
ports: ports:
- "80:80" - "80:80"
@@ -18,7 +18,7 @@
services: services:
app: app:
container_name: wp-app container_name: wp
image: wordpress:latest image: wordpress:latest
restart: always restart: always
ports: ports: