67 lines
2.3 KiB
YAML
67 lines
2.3 KiB
YAML
version: "3.8"
|
|
|
|
services:
|
|
db:
|
|
image: mariadb:10.11
|
|
restart: unless-stopped
|
|
environment:
|
|
# --- CHANGE THESE SECRETS ---
|
|
MYSQL_ROOT_PASSWORD: your_very_strong_root_password
|
|
MYSQL_DATABASE: filerun
|
|
MYSQL_USER: filerun
|
|
MYSQL_PASSWORD: your_very_strong_filerun_password
|
|
# ----------------------------
|
|
volumes:
|
|
# Maps the 'db_data' folder on your host machine to the MariaDB data directory.
|
|
- ./db_data:/var/lib/mysql
|
|
networks:
|
|
- internal
|
|
|
|
filerun:
|
|
# Assuming this is the correct image for your architecture.
|
|
image: filerun/filerun:8.1.arm64v8
|
|
restart: unless-stopped
|
|
environment:
|
|
FR_DB_HOST: db
|
|
FR_DB_PORT: 3306
|
|
FR_DB_NAME: filerun
|
|
FR_DB_USER: filerun
|
|
# --- CHANGE THIS SECRET ---
|
|
FR_DB_PASS: your_very_strong_filerun_password
|
|
# --------------------------
|
|
APACHE_RUN_USER: www-data
|
|
APACHE_RUN_GROUP: www-data
|
|
volumes:
|
|
# Maps the 'filerun_html' folder on your host machine for the application files.
|
|
- ./filerun_html:/var/www/html
|
|
# Maps the 'user_data' folder on your host machine for actual user files.
|
|
- ./user_data:/user-files
|
|
networks:
|
|
- internal
|
|
- traefik_default # Connect to your existing Traefik network
|
|
depends_on:
|
|
- db
|
|
labels:
|
|
- "traefik.enable=true"
|
|
|
|
# HTTP → HTTPS redirect
|
|
- "traefik.http.routers.filerun-http.entrypoints=web"
|
|
- "traefik.http.routers.filerun-http.rule=Host(`filerun.rozic-dev.com`)"
|
|
- "traefik.http.routers.filerun-http.middlewares=redirect-to-https"
|
|
- "traefik.http.middlewares.redirect-to-https.redirectscheme.scheme=https"
|
|
|
|
# HTTPS router
|
|
- "traefik.http.routers.filerun-https.entrypoints=websecure"
|
|
- "traefik.http.routers.filerun-https.rule=Host(`filerun.rozic-dev.com`)"
|
|
- "traefik.http.routers.filerun-https.tls=true"
|
|
- "traefik.http.routers.filerun-https.tls.certresolver=letsencrypt"
|
|
- "traefik.http.routers.filerun-https.priority=100" # Optional: higher priority
|
|
|
|
# Service definition
|
|
- "traefik.http.services.filerun.loadbalancer.server.port=80"
|
|
|
|
networks:
|
|
internal:
|
|
driver: bridge
|
|
traefik_default:
|
|
external: true # This connects to your existing Traefik network |