From 1fdbe3183d5b7f0143c7b022cac32b114b279bf1 Mon Sep 17 00:00:00 2001 From: BeauTroll <-> Date: Thu, 8 Jan 2026 11:47:53 +0100 Subject: [PATCH] volumes inside local directory --- .env.example | 9 --------- .gitignore | 2 ++ docker-compose.yml | 26 +++++++++++++------------- 3 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.env.example b/.env.example index 2b4c332..e299387 100644 --- a/.env.example +++ b/.env.example @@ -3,10 +3,6 @@ MYSQL_ROOT_PASSWORD=changeme_secure_password MYSQL_LOG_CONSOLE=true MARIADB_AUTO_UPGRADE=1 -# Database Configuration for Seafile -DB_HOST=db -DB_ROOT_PASSWD=changeme_secure_password - # Time Zone Configuration TIME_ZONE=Etc/UTC @@ -14,9 +10,4 @@ TIME_ZONE=Etc/UTC SEAFILE_ADMIN_EMAIL=admin@example.com SEAFILE_ADMIN_PASSWORD=changeme_admin_password -# HTTPS/SSL Configuration -SEAFILE_SERVER_LETSENCRYPT=false SEAFILE_SERVER_HOSTNAME=seafile.example.com - -# Memcached Configuration -MEMCACHED_MEMORY=256 diff --git a/.gitignore b/.gitignore index 4c49bd7..5f561a8 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,3 @@ .env +db/ +data/ diff --git a/docker-compose.yml b/docker-compose.yml index a3d524e..7970037 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,18 +3,18 @@ services: image: mariadb:10.11 container_name: seafile-mysql environment: - - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} # Required, set the root's password of MySQL service. + - MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD} # Required, set the root's password of MySQL service. - MYSQL_LOG_CONSOLE=${MYSQL_LOG_CONSOLE} - MARIADB_AUTO_UPGRADE=${MARIADB_AUTO_UPGRADE} volumes: - - /opt/seafile-mysql/db:/var/lib/mysql # Required, specifies the path to MySQL data persistent store. + - ./db:/var/lib/mysql # Required, specifies the path to MySQL data persistent store. networks: - seafile-net memcached: image: memcached:1.6.18 container_name: seafile-memcached - entrypoint: memcached -m ${MEMCACHED_MEMORY} + entrypoint: memcached -m 256 networks: - seafile-net @@ -22,19 +22,19 @@ services: image: seafileltd/seafile-mc:11.0-latest container_name: seafile volumes: - - /opt/seafile-data:/shared # Required, specifies the path to Seafile data persistent store. + - ./data:/shared # Required, specifies the path to Seafile data persistent store. environment: - - DB_HOST=${DB_HOST} - - DB_ROOT_PASSWD=${DB_ROOT_PASSWD} # Required, the value should be root's password of MySQL service. - - TIME_ZONE=${TIME_ZONE} # Optional, default is UTC. Should be uncomment and set to your local time zone. + - DB_HOST=db + - DB_ROOT_PASSWD=${MYSQL_ROOT_PASSWD} # Required, the value should be root's password of MySQL service. + - TIME_ZONE=Europe/Paris - SEAFILE_ADMIN_EMAIL=${SEAFILE_ADMIN_EMAIL} # Specifies Seafile admin user, default is 'me@example.com'. - - SEAFILE_ADMIN_PASSWORD=${SEAFILE_ADMIN_PASSWORD} # Specifies Seafile admin password, default is 'asecret'. - - SEAFILE_SERVER_LETSENCRYPT=${SEAFILE_SERVER_LETSENCRYPT} # Whether to use https or not. + - SEAFILE_ADMIN_PASSWORD=${SEAFILE_ADMIN_PASSWORD} # Specifies Seafile admin password, default is 'asecret'. + - SEAFILE_SERVER_LETSENCRYPT=false - SEAFILE_SERVER_HOSTNAME=${SEAFILE_SERVER_HOSTNAME} # Specifies your host name if https is enabled. - - SEAFILE_SERVER_PROTOCOL=https # Protocol used to access Seafile (http or https) - - SERVICE_URL=https://${SEAFILE_SERVER_HOSTNAME} # Full URL to access Seafile - - FILE_SERVER_ROOT=https://${SEAFILE_SERVER_HOSTNAME}/seafhttp # URL for file server - - FORCE_HTTPS_IN_CONF=true # Force HTTPS in all Seafile configuration files + - SEAFILE_SERVER_PROTOCOL=https # Protocol used to access Seafile (http or https) + - SERVICE_URL=https://${SEAFILE_SERVER_HOSTNAME} # Full URL to access Seafile + - FILE_SERVER_ROOT=https://${SEAFILE_SERVER_HOSTNAME}/seafhttp # URL for file server + - FORCE_HTTPS_IN_CONF=true # Force HTTPS in all Seafile configuration files labels: - "traefik.enable=true" - "traefik.http.routers.seafile.rule=Host(`${SEAFILE_SERVER_HOSTNAME}`)"