server/seafile/compose.yml

135 lines
3.4 KiB
YAML

services:
caddy:
image: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
- "443:443/udp"
networks:
auth
caddy
volumes:
- config/Caddyfile:/etc/caddy/Caddyfile
- website/public:/srv/keegan
- fish:/srv/fish
- volumes/caddy/data:/data
- volumes/caddy/config:/config
mariadb:
image: mariadb:10.11
container_name: mariadb
env-file: "priv/env"
volumes:
- ./volumes/mariadb/db:/var/lib/mysql
- ./priv/init.sql:/script/init.sql
networks:
- gitea-net
- seafile-net
healthcheck:
test:
[
"CMD",
"/usr/local/bin/healthcheck.sh",
"--connect",
"--mariadbupgrade",
"--innodb_initialized",
]
interval: 20s
start_period: 30s
timeout: 5s
retries: 10
memcached:
image: memcached:1.6.29
container_name: seafile-memcached
entrypoint: memcached -m 256
networks:
- seafile-net
notification-server:
image: seafileltd/notification-server:12.0-latest
container_name: seafile-notification-server
restart: unless-stopped
volumes:
- volumes/seafile/noti:/shared
environment:
- SEAFILE_MYSQL_DB_HOST=${SEAFILE_MYSQL_DB_HOST:-db}
- SEAFILE_MYSQL_DB_USER=${SEAFILE_MYSQL_DB_USER:-seafile}
- SEAFILE_MYSQL_DB_PASSWORD=${SEAFILE_MYSQL_DB_PASSWORD:?Variable is not set or empty}
- SEAFILE_MYSQL_DB_CCNET_DB_NAME=${SEAFILE_MYSQL_DB_CCNET_DB_NAME:-ccnet_db}
- SEAFILE_MYSQL_DB_SEAFILE_DB_NAME=${SEAFILE_MYSQL_DB_SEAFILE_DB_NAME:-seafile_db}
- JWT_PRIVATE_KEY=${JWT_PRIVATE_KEY:?Variable is not set or empty}
- SEAFILE_LOG_TO_STDOUT=${SEAFILE_LOG_TO_STDOUT:-false}
- NOTIFICATION_SERVER_LOG_LEVEL=${NOTIFICATION_SERVER_LOG_LEVEL:-info}
labels:
caddy: ${SEAFILE_SERVER_PROTOCOL:-http}://${SEAFILE_SERVER_HOSTNAME:?Variable is not set or empty}
caddy.@ws.0_header: "Connection *Upgrade*"
caddy.@ws.1_header: "Upgrade websocket"
caddy.0_reverse_proxy: "@ws {{upstreams 8083}}"
caddy.1_handle_path: "/notification*"
caddy.1_handle_path.0_rewrite: "* {uri}"
caddy.1_handle_path.1_reverse_proxy: "{{upstreams 8083}}"
depends_on:
db:
condition: service_healthy
networks:
- seafile-net
seafile:
image: seafileltd/seafile-mc:12.0-latest
container_name: seafile
volumes:
- /opt/seafile-mysql:/shared
env-file: "priv/env"
environment:
- JWT_PRIVATE_KEY=${SEAFILE_JWT_PRIVATE_KEY}
depends_on:
db:
condition: service_healthy
memcached:
condition: service_started
networks:
- seafile-net
- caddy
gitea:
image: gitea/gitea:latest-rootless
restart: unless-stopped
env-file: "priv/env"
restart: always
networks:
- gitea
- caddy
volumes:
- ./volumes/gitea/data:/var/lib/gitea
- ./volumes/gitea/config:/etc/gitea
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
# allows ssh pushing via locally stored keys
- /home/git/.ssh:/data/git/.ssh
ports:
- "127.0.0.1:2222:22"
depends_on:
db:
condition: service_healthy
volumes:
gitea:
caddy_data:
caddy_config:
networks:
gitea-net:
external: false
seafile-net:
external: false
caddy:
external: false
driver: bridge
auth:
external: true
postgres:
external: false