From 134ead3d93f33437612dc77ba4767ff031f03144 Mon Sep 17 00:00:00 2001 From: Derek Cooper Date: Fri, 8 May 2026 10:25:42 -0700 Subject: [PATCH] fixed a bunch of variables and modified the Gitea compose a lot --- Dockhand/.env.example | 3 ++ Dockhand/docker-compose-volume.yaml | 10 ++--- Doku/.env.example | 5 ++- Doku/docker-compose.yaml | 4 +- Draw.io/.env.example | 5 ++- Draw.io/docker-compose.yaml | 4 +- Gitea/.env.example | 21 +++++----- Gitea/docker-compose.yaml | 62 +++++++++++++++++++---------- 8 files changed, 73 insertions(+), 41 deletions(-) diff --git a/Dockhand/.env.example b/Dockhand/.env.example index 1edaff2..de6fa0f 100644 --- a/Dockhand/.env.example +++ b/Dockhand/.env.example @@ -1,3 +1,6 @@ +# Docker image tag for fnsys/dockhand (e.g. "1.2.3" or "latest"); defaults to latest if unset +DOCKHAND_VERSION="latest" + # Main interface port for accessing the application DOCKHAND_PORT="3000" diff --git a/Dockhand/docker-compose-volume.yaml b/Dockhand/docker-compose-volume.yaml index 979f9c8..e6042fd 100644 --- a/Dockhand/docker-compose-volume.yaml +++ b/Dockhand/docker-compose-volume.yaml @@ -1,16 +1,16 @@ services: app: - image: fnsys/dockhand:latest + image: fnsys/dockhand:${DOCKHAND_VERSION:-latest} container_name: dockhand ports: - - "${DOCKHAND_PORT}:3000" + - "${DOCKHAND_PORT:-3000}:3000" volumes: - /var/run/docker.sock:/var/run/docker.sock - dockhand_data:/app/data environment: - - PUID=${DOCKHAND_PUID} - - PGID=${DOCKHAND_PGID} - - TZ=${DOCKHAND_TZ} + - PUID=${DOCKHAND_PUID:-1000} + - PGID=${DOCKHAND_PGID:-1000} + - TZ=${DOCKHAND_TZ:-America/Los_Angeles} deploy: resources: limits: diff --git a/Doku/.env.example b/Doku/.env.example index 9cdf8b4..8f449ef 100644 --- a/Doku/.env.example +++ b/Doku/.env.example @@ -1,2 +1,5 @@ +# Docker image tag for amerkurev/doku (e.g. "1.2.3" or "latest"); defaults to latest if unset +DOKU_VERSION="latest" + # Main interface port for accessing the application -DOKU_PORT="8000" \ No newline at end of file +DOKU_PORT="9090" \ No newline at end of file diff --git a/Doku/docker-compose.yaml b/Doku/docker-compose.yaml index 54c9ad4..14bf615 100644 --- a/Doku/docker-compose.yaml +++ b/Doku/docker-compose.yaml @@ -1,12 +1,12 @@ services: app: - image: amerkurev/doku:latest + image: amerkurev/doku:${DOKU_VERSION:-latest} container_name: doku volumes: - /var/run/docker.sock:/var/run/docker.sock:ro - /:/hostroot:ro ports: - - ${DOKU_PORT}:9090 + - ${DOKU_PORT:-9090}:9090 deploy: resources: limits: diff --git a/Draw.io/.env.example b/Draw.io/.env.example index 6e0e878..100d31d 100644 --- a/Draw.io/.env.example +++ b/Draw.io/.env.example @@ -1,5 +1,8 @@ +# Docker image tag for jgraph/drawio (e.g. "24.0.0" or "latest"); defaults to latest if unset +DRAWIO_VERSION="latest" + # Main interface port for accessing the application -DRAWIO_PORT="8000" +DRAWIO_PORT="8080" # Enable local PDF/image export without relying on an external service # Set to 1 to enable, 0 or omit to disable diff --git a/Draw.io/docker-compose.yaml b/Draw.io/docker-compose.yaml index 7ae93e1..142c31d 100644 --- a/Draw.io/docker-compose.yaml +++ b/Draw.io/docker-compose.yaml @@ -1,9 +1,9 @@ services: app: - image: jgraph/drawio:latest + image: jgraph/drawio:${DRAWIO_VERSION:-latest} container_name: drawio ports: - - ${DRAWIO_PORT}:8080 + - ${DRAWIO_PORT:-8080}:8080 environment: - DRAWIO_SELF_CONTAINED=${DRAWIO_SELF_CONTAINED:-0} healthcheck: diff --git a/Gitea/.env.example b/Gitea/.env.example index 0a1bb8d..67ea3d8 100644 --- a/Gitea/.env.example +++ b/Gitea/.env.example @@ -1,7 +1,10 @@ -# Specifiy the type of database server you are using so Gitea knows (leave default mysql for this docker compose setup) -GITEA_database_DB_TYPE="mysql" +# Docker image tag for gitea/gitea (e.g. "1.22.0" or "latest"); defaults to latest if unset +GITEA_VERSION="latest" -# Port that the database server allows connection between the app server and the database server (leave default 3306) +# Linux username on the host whose home directory is used for the data bind mount (/home//gitea/data) +GITEA_USERNAME="gitea" + +# Port that the database server allows connections on (leave default 3306) GITEA_database_HOST="3306" # Database name that the app server will create after connecting to the database server @@ -13,11 +16,11 @@ GITEA_database_USER="gitea" # Password for the database username that the app server will use to connect to the database server GITEA_database_PASSWD="changeme" +# Password for the root user on the database server; set it to something strong, you won't need it regularly +GITEA_database_ROOT_PASSWD="changeme" + # Main interface port for accessing the application -GITEA_PORT="8000" +GITEA_PORT="3000" -# SSH port you can expose for some applciations to connect instead of HTTPS -SSH_PORT="2222" - -# Password for the Root user on the database server. You won't have to use this so just set it to something strong -GITEA_database_ROOT_PASSWD="changeme" \ No newline at end of file +# SSH port exposed for Git over SSH connections +GITEA_SSH_PORT="2222" \ No newline at end of file diff --git a/Gitea/docker-compose.yaml b/Gitea/docker-compose.yaml index 21c6535..ee796ae 100644 --- a/Gitea/docker-compose.yaml +++ b/Gitea/docker-compose.yaml @@ -1,36 +1,56 @@ services: app: - image: gitea/gitea:latest + image: gitea/gitea:${GITEA_VERSION:-latest} + container_name: gitea-app environment: - - GITEA__database__DB_TYPE=${GITEA_database_DB_TYPE} - - GITEA__database__HOST=db:${GITEA_database_HOST} - - GITEA__database__NAME=${GITEA_database_NAME} - - GITEA__database__USER=${GITEA_database_USER} - - GITEA__database__PASSWD=${GITEA_database_PASSWD} - restart: unless-stopped + - GITEA__database__DB_TYPE=mysql + - GITEA__database__HOST=db:${GITEA_database_HOST:-3306} + - GITEA__database__NAME=${GITEA_database_NAME:-gitea} + - GITEA__database__USER=${GITEA_database_USER:-gitea} + - GITEA__database__PASSWD=${GITEA_database_PASSWD:-changeme} volumes: - - app_data:/data + - /home/${GITEA_USERNAME:-gitea}/gitea/data:/data - /etc/timezone:/etc/timezone:ro - /etc/localtime:/etc/localtime:ro ports: - - ${GITEA_PORT}:3000 - - ${SSH_PORT}:2222 + - ${GITEA_PORT:-3000}:3000 + - ${GITEA_SSH_PORT:-2222}:2222 depends_on: - - db + db: + condition: service_healthy + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:3000/api/healthz"] + interval: 30s + timeout: 10s + retries: 3 + start_period: 40s + deploy: + resources: + limits: + memory: 512m + restart: unless-stopped db: image: docker.io/library/mysql:8 - restart: unless-stopped + container_name: gitea-db environment: - - MYSQL_ROOT_PASSWORD=${GITEA_database_ROOT_PASSWD} - - MYSQL_USER=${GITEA_database_USER} - - MYSQL_PASSWORD=${GITEA_database_PASSWD} - - MYSQL_DATABASE=${GITEA_database_NAME} + - MYSQL_ROOT_PASSWORD=${GITEA_database_ROOT_PASSWD:-changeme} + - MYSQL_DATABASE=${GITEA_database_NAME:-gitea} + - MYSQL_USER=${GITEA_database_USER:-gitea} + - MYSQL_PASSWORD=${GITEA_database_PASSWD:-changeme} volumes: - - mysql_data:/var/lib/mysql + - gitea_db:/var/lib/mysql + healthcheck: + test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p${GITEA_database_ROOT_PASSWD:-changeme}"] + interval: 10s + timeout: 5s + retries: 5 + start_period: 30s + deploy: + resources: + limits: + memory: 512m + restart: unless-stopped volumes: - app_data: - external: false - mysql_data: - external: false \ No newline at end of file + gitea_db: \ No newline at end of file