[Unit] Description=Seafile Application Container After=seafile-db.service seafile-redis.service Requires=seafile-db.service seafile-redis.service [Container] ContainerName=seafile Image=docker.io/seafileltd/seafile-mc:13.0-latest Network=seafile.network # Publish internal port 80 to 127.0.0.1:18080 on the host PublishPort=127.0.0.1:18080:80 # Volume mapping for Seafile shared data Volume=/mnt/seafile-data/seafile-data:/shared # Database connection configuration (matches MariaDB setup) Environment=DB_HOST=seafile-mysql Environment=DB_PORT=3306 Environment=DB_USER=root Environment=DB_PASSWORD=example_db_root_password Environment=DB_ROOT_PASSWD=example_db_root_password # Mappings for SEAFILE_MYSQL_ prefixed variables for absolute safety across releases Environment=SEAFILE_MYSQL_DB_HOST=seafile-mysql Environment=SEAFILE_MYSQL_DB_PORT=3306 Environment=SEAFILE_MYSQL_DB_USER=root Environment=SEAFILE_MYSQL_DB_PASSWORD=example_db_root_password Environment=INIT_SEAFILE_MYSQL_ROOT_PASSWORD=example_db_root_password # Explicit database names (fixes the empty string default bug in bootstrap.py) Environment=SEAFILE_MYSQL_DB_CCNET_DB_NAME=ccnet_db Environment=SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=seafile_db Environment=SEAFILE_MYSQL_DB_SEAHUB_DB_NAME=seahub_db # Redis settings (accessible via container name 'seafile-redis') Environment=CACHE_PROVIDER=redis Environment=REDIS_HOST=seafile-redis Environment=REDIS_PORT=6379 Environment=REDIS_PASSWORD=example_redis_password # General Seafile settings Environment=SEAFILE_SERVER_HOSTNAME=seafile.example.com Environment=SEAFILE_SERVER_PROTOCOL=https Environment=TIME_ZONE=UTC Environment=JWT_PRIVATE_KEY=example_jwt_private_key # Admin settings (used for first run database & admin user creation) Environment=INIT_SEAFILE_ADMIN_EMAIL=admin@example.com Environment=INIT_SEAFILE_ADMIN_PASSWORD=example_admin_password [Service] Restart=always [Install] WantedBy=default.target