automa/nextcloud/compose.yaml
m1ngsama 3433516287 refactor: restructure as self-contained project dirs with interactive CLI
- Remove old services/, bin/, config.sh, Makefile, setup.sh
- Each Docker Compose project is now a top-level self-contained directory
  with compose.yaml + .env.example (project self-governance)
- Add automa CLI: interactive deploy, status, logs, stop, update, config
- Add install.sh for curl-pipe-bash quick start
- New projects from production: uptime-kuma, tailscale+derp, monitoring
  (prometheus+grafana+blackbox+node-exporter), filesuite (cloudreve+qbt),
  huajibot, dockge, notification-center
- Clean up existing projects: forgejo, minecraft, teamspeak, nextcloud
- Sanitize all .env.example files (no real secrets)
2026-04-15 09:54:23 +08:00

56 lines
1.5 KiB
YAML

services:
nextcloud:
image: nextcloud:stable-apache
container_name: nextcloud
depends_on:
- db
- redis
ports:
- "${NC_PORT:-8080}:80"
environment:
TZ: "${TZ:-Asia/Shanghai}"
NEXTCLOUD_ADMIN_USER: "${NC_ADMIN_USER:-admin}"
NEXTCLOUD_ADMIN_PASSWORD: "${NC_ADMIN_PASSWORD}"
NEXTCLOUD_TRUSTED_DOMAINS: "${NC_TRUSTED_DOMAINS:-localhost}"
MYSQL_HOST: db
MYSQL_DATABASE: "${MYSQL_DATABASE:-nextcloud}"
MYSQL_USER: "${MYSQL_USER:-nextcloud}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
REDIS_HOST: redis
REDIS_HOST_PASSWORD: "${REDIS_PASSWORD}"
volumes:
- nc-html:/var/www/html
- nc-data:/var/www/html/data
- nc-config:/var/www/html/config
- nc-apps:/var/www/html/custom_apps
restart: unless-stopped
db:
image: mariadb:11
container_name: nextcloud-db
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb_read_only_compressed=OFF
environment:
TZ: "${TZ:-Asia/Shanghai}"
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
MYSQL_DATABASE: "${MYSQL_DATABASE:-nextcloud}"
MYSQL_USER: "${MYSQL_USER:-nextcloud}"
MYSQL_PASSWORD: "${MYSQL_PASSWORD}"
volumes:
- nc-db:/var/lib/mysql
restart: unless-stopped
redis:
image: redis:7-alpine
container_name: nextcloud-redis
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
volumes:
- nc-redis:/data
restart: unless-stopped
volumes:
nc-html:
nc-data:
nc-config:
nc-apps:
nc-db:
nc-redis: