Compare commits
16 Commits
c0332ef7ab
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| c5caafdaa6 | |||
| 542629d7b8 | |||
| e2748f4a95 | |||
| 6f7deae721 | |||
| 5219c94dc7 | |||
| ad299d08ac | |||
| e689c2863a | |||
| d396ad2f58 | |||
| 4525e75d35 | |||
| 1c42f2f3a4 | |||
| 954f782106 | |||
| fcc31444c5 | |||
| 4e299847f9 | |||
| 01dbad3176 | |||
| 19074f1338 | |||
| f94719dd06 |
28
Discourse/.env.example
Normal file
28
Discourse/.env.example
Normal file
@@ -0,0 +1,28 @@
|
||||
# ============================================================
|
||||
# Discourse - Environment Variables
|
||||
# Copy this file to .env and fill in all values before starting
|
||||
# ============================================================
|
||||
|
||||
# --- Site Settings ---
|
||||
DISCOURSE_HOST=forum.yourdomain.com # Public hostname — no http:// prefix
|
||||
DISCOURSE_SITE_NAME=My Community Forum
|
||||
|
||||
# --- Admin Account (used on first run only) ---
|
||||
DISCOURSE_ADMIN_USERNAME=admin
|
||||
DISCOURSE_ADMIN_PASSWORD=changeme # Min 10 characters
|
||||
DISCOURSE_ADMIN_EMAIL=admin@yourdomain.com
|
||||
|
||||
# --- PostgreSQL ---
|
||||
POSTGRES_ROOT_PASSWORD=changeme_root # Superuser (postgres) password
|
||||
DISCOURSE_DB_NAME=bitnami_discourse
|
||||
DISCOURSE_DB_USER=bn_discourse
|
||||
DISCOURSE_DB_PASSWORD=changeme_db
|
||||
|
||||
# --- Redis ---
|
||||
REDIS_PASSWORD=changeme_redis
|
||||
|
||||
# --- SMTP (Microsoft 365 / Outlook Business) ---
|
||||
# Use an app password if MFA is enabled on the sending account
|
||||
SMTP_USERNAME=noreply@yourdomain.com
|
||||
SMTP_PASSWORD=your_app_password_here
|
||||
SMTP_FROM_ADDRESS=noreply@yourdomain.com
|
||||
145
Discourse/docker-compose.yaml
Normal file
145
Discourse/docker-compose.yaml
Normal file
@@ -0,0 +1,145 @@
|
||||
services:
|
||||
|
||||
postgresql:
|
||||
image: bitnami/postgresql:15
|
||||
container_name: discourse_postgres
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- postgres_data:/bitnami/postgresql
|
||||
environment:
|
||||
- POSTGRESQL_POSTGRES_PASSWORD=${POSTGRES_ROOT_PASSWORD}
|
||||
- POSTGRESQL_USERNAME=${DISCOURSE_DB_USER}
|
||||
- POSTGRESQL_PASSWORD=${DISCOURSE_DB_PASSWORD}
|
||||
- POSTGRESQL_DATABASE=${DISCOURSE_DB_NAME}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U ${DISCOURSE_DB_USER} -d ${DISCOURSE_DB_NAME}"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 30s
|
||||
networks:
|
||||
- discourse_internal
|
||||
|
||||
redis:
|
||||
image: bitnami/redis:7.2
|
||||
container_name: discourse_redis
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
- redis_data:/bitnami/redis/data
|
||||
environment:
|
||||
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
- REDIS_DISABLE_COMMANDS=FLUSHDB,FLUSHALL
|
||||
healthcheck:
|
||||
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 15s
|
||||
networks:
|
||||
- discourse_internal
|
||||
|
||||
discourse:
|
||||
image: bitnami/discourse:3
|
||||
container_name: discourse_app
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
postgresql:
|
||||
condition: service_healthy
|
||||
redis:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- discourse_data:/bitnami/discourse
|
||||
environment:
|
||||
# --- Site ---
|
||||
- DISCOURSE_HOST=${DISCOURSE_HOST}
|
||||
- DISCOURSE_SITE_NAME=${DISCOURSE_SITE_NAME}
|
||||
- DISCOURSE_HTTPS=false # SSL is handled by Nginx Proxy Manager
|
||||
|
||||
# --- Admin account (first-run only) ---
|
||||
- DISCOURSE_USERNAME=${DISCOURSE_ADMIN_USERNAME}
|
||||
- DISCOURSE_PASSWORD=${DISCOURSE_ADMIN_PASSWORD}
|
||||
- DISCOURSE_EMAIL=${DISCOURSE_ADMIN_EMAIL}
|
||||
|
||||
# --- Database ---
|
||||
- DISCOURSE_DATABASE_HOST=postgresql
|
||||
- DISCOURSE_DATABASE_PORT_NUMBER=5432
|
||||
- DISCOURSE_DATABASE_NAME=${DISCOURSE_DB_NAME}
|
||||
- DISCOURSE_DATABASE_USER=${DISCOURSE_DB_USER}
|
||||
- DISCOURSE_DATABASE_PASSWORD=${DISCOURSE_DB_PASSWORD}
|
||||
- POSTGRESQL_CLIENT_DATABASE_HOST=postgresql
|
||||
- POSTGRESQL_CLIENT_DATABASE_PORT_NUMBER=5432
|
||||
- POSTGRESQL_CLIENT_POSTGRES_USER=postgres
|
||||
- POSTGRESQL_CLIENT_POSTGRES_PASSWORD=${POSTGRES_ROOT_PASSWORD}
|
||||
- POSTGRESQL_CLIENT_CREATE_DATABASE_NAME=${DISCOURSE_DB_NAME}
|
||||
- POSTGRESQL_CLIENT_CREATE_DATABASE_USERNAME=${DISCOURSE_DB_USER}
|
||||
- POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD=${DISCOURSE_DB_PASSWORD}
|
||||
|
||||
# --- Redis ---
|
||||
- DISCOURSE_REDIS_HOST=redis
|
||||
- DISCOURSE_REDIS_PORT_NUMBER=6379
|
||||
- DISCOURSE_REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
|
||||
# --- SMTP (Microsoft 365 / Outlook Business) ---
|
||||
- DISCOURSE_SMTP_HOST=smtp.office365.com
|
||||
- DISCOURSE_SMTP_PORT=587
|
||||
- DISCOURSE_SMTP_USER=${SMTP_USERNAME}
|
||||
- DISCOURSE_SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||
- DISCOURSE_SMTP_PROTOCOL=tls
|
||||
- DISCOURSE_SMTP_AUTH=login
|
||||
- DISCOURSE_NOTIFICATION_EMAIL=${SMTP_FROM_ADDRESS}
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:3000/ || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 15s
|
||||
retries: 5
|
||||
start_period: 120s
|
||||
networks:
|
||||
- discourse_internal
|
||||
- proxy
|
||||
# No ports exposed to host — Nginx Proxy Manager connects via the proxy network
|
||||
|
||||
sidekiq:
|
||||
image: bitnami/discourse:3
|
||||
container_name: discourse_sidekiq
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
discourse:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- discourse_data:/bitnami/discourse
|
||||
command: /opt/bitnami/scripts/discourse-sidekiq/run.sh
|
||||
environment:
|
||||
# Inherit the same config as the main app
|
||||
- DISCOURSE_HOST=${DISCOURSE_HOST}
|
||||
- DISCOURSE_DATABASE_HOST=postgresql
|
||||
- DISCOURSE_DATABASE_PORT_NUMBER=5432
|
||||
- DISCOURSE_DATABASE_NAME=${DISCOURSE_DB_NAME}
|
||||
- DISCOURSE_DATABASE_USER=${DISCOURSE_DB_USER}
|
||||
- DISCOURSE_DATABASE_PASSWORD=${DISCOURSE_DB_PASSWORD}
|
||||
- DISCOURSE_REDIS_HOST=redis
|
||||
- DISCOURSE_REDIS_PORT_NUMBER=6379
|
||||
- DISCOURSE_REDIS_PASSWORD=${REDIS_PASSWORD}
|
||||
- DISCOURSE_SMTP_HOST=smtp.office365.com
|
||||
- DISCOURSE_SMTP_PORT=587
|
||||
- DISCOURSE_SMTP_USER=${SMTP_USERNAME}
|
||||
- DISCOURSE_SMTP_PASSWORD=${SMTP_PASSWORD}
|
||||
- DISCOURSE_SMTP_PROTOCOL=tls
|
||||
- DISCOURSE_SMTP_AUTH=login
|
||||
- DISCOURSE_NOTIFICATION_EMAIL=${SMTP_FROM_ADDRESS}
|
||||
networks:
|
||||
- discourse_internal
|
||||
|
||||
volumes:
|
||||
postgres_data:
|
||||
driver: local
|
||||
redis_data:
|
||||
driver: local
|
||||
discourse_data:
|
||||
driver: local
|
||||
|
||||
networks:
|
||||
discourse_internal:
|
||||
driver: bridge
|
||||
internal: true # Postgres and Redis are not reachable from outside the stack
|
||||
proxy:
|
||||
external: true # Must match the network name used by your NPM stack
|
||||
@@ -1,9 +1,10 @@
|
||||
services:
|
||||
app:
|
||||
doku:
|
||||
image: amerkurev/doku:latest
|
||||
container_name: doku
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro \
|
||||
- /:/hostroot:ro \
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- /:/hostroot:ro
|
||||
ports:
|
||||
- ${DOKU_PORT}:9090
|
||||
restart: unless-stopped
|
||||
@@ -1,2 +1,6 @@
|
||||
# Main interface port for accessing the application
|
||||
DRAWIO_PORT="8000"
|
||||
|
||||
# Enable local PDF/image export without relying on an external service
|
||||
# Set to 1 to enable, 0 or omit to disable
|
||||
DRAWIO_SELF_CONTAINED="0"
|
||||
|
||||
@@ -1,6 +1,15 @@
|
||||
services:
|
||||
app:
|
||||
drawio:
|
||||
image: jgraph/drawio:latest
|
||||
container_name: drawio
|
||||
ports:
|
||||
- ${DRAWIO_PORT}:8080
|
||||
environment:
|
||||
- DRAWIO_SELF_CONTAINED=${DRAWIO_SELF_CONTAINED:-0}
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "curl -f http://localhost:8080/ || exit 1"]
|
||||
interval: 30s
|
||||
timeout: 10s
|
||||
retries: 3
|
||||
start_period: 30s
|
||||
|
||||
65
README.md
65
README.md
@@ -1,3 +1,64 @@
|
||||
# Docker-Compose
|
||||
# CHNS Docker Compose Library
|
||||
|
||||
Location where I publish all Docker Compose files to be used for deployment on Portainer or accessed by the public.
|
||||
A public collection of Docker Compose files I use across my homelab and self-hosted infrastructure. Rather than managing configs directly on each server, I keep everything version-controlled here and pull them into [Portainer](https://www.portainer.io/) for deployment.
|
||||
|
||||
Feel free to use any of these as a starting point for your own setup. Each application folder also has a companion article linked below where I walk through the full configuration and deployment process.
|
||||
|
||||
---
|
||||
|
||||
## Applications
|
||||
|
||||
| Application | Description | Walkthrough |
|
||||
|-------------|-------------|-------------|
|
||||
| [Doku](./Doku/docker-compose.yaml) | Docker volume backup and management tool | [Read the article](https://chns.tech/posts/2024/02-18-doku-docker-disk-usage-dashboard/) |
|
||||
| [Draw.io](./Draw.io/docker-compose.yaml) | Self-hosted diagramming and flowchart tool | [Read the article](https://chns.tech/posts/2024/10-20-draw-io-whiteboarding-diagramming-web-application/) |
|
||||
| [Gitea](./Gitea/docker-compose.yaml) | Lightweight self-hosted Git service | [Read the article](#) |
|
||||
| [IT-Tools](./IT-Tools/docker-compose.yaml) | Collection of handy tools for developers and sysadmins | [Read the article](https://chns.tech/posts/2023/10-22-it-tools-handy-tools-for-developers/) |
|
||||
| [Seerr](./Seerr/docker-compose.yaml) / [NFS](./Seerr/docker-compose-nfs.yaml) | Media request management tool for self-hosted media servers | [Read the article](#) |
|
||||
| [Watchtower](./Watchtower/docker-compose.yaml) | Automatically keeps Docker container images up to date | [Read the article](https://chns.tech/posts/2024/07-14-watchtower-automatic-docker-container-updater/) |
|
||||
|
||||
---
|
||||
|
||||
## Usage
|
||||
|
||||
Each application lives in its own folder with a `docker-compose.yaml` file. You can use them in a few ways:
|
||||
|
||||
**Portainer Stack**
|
||||
1. In Portainer, go to **Stacks → Add Stack**
|
||||
2. Choose **Repository** and point it at this repo, or use **Web editor** and paste the compose file contents directly
|
||||
3. Set any required environment variables and deploy
|
||||
|
||||
**Docker Compose CLI**
|
||||
```bash
|
||||
cd <AppName>
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
> Make sure to review each compose file for environment variables, volume paths, or other values you may need to adjust for your environment before deploying.
|
||||
|
||||
---
|
||||
|
||||
## Repository Structure
|
||||
|
||||
```
|
||||
Docker-Compose/
|
||||
├── Doku/
|
||||
│ └── docker-compose.yaml
|
||||
├── Draw.io/
|
||||
│ └── docker-compose.yaml
|
||||
├── Gitea/
|
||||
│ └── docker-compose.yaml
|
||||
├── IT-Tools/
|
||||
│ └── docker-compose.yaml
|
||||
├── Seerr/
|
||||
│ ├── docker-compose.yaml
|
||||
│ └── docker-compose-nfs.yaml
|
||||
└── Watchtower/
|
||||
└── docker-compose.yaml
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## License
|
||||
|
||||
[MIT](./LICENSE)
|
||||
|
||||
5
Seerr/.env.example
Normal file
5
Seerr/.env.example
Normal file
@@ -0,0 +1,5 @@
|
||||
# Time Zone where the application is operating
|
||||
SEERR_TZ="America/Los_Angeles"
|
||||
|
||||
# Main interface port for accessing the application
|
||||
SEERR_PORT="8055"
|
||||
17
Seerr/docker-compose-nfs.yaml
Normal file
17
Seerr/docker-compose-nfs.yaml
Normal file
@@ -0,0 +1,17 @@
|
||||
services:
|
||||
app:
|
||||
image: seerr/seerr:latest
|
||||
init: true
|
||||
environment:
|
||||
- LOG_LEVEL=debug
|
||||
- TZ=${SEERR_TZ}
|
||||
- PORT=5055
|
||||
ports:
|
||||
- ${SEERR_PORT}:5055
|
||||
volumes:
|
||||
- seerr:/app/config
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
seerr:
|
||||
external: true
|
||||
13
Seerr/docker-compose.yaml
Normal file
13
Seerr/docker-compose.yaml
Normal file
@@ -0,0 +1,13 @@
|
||||
services:
|
||||
app:
|
||||
image: seerr/seerr:latest
|
||||
init: true
|
||||
environment:
|
||||
- LOG_LEVEL=debug
|
||||
- TZ=${SEERR_TZ}
|
||||
- PORT=5055
|
||||
ports:
|
||||
- ${SEERR_PORT}:5055
|
||||
volumes:
|
||||
- /home/${username}/config/seerr:/app/config
|
||||
restart: unless-stopped
|
||||
47
Unifi-Network-Application/docker-compose-nfs.yaml
Normal file
47
Unifi-Network-Application/docker-compose-nfs.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
services:
|
||||
app:
|
||||
container_name: unifi-network-application
|
||||
image: lscr.io/linuxserver/unifi-network-application:latest
|
||||
environment:
|
||||
- PUID=${UNA_PUID}
|
||||
- PGID=${UNA_PGID}
|
||||
- TZ=${UNA_TZ}
|
||||
- MONGO_USER=unifi-admin
|
||||
- MONGO_PASS=${MONGO_PASSWORD}
|
||||
- MONGO_HOST=unifi-db
|
||||
- MONGO_PORT=27017
|
||||
- MONGO_DBNAME=unifi
|
||||
- MEM_LIMIT=1024 #optional
|
||||
- MEM_STARTUP=1024 #optional
|
||||
- MONGO_TLS= #optional
|
||||
- MONGO_AUTHSOURCE= #optional
|
||||
ports:
|
||||
- 8443:8443
|
||||
- 3478:3478/udp
|
||||
- 10001:10001/udp
|
||||
- 8080:8080
|
||||
- 1900:1900/udp #optional
|
||||
- 8843:8843 #optional
|
||||
- 8880:8880 #optional
|
||||
- 6789:6789 #optional
|
||||
- 5514:5514/udp #optional
|
||||
volumes:
|
||||
- unifi-network-application:/config
|
||||
depends_on:
|
||||
- unifi-db
|
||||
restart: unless-stopped
|
||||
|
||||
unifi-db:
|
||||
container_name: unifi-network-application-db
|
||||
image: docker.io/mongo:4.4
|
||||
volumes:
|
||||
- unifi-network-application-db:/data/db
|
||||
- unifi-network-application-db:/data/configdb
|
||||
- /home/dockersa/unifi-network-application-db/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
|
||||
restart: unless-stopped
|
||||
|
||||
volumes:
|
||||
unifi-network-application:
|
||||
external: true
|
||||
unifi-network-application-db:
|
||||
external: true
|
||||
@@ -4,15 +4,15 @@ services:
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
environment:
|
||||
- TZ=${WATCHTOWER_TZ}
|
||||
- WATCHTOWER_CLEANUP=true # Remove old images after updating
|
||||
- WATCHTOWER_REMOVE_VOLUMES=false # Remove attached volumes after updating
|
||||
- DOCKER_API_VERSION=1.45 # SSH docker version 1.41 for Docker engine version 20.10 - 1.43 for Docker engine version 24 - 1.45 for Docker engine version 26.1
|
||||
- WATCHTOWER_INCLUDE_RESTARTING=true # Restart containers after update
|
||||
- WATCHTOWER_INCLUDE_STOPPED=false # Update stopped containers
|
||||
- WATCHTOWER_SCHEDULE="0 0 */2 * * *" # Update & Scan containers every 2 hours
|
||||
- WATCHTOWER_LABEL_ENABLE=false
|
||||
- WATCHTOWER_ROLLING_RESTART=true
|
||||
- WATCHTOWER_TIMEOUT=30s
|
||||
- WATCHTOWER_LOG_FORMAT=pretty
|
||||
TZ: ${WATCHTOWER_TZ}
|
||||
WATCHTOWER_CLEANUP: true # Remove old images after updating
|
||||
WATCHTOWER_REMOVE_VOLUMES: false # Remove attached volumes after updating
|
||||
DOCKER_API_VERSION: 1.45 # SSH docker version 1.41 for Docker engine version 20.10 - 1.43 for Docker engine version 24 - 1.45 for Docker engine version 26.1
|
||||
WATCHTOWER_INCLUDE_RESTARTING: true # Restart containers after update
|
||||
WATCHTOWER_INCLUDE_STOPPED: false # Update stopped containers
|
||||
WATCHTOWER_SCHEDULE: "0 0 */2 * * *" # Update & Scan containers every 2 hours
|
||||
WATCHTOWER_LABEL_ENABLE: false
|
||||
WATCHTOWER_ROLLING_RESTART: true
|
||||
WATCHTOWER_TIMEOUT: 30s
|
||||
WATCHTOWER_LOG_FORMAT: pretty
|
||||
restart: unless-stopped
|
||||
Reference in New Issue
Block a user