From 3e101ee140e868fe2495490697904bea4ad27479 Mon Sep 17 00:00:00 2001 From: fghwett <1058178245@qq.com> Date: Fri, 27 May 2022 10:48:37 +0800 Subject: [PATCH] add test compose --- .gitignore | 1 + Test/aria2Pro/docker-compose.yml | 18 ++++ Test/baota/docker-compose.yml | 16 +++ Test/beancount-gs/docker-compose.yml | 15 +++ Test/bitwarden/docker-compose.yml | 47 +++++++++ Test/fishstash/docker-compose.yml | 19 ++++ Test/mysql/docker-compose.yml | 14 +++ Test/nextcloud/docker-compose.yml | 29 ++++++ Test/photoprism/docker-compose.yml | 145 +++++++++++++++++++++++++++ Test/rocket.chat/docker-compose.yml | 81 +++++++++++++++ 10 files changed, 385 insertions(+) create mode 100644 .gitignore create mode 100644 Test/aria2Pro/docker-compose.yml create mode 100644 Test/baota/docker-compose.yml create mode 100644 Test/beancount-gs/docker-compose.yml create mode 100644 Test/bitwarden/docker-compose.yml create mode 100644 Test/fishstash/docker-compose.yml create mode 100644 Test/mysql/docker-compose.yml create mode 100644 Test/nextcloud/docker-compose.yml create mode 100644 Test/photoprism/docker-compose.yml create mode 100644 Test/rocket.chat/docker-compose.yml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..bda32ed --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +_tmp/ \ No newline at end of file diff --git a/Test/aria2Pro/docker-compose.yml b/Test/aria2Pro/docker-compose.yml new file mode 100644 index 0000000..62c5649 --- /dev/null +++ b/Test/aria2Pro/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3' + +services: + aria2: + image: p3terx/aria2-pro + logging: + options: + max-size: 1m + ports: + - 6800:6800 + - 6888:6888 + - 6888:6888/udp + environment: + - RPC_SECRET=12346789 + volumes: + - ./data/aria2/config:/config + - ./data/temp/downloads:/downloads + restart: unless-stopped diff --git a/Test/baota/docker-compose.yml b/Test/baota/docker-compose.yml new file mode 100644 index 0000000..5d5480a --- /dev/null +++ b/Test/baota/docker-compose.yml @@ -0,0 +1,16 @@ +version: '3.3' +services: + baota: + restart: unless-stopped + container_name: baota + ports: + - '8888:8888' + # - '22:22' + # - '443:443' + - '85:80' + - '888:888' + volumes: + - './data/website_data:/www/wwwroot' + - './data/mysql_data:/www/server/data' + - './data/vhost:/www/server/panel/vhost' + image: 'btpanel/baota:lnmp' diff --git a/Test/beancount-gs/docker-compose.yml b/Test/beancount-gs/docker-compose.yml new file mode 100644 index 0000000..2a24bd6 --- /dev/null +++ b/Test/beancount-gs/docker-compose.yml @@ -0,0 +1,15 @@ +version: "3.9" +services: + app: + container_name: beancount-gs + image: xdbin/beancount-gs:latest + ports: + - "10000:80" + # volumes 挂载目录会导 /app/public/icons 中的图标被覆盖,这里将默认图标在挂载后重新拷贝图标 + command: > + sh -c "cp -rn /app/public/default_icons/* /app/public/icons && ./beancount-gs -p 80" + volumes: + - "${dataPath:-/data/beancount}:${dataPath:-/data/beancount}" + - "${dataPath:-/data/beancount}/icons:/app/public/icons" + - "${dataPath:-/data/beancount}/config:/app/config" + - "${dataPath:-/data/beancount}/bak:/app/bak" \ No newline at end of file diff --git a/Test/bitwarden/docker-compose.yml b/Test/bitwarden/docker-compose.yml new file mode 100644 index 0000000..3d163c6 --- /dev/null +++ b/Test/bitwarden/docker-compose.yml @@ -0,0 +1,47 @@ +# https://github.com/dani-garcia/vaultwarden/wiki +version: '3' + +services: + vaultwarden: + image: vaultwarden/server:latest + container_name: vaultwarden + restart: unless-stopped + environment: + WEBSOCKET_PORT: 3012 + WEBSOCKET_ENABLED: 'true' # Enable WebSocket notifications. + SIGNUPS_ALLOWED: 'false' + INVITATIONS_ALLOWED: 'false' + # SIGNUPS_DOMAINS_WHITELIST: example.com,example.net,example.org # If SIGNUPS_DOMAINS_WHITELIST is set, then the value of SIGNUPS_ALLOWED is ignored. + # ADMIN_TOKEN: some_random_token_as_per_above_explanation # /admin config.json的值优先于环境变量 + # DISABLE_ADMIN_TOKEN: true # 禁用token之后 任何人都可以访问/admin页面 + # DOMAIN: https://vw.domain.ltd:445 # U2F FIDO2 WebAuthn 需要设置域名和证书 + # YUBICO_CLIENT_ID: 123456 + # YUBICO_SECRET_KEY: ABCDEABCDEABCDEABCDE= + # DATA_FOLDER: /data # 更改默认数据路径 + # DATABASE_URL: /database/vaultwarden.sqlite3 # 更改数据库的默认位置 $DATA_FOLDER/db.sqlite3 + # ATTACHMENTS_FOLDER: /attachments # 更改附件的默认位置 $DATA_FOLDER/attachments + # ICON_CACHE_FOLDER: /icon_cache # 更改icon的默认位置 $DATA_FOLDER/icon_cache + # ROCKET_LIMITS: {json=10485760} # 默认API请求限制10MB + # ROCKET_WORKERS: 20 + # SMTP_HOST: 'smtp.163.com' + # SMTP_FROM: 'test@163.com' + # SMTP_PORT: '465' + # SMTP_SSL: 'true' + # SMTP_USERNAME: 'test@163.com' + # SMTP_PASSWORD: 'password' + # SMTP_EXPLICIT_TLS: 'true' + SHOW_PASSWORD_HINT: 'false' # 密码提示显示 + WEB_VAULT_ENABLED: 'false' # 禁用网页的静态页面 + # WEB_VAULT_FOLDER: /web-vault # 静态页的默认位置 + LOG_FILE: /data/vaultwarden.log # 日志文件 + LOG_LEVEL: warn # 日志等级 "trace", "debug", "info", "warn", "error" or "off". + EXTENDED_LOGING: 'true' + ports: + - 3011:80 + - 3012:3012 + volumes: + - ./data/:/data/ + # - ./vw-database/:/database/ + # - /vw-attachments/:/attachments/ + # - /icon_cache/:/icon_cache/ + # - /vw-web-vault/:/web-vault/ \ No newline at end of file diff --git a/Test/fishstash/docker-compose.yml b/Test/fishstash/docker-compose.yml new file mode 100644 index 0000000..88bc49d --- /dev/null +++ b/Test/fishstash/docker-compose.yml @@ -0,0 +1,19 @@ +version: '2' +services: + app: + container_name: filestash + image: machines/filestash + restart: unless-stopped + environment: + - APPLICATION_URL= + - GDRIVE_CLIENT_ID= + - GDRIVE_CLIENT_SECRET= + - DROPBOX_CLIENT_ID= + - ONLYOFFICE_URL=http://onlyoffice + ports: + - "8334:8334" + + onlyoffice: + container_name: filestash_oods + image: onlyoffice/documentserver + restart: unless-stopped diff --git a/Test/mysql/docker-compose.yml b/Test/mysql/docker-compose.yml new file mode 100644 index 0000000..6ab98f7 --- /dev/null +++ b/Test/mysql/docker-compose.yml @@ -0,0 +1,14 @@ +version: "3" +services: + mysql: + container_name: "mysql" + restart: unless-stopped + volumes: + - .\data\conf:/etc/mysql + - .\data\logs:/var/log/mysql + - .\data\data:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=admin + ports: + - 3307:3306 + image: mysql:5.7 \ No newline at end of file diff --git a/Test/nextcloud/docker-compose.yml b/Test/nextcloud/docker-compose.yml new file mode 100644 index 0000000..c3deb99 --- /dev/null +++ b/Test/nextcloud/docker-compose.yml @@ -0,0 +1,29 @@ +version: '2' + +services: + db: + image: mariadb + restart: unless-stopped + command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW + volumes: + - .\data\db:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=root_password + - MYSQL_PASSWORD=password + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + + app: + image: nextcloud + restart: unless-stopped + ports: + - 8999:80 + links: + - db + volumes: + - .\data\nextcloud:/var/www/html + environment: + - MYSQL_PASSWORD=password + - MYSQL_DATABASE=nextcloud + - MYSQL_USER=nextcloud + - MYSQL_HOST=db \ No newline at end of file diff --git a/Test/photoprism/docker-compose.yml b/Test/photoprism/docker-compose.yml new file mode 100644 index 0000000..659051d --- /dev/null +++ b/Test/photoprism/docker-compose.yml @@ -0,0 +1,145 @@ +# https://docs.photoprism.org/getting-started/ +# https://dl.photoprism.org/docker/docker-compose.yml + +version: '3.5' + +# Example Docker Compose config file for PhotoPrism (Linux / AMD64) +# +# Note: +# - Running PhotoPrism on a server with less than 4 GB of swap space or setting a memory/swap limit can cause unexpected +# restarts ("crashes"), for example, when the indexer temporarily needs more memory to process large files. +# - If you install PhotoPrism on a public server outside your home network, please always run it behind a secure +# HTTPS reverse proxy such as Traefik or Caddy. Your files and passwords will otherwise be transmitted +# in clear text and can be intercepted by anyone, including your provider, hackers, and governments: +# https://docs.photoprism.app/getting-started/proxies/traefik/ +# +# Documentation : https://docs.photoprism.app/getting-started/docker-compose/ +# Docker Hub URL: https://hub.docker.com/r/photoprism/photoprism/ +# +# DOCKER COMPOSE COMMAND REFERENCE +# see https://docs.photoprism.app/getting-started/docker-compose/#command-line-interface +# -------------------------------------------------------------------------- +# Start | docker-compose up -d +# Stop | docker-compose stop +# Update | docker-compose pull +# Logs | docker-compose logs --tail=25 -f +# Terminal | docker-compose exec photoprism bash +# Help | docker-compose exec photoprism photoprism help +# Config | docker-compose exec photoprism photoprism config +# Reset | docker-compose exec photoprism photoprism reset +# Backup | docker-compose exec photoprism photoprism backup -a -i +# Restore | docker-compose exec photoprism photoprism restore -a -i +# Index | docker-compose exec photoprism photoprism index +# Reindex | docker-compose exec photoprism photoprism index -f +# Import | docker-compose exec photoprism photoprism import +# +# To search originals for faces without a complete rescan: +# docker-compose exec photoprism photoprism faces index +# +# All commands may have to be prefixed with "sudo" when not running as root. +# This will point the home directory shortcut ~ to /root in volume mounts. + +services: + photoprism: + ## Use photoprism/photoprism:preview for testing preview builds: + image: photoprism/photoprism:latest + depends_on: + - mariadb + ## Don't enable automatic restarts until PhotoPrism has been properly configured and tested! + ## If the service gets stuck in a restart loop, this points to a memory, filesystem, network, or database issue: + ## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors + # restart: unless-stopped + security_opt: + - seccomp:unconfined + - apparmor:unconfined + ports: + - "2342:2342" # HTTP port (host:container) + environment: + PHOTOPRISM_ADMIN_PASSWORD: "insecure" # !!! PLEASE CHANGE YOUR INITIAL "admin" PASSWORD !!! + PHOTOPRISM_SITE_URL: "http://localhost:2342/" # public server URL incl http:// or https:// and /path, :port is optional + PHOTOPRISM_ORIGINALS_LIMIT: 5000 # file size limit for originals in MB (increase for high-res video) + PHOTOPRISM_HTTP_COMPRESSION: "gzip" # improves transfer speed and bandwidth utilization (none or gzip) + PHOTOPRISM_DEBUG: "false" # run in debug mode (shows additional log messages) + PHOTOPRISM_PUBLIC: "false" # no authentication required (disables password protection) + PHOTOPRISM_READONLY: "false" # don't modify originals directory (reduced functionality) + PHOTOPRISM_EXPERIMENTAL: "false" # enables experimental features + PHOTOPRISM_DISABLE_CHOWN: "false" # disables storage permission updates on startup + PHOTOPRISM_DISABLE_WEBDAV: "false" # disables built-in WebDAV server + PHOTOPRISM_DISABLE_SETTINGS: "false" # disables Settings in Web UI + PHOTOPRISM_DISABLE_TENSORFLOW: "false" # disables all features depending on TensorFlow + PHOTOPRISM_DISABLE_FACES: "false" # disables facial recognition + PHOTOPRISM_DISABLE_CLASSIFICATION: "false" # disables image classification + PHOTOPRISM_DARKTABLE_PRESETS: "false" # enables Darktable presets and disables concurrent RAW conversion + PHOTOPRISM_DETECT_NSFW: "false" # flag photos as private that MAY be offensive (requires TensorFlow) + PHOTOPRISM_UPLOAD_NSFW: "true" # allows uploads that MAY be offensive + # PHOTOPRISM_DATABASE_DRIVER: "sqlite" # SQLite is an embedded database that doesn't require a server + PHOTOPRISM_DATABASE_DRIVER: "mysql" # use MariaDB 10.5+ or MySQL 8+ instead of SQLite for improved performance + PHOTOPRISM_DATABASE_SERVER: "mariadb:3306" # MariaDB or MySQL database server (hostname:port) + PHOTOPRISM_DATABASE_NAME: "photoprism" # MariaDB or MySQL database schema name + PHOTOPRISM_DATABASE_USER: "photoprism" # MariaDB or MySQL database user name + PHOTOPRISM_DATABASE_PASSWORD: "insecure" # MariaDB or MySQL database user password + PHOTOPRISM_SITE_TITLE: "PhotoPrism" + PHOTOPRISM_SITE_CAPTION: "AI-Powered Photos App" + PHOTOPRISM_SITE_DESCRIPTION: "" + PHOTOPRISM_SITE_AUTHOR: "" + ## Run/install on first startup (options: update, gpu, tensorflow, davfs, nano, clean): + # PHOTOPRISM_INIT: "gpu tensorflow" + ## Hardware video transcoding config (optional) + # PHOTOPRISM_FFMPEG_BUFFERS: "64" # FFmpeg capture buffers (default: 32) + # PHOTOPRISM_FFMPEG_BITRATE: "32" # FFmpeg encoding bitrate limit in Mbit/s (default: 50) + # PHOTOPRISM_FFMPEG_ENCODER: "h264_v4l2m2m" # use Video4Linux for AVC transcoding (default: libx264) + # PHOTOPRISM_FFMPEG_ENCODER: "h264_qsv" # use Intel Quick Sync Video for AVC transcoding (default: libx264) + ## Run as a specific user, group, or with a custom umask (does not work together with "user:") + # PHOTOPRISM_UID: 1000 + # PHOTOPRISM_GID: 1000 + # PHOTOPRISM_UMASK: 0000 + HOME: "/photoprism" + ## Start as a non-root user (see https://docs.docker.com/engine/reference/run/#user) + # user: "1000:1000" + ## Share hardware devices with FFmpeg and TensorFlow (optional): + # devices: + # - "/dev/dri:/dev/dri" + # - "/dev/nvidia0:/dev/nvidia0" + # - "/dev/nvidiactl:/dev/nvidiactl" + # - "/dev/video11:/dev/video11" # Video4Linux (h264_v4l2m2m) + working_dir: "/photoprism" + ## Storage Folders: "~" is a shortcut for your home directory, "." for the current directory + volumes: + # "/host/folder:/photoprism/folder" # example + - "~/Pictures:/photoprism/originals" # original media files (photos and videos) + # - "/example/family:/photoprism/originals/family" # *additional* media folders can be mounted like this + # - "~/Import:/photoprism/import" # *optional* base folder from which files can be imported to originals + - "./storage:/photoprism/storage" # *writable* storage folder for cache, database, and sidecar files (never remove) + + ## Database Server (recommended) + ## see https://docs.photoprism.app/getting-started/faq/#should-i-use-sqlite-mariadb-or-mysql + mariadb: + ## If MariaDB gets stuck in a restart loop, this points to a memory or filesystem issue: + ## https://docs.photoprism.app/getting-started/troubleshooting/#fatal-server-errors + restart: unless-stopped + image: mariadb:10.6 + security_opt: + - seccomp:unconfined + - apparmor:unconfined + command: mysqld --innodb-buffer-pool-size=128M --transaction-isolation=READ-COMMITTED --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --max-connections=512 --innodb-rollback-on-timeout=OFF --innodb-lock-wait-timeout=120 + ## Never store database files on an unreliable device such as a USB flash drive, an SD card, or a shared network folder: + volumes: + - "./database:/var/lib/mysql" # important, don't remove + environment: + MYSQL_ROOT_PASSWORD: insecure + MYSQL_DATABASE: photoprism + MYSQL_USER: photoprism + MYSQL_PASSWORD: insecure + + ## Watchtower upgrades services automatically (optional) + ## see https://docs.photoprism.app/getting-started/updates/#watchtower + # + # watchtower: + # restart: unless-stopped + # image: containrrr/watchtower + # environment: + # WATCHTOWER_CLEANUP: "true" + # WATCHTOWER_POLL_INTERVAL: 7200 # checks for updates every two hours + # volumes: + # - "/var/run/docker.sock:/var/run/docker.sock" + # - "~/.docker/config.json:/config.json" # optional, for authentication if you have a Docker Hub account \ No newline at end of file diff --git a/Test/rocket.chat/docker-compose.yml b/Test/rocket.chat/docker-compose.yml new file mode 100644 index 0000000..76a6635 --- /dev/null +++ b/Test/rocket.chat/docker-compose.yml @@ -0,0 +1,81 @@ +version: '2' + +services: + rocketchat: + image: registry.rocket.chat/rocketchat/rocket.chat:latest + command: > + bash -c + "for i in `seq 1 30`; do + node main.js && + s=$$? && break || s=$$?; + echo \"Tried $$i times. Waiting 5 secs...\"; + sleep 5; + done; (exit $$s)" + restart: unless-stopped + volumes: + - ./uploads:/app/uploads + environment: + - PORT=3000 + - ROOT_URL=http://localhost:3000 + - MONGO_URL=mongodb://mongo:27017/rocketchat + - MONGO_OPLOG_URL=mongodb://mongo:27017/local + - REG_TOKEN=${REG_TOKEN} +# - MAIL_URL=smtp://smtp.email +# - HTTP_PROXY=http://proxy.domain.com +# - HTTPS_PROXY=http://proxy.domain.com + depends_on: + - mongo + ports: + - 3000:3000 + labels: + - "traefik.backend=rocketchat" + - "traefik.frontend.rule=Host: your.domain.tld" + + mongo: + image: mongo:4.0 + restart: unless-stopped + volumes: + - ./data/db:/data/db + #- ./data/dump:/dump + command: mongod --smallfiles --oplogSize 128 --replSet rs0 --storageEngine=mmapv1 + labels: + - "traefik.enable=false" + + # this container's job is just run the command to initialize the replica set. + # it will run the command and remove himself (it will not stay running) + mongo-init-replica: + image: mongo:4.0 + command: > + bash -c + "for i in `seq 1 30`; do + mongo mongo/rocketchat --eval \" + rs.initiate({ + _id: 'rs0', + members: [ { _id: 0, host: 'localhost:27017' } ]})\" && + s=$$? && break || s=$$?; + echo \"Tried $$i times. Waiting 5 secs...\"; + sleep 5; + done; (exit $$s)" + depends_on: + - mongo + + #traefik: + # image: traefik:latest + # restart: unless-stopped + # command: > + # traefik + # --docker + # --acme=true + # --acme.domains='your.domain.tld' + # --acme.email='your@email.tld' + # --acme.entrypoint=https + # --acme.storagefile=acme.json + # --defaultentrypoints=http + # --defaultentrypoints=https + # --entryPoints='Name:http Address::80 Redirect.EntryPoint:https' + # --entryPoints='Name:https Address::443 TLS.Certificates:' + # ports: + # - 80:80 + # - 443:443 + # volumes: + # - /var/run/docker.sock:/var/run/docker.sock