├── AFFiNE ├── docker-compose.yml └── readme.md ├── Aipan ├── docker-compose.yml ├── env.txt └── readme.md ├── Airflow ├── .env ├── docker-compose.yml └── readme.md ├── Biblioteca ├── docker-compose.yml ├── env.txt ├── readme.md ├── translations.zip └── translations │ ├── AutocompleteBundle.fr.yaml │ ├── KnpPaginatorBundle.fr.yaml │ ├── messages+intl-icu.fr.yaml │ ├── security.fr.yaml │ └── validators.fr.yaml ├── Chatwoot ├── docker-compose.yml ├── env.txt └── readme.md ├── ChiefOnboarding ├── django.mo ├── django.po └── docker-compose.yml ├── DataEase ├── conf │ ├── application.yml │ ├── install.conf │ └── my.conf ├── dataease2.zip ├── dataease_standalone.zip ├── docker-compose.yml ├── mysql │ └── init.sql └── readme.md ├── Dify ├── dify.zip ├── docker-compose.yml ├── nginx │ ├── conf.d │ │ └── default.conf │ ├── nginx.conf │ └── proxy.conf └── readme.md ├── ERPNext ├── docker-compose.yml ├── env.txt └── readme.md ├── FastGPT ├── config.json ├── config(kimi-free-api).json ├── docker-compose.yml └── readme.md ├── FileRun └── chinese.php ├── Helper ├── docker-compose.yml ├── lang.zip ├── lang │ ├── fr.json │ └── fr │ │ ├── auth.php │ │ ├── pagination.php │ │ ├── passwords.php │ │ └── validation.php └── readme.md ├── InvenTree ├── .env ├── docker-compose.yml ├── nginx.prod.conf └── readme.md ├── Kyoo ├── docker-compose.yml ├── env.txt ├── nginx.conf └── readme.md ├── LibreKB ├── index.php └── readme.md ├── LibrePhotos ├── docker-compose.yml ├── env.txt └── readme.md ├── Librum ├── docker-compose.yml ├── librum_mariadb.sql └── readme.md ├── LubeLogger ├── en_US.json └── zh_CN.json ├── Plane ├── docker-compose.yml ├── env.txt ├── nginx.conf └── readme.md ├── README.md ├── Raneto ├── config.js ├── content.zip ├── docker-compose.yml └── readme.md ├── Revolt ├── caddyfile.txt ├── docker-compose.yml ├── env.txt └── readme.md ├── Teable ├── docker-compose.yml ├── env.txt ├── readme.md └── 人员信息统计表.xlsx ├── Tellor ├── dcoker-compose.yml ├── readme.md └── setup-db.sql ├── WiseMapping ├── 01drop-schemas.sql ├── 02create-database.sql ├── 03create-schemas.sql ├── 04apopulate-schemas.sql ├── app.properties ├── app.properties.txt └── readme.md ├── authelia ├── authelia.conf ├── configuration.yml ├── protected_domain.conf ├── readme.md └── users_database.yml ├── dootask ├── .env ├── docker-compose.yml └── readme.md ├── immich ├── .env ├── docker-compose.yml ├── immich.zip ├── readme.md └── settings │ └── nginx-conf │ └── nginx.conf ├── outline(OIDC) ├── configuration.yml ├── docker-compose.yml ├── docker.env.txt └── readme.md ├── outline └── docker │ ├── docker-compose.yml │ ├── docker.env.txt │ └── readme.md ├── sqlite_backup.sh ├── synology-alertover.php ├── synology-monitoring ├── Synology_dashboard.json ├── readme.md └── synology_snmp.sh ├── typecho ├── docker-compose.yml ├── nginx.conf └── readme.md └── yal ├── readme.md └── yal.zip /AFFiNE/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | affine: 5 | image: ghcr.io/toeverything/affine-graphql:stable 6 | container_name: affine_selfhosted 7 | restart: unless-stopped 8 | ports: 9 | - '3010:3010' 10 | - '5555:5555' 11 | volumes: 12 | # custom configurations 13 | - ./config:/root/.affine/config 14 | # blob storage 15 | - ./storage:/root/.affine/storage 16 | environment: 17 | - NODE_OPTIONS="--import=./scripts/register.js" 18 | - AFFINE_CONFIG_PATH=/root/.affine/config 19 | - REDIS_SERVER_HOST=redis 20 | - DATABASE_URL=postgres://affine:affine@postgres:5432/affine 21 | - NODE_ENV=production 22 | - AFFINE_ADMIN_EMAIL=<登录的默认电子邮件> 23 | - AFFINE_ADMIN_PASSWORD=<登录的默认密码> 24 | # Telemetry allows us to collect data on how you use the affine. This data will helps us improve the app and provide better features. 25 | # Uncomment next line if you wish to quit telemetry. 26 | # - TELEMETRY_ENABLE=false 27 | command: 28 | ['sh', '-c', 'node ./scripts/self-host-predeploy && node ./dist/index.js'] 29 | depends_on: 30 | redis: 31 | condition: service_healthy 32 | postgres: 33 | condition: service_healthy 34 | logging: 35 | driver: 'json-file' 36 | options: 37 | max-size: '1000m' 38 | 39 | redis: 40 | image: redis:6.2 41 | container_name: affine_redis 42 | restart: unless-stopped 43 | volumes: 44 | - ./redis:/data 45 | healthcheck: 46 | test: ['CMD', 'redis-cli', '--raw', 'incr', 'ping'] 47 | interval: 10s 48 | timeout: 5s 49 | retries: 5 50 | 51 | postgres: 52 | image: postgres:15 53 | container_name: affine_postgres 54 | restart: unless-stopped 55 | volumes: 56 | - ./postgres:/var/lib/postgresql/data 57 | healthcheck: 58 | test: ['CMD-SHELL', 'pg_isready -U affine'] 59 | interval: 10s 60 | timeout: 5s 61 | retries: 5 62 | environment: 63 | POSTGRES_USER: affine 64 | POSTGRES_PASSWORD: affine 65 | POSTGRES_DB: affine 66 | PGDATA: /var/lib/postgresql/data/pgdata 67 | -------------------------------------------------------------------------------- /AFFiNE/readme.md: -------------------------------------------------------------------------------- 1 | - `AFFINE_ADMIN_EMAIL`:登录的默认电子邮件 2 | - `AFFINE_ADMIN_PASSWORD`:登录的默认密码 3 | 4 | 更多的环境变量请参考:[https://docs.affine.pro/docs/self-host-affine/run-affine-with-custom-options](https://docs.affine.pro/docs/self-host-affine/run-affine-with-custom-options) 5 | 6 | 然后执行下面的命令 7 | 8 | ```bash 9 | # 新建文件夹 affine 和 子目录 10 | mkdir -p /volume1/docker/affine/{config,postgres,redis,storage} 11 | 12 | # 进入 affine 目录 13 | cd /volume1/docker/affine 14 | 15 | # 将 docker-compose.yml 放入当前目录 16 | 17 | # 一键启动 18 | docker-compose up -d 19 | ``` 20 | -------------------------------------------------------------------------------- /Aipan/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | aipan-netdisk-search: 5 | # image: unilei/aipan-netdisk-search:amd64 6 | image: wbsu2003/aipan-netdisk-search:latest 7 | container_name: aipan-netdisk-search-app 8 | restart: unless-stopped 9 | ports: 10 | - 3295:3000 11 | env_file: 12 | - ./env.txt 13 | depends_on: 14 | postgres: 15 | condition: service_healthy 16 | 17 | postgres: 18 | image: postgres:15 19 | container_name: aipan-netdisk-search-db 20 | restart: unless-stopped 21 | # ports: 22 | # - 5433:5432 23 | volumes: 24 | - ./data:/var/lib/postgresql/data 25 | environment: 26 | POSTGRES_USER: ${POSTGRES_USER} 27 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 28 | POSTGRES_DB: ${POSTGRES_DB} 29 | healthcheck: 30 | test: ['CMD-SHELL', 'pg_isready -d ${POSTGRES_DB} -U ${POSTGRES_USER}'] 31 | interval: 10s 32 | timeout: 5s 33 | retries: 5 34 | -------------------------------------------------------------------------------- /Aipan/env.txt: -------------------------------------------------------------------------------- 1 | # user 2 | ADMIN_USER=laosu 3 | ADMIN_PASSWORD=123456 4 | ADMIN_EMAIL=wbsu2003@gmail.com 5 | 6 | # app 7 | JWT_SECRET=XnKZDR7OmPce9SxBjbPOqyMnMKDMdLLWNJP9iqsrYNk= 8 | 9 | # db 10 | POSTGRES_DB=aipan 11 | POSTGRES_USER=aipan 12 | POSTGRES_PASSWORD=aipan 13 | DATABASE_SCHEMA=public 14 | DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_DB} 15 | -------------------------------------------------------------------------------- /Aipan/readme.md: -------------------------------------------------------------------------------- 1 | 依次执行下面的命令 2 | 3 | ```bash 4 | # 新建文件夹 aipan 和 子目录 5 | mkdir -p /volume1/docker/aipan/data 6 | 7 | # 进入 aipan 目录 8 | cd /volume1/docker/aipan 9 | 10 | # 将 docker-compose.yml 放入当前目录 11 | # 修改 env.txt 中的参数, 可以用 openssl rand -base64 32 生成 JWT_SECRET 12 | 13 | # 一键启动 14 | docker-compose --env-file env.txt up -d 15 | ``` 16 | -------------------------------------------------------------------------------- /Airflow/.env: -------------------------------------------------------------------------------- 1 | AIRFLOW_UID=1000 2 | -------------------------------------------------------------------------------- /Airflow/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Airflow 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /Biblioteca/docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | biblioteca: 3 | image: ghcr.io/biblioverse/biblioteca:main 4 | container_name: biblioteca-web 5 | command: ["/bin/sh", "-c" , "apache2-foreground" ] 6 | ports: 7 | - 8109:8080 8 | depends_on: 9 | - db 10 | stdin_open: true 11 | tty: true 12 | volumes: 13 | - ./covers:/var/www/html/public/covers 14 | - ./books:/var/www/html/public/books 15 | - ./media:/var/www/html/public/media 16 | - ./env.txt:/var/www/html/.env 17 | 18 | db: 19 | image: mariadb:10.10 20 | container_name: biblioteca-mariadb 21 | environment: 22 | - MYSQL_ROOT_PASSWORD=db 23 | - MYSQL_DATABASE=db 24 | - MYSQL_USER=db 25 | - MYSQL_PASSWORD=db 26 | volumes: 27 | - ./db:/var/lib/mysql 28 | 29 | typesense: 30 | image: typesense/typesense:27.1 31 | container_name: biblioteca-typesense 32 | restart: on-failure 33 | ports: 34 | - 8983 35 | - 8108 36 | volumes: 37 | - ./data:/data 38 | command: '--data-dir /data --api-key=xyz --enable-cors' -------------------------------------------------------------------------------- /Biblioteca/env.txt: -------------------------------------------------------------------------------- 1 | # In all environments, the following files are loaded if they exist, 2 | # the latter taking precedence over the former: 3 | # 4 | # * .env contains default values for the environment variables needed by the app 5 | # * .env.local uncommitted file with local overrides 6 | # * .env.$APP_ENV committed environment-specific defaults 7 | # * .env.$APP_ENV.local uncommitted environment-specific overrides 8 | # 9 | # Real environment variables win over .env files. 10 | # 11 | # DO NOT DEFINE PRODUCTION SECRETS IN THIS FILE NOR IN ANY OTHER COMMITTED FILES. 12 | # https://symfony.com/doc/current/configuration/secrets.html 13 | # 14 | # Run "composer dump-env prod" to compile .env files for production use (requires symfony/flex >=1.2). 15 | # https://symfony.com/doc/current/best_practices.html#use-environment-variables-for-infrastructure-configuration 16 | 17 | ###> symfony/framework-bundle ### 18 | APP_ENV=prod 19 | APP_SECRET=9653a6c476d291323d2db7417c13a814 20 | ###< symfony/framework-bundle ### 21 | 22 | ###> doctrine/doctrine-bundle ### 23 | # Format described at https://www.doctrine-project.org/projects/doctrine-dbal/en/latest/reference/configuration.html#connecting-using-a-url 24 | # IMPORTANT: You MUST configure your server version, either here or in config/packages/doctrine.yaml 25 | # 26 | # DATABASE_URL="sqlite:///%kernel.project_dir%/var/data.db" 27 | # DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8&charset=utf8mb4" 28 | DATABASE_URL="mysql://db:db@db:3306/db?serverVersion=mariadb-10.3.39&charset=utf8" 29 | ###< doctrine/doctrine-bundle ### 30 | 31 | ###> symfony/messenger ### 32 | # Choose one of the transports below 33 | # MESSENGER_TRANSPORT_DSN=amqp://guest:guest@localhost:5672/%2f/messages 34 | # MESSENGER_TRANSPORT_DSN=redis://localhost:6379/messages 35 | MESSENGER_TRANSPORT_DSN=doctrine://default?auto_setup=0 36 | ###< symfony/messenger ### 37 | 38 | ###> symfony/mailer ### 39 | 40 | MAILER_DSN=native://default 41 | ###< symfony/mailer ### 42 | # .env 43 | TYPESENSE_URL=http://typesense:8108 44 | TYPESENSE_KEY=xyz 45 | 46 | BOOK_FOLDER_NAMING_FORMAT="{authorFirst}/{author}/{serie}/{title}" 47 | BOOK_FILE_NAMING_FORMAT="{serie}-{serieIndex}-{title}" 48 | 49 | ###< kobo/proxy 50 | KOBO_PROXY_USE_DEV=0 51 | KOBO_PROXY_USE_EVERYWHERE=0 52 | KOBO_PROXY_ENABLED=1 53 | ###< kobo/proxy -------------------------------------------------------------------------------- /Biblioteca/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Biblioteca 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.tech](https://laosu.tech) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /Biblioteca/translations.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/Biblioteca/translations.zip -------------------------------------------------------------------------------- /Biblioteca/translations/AutocompleteBundle.fr.yaml: -------------------------------------------------------------------------------- 1 | 'Loading more results...': '加载更多结果...' 2 | 'No results found': '未找到结果' 3 | 'No more results': '没有更多结果' -------------------------------------------------------------------------------- /Biblioteca/translations/KnpPaginatorBundle.fr.yaml: -------------------------------------------------------------------------------- 1 | label_previous: 上一页 2 | label_next: 下一页 3 | filter_searchword: 搜索词... -------------------------------------------------------------------------------- /Biblioteca/translations/messages+intl-icu.fr.yaml: -------------------------------------------------------------------------------- 1 | page: 页 2 | search: 搜索 3 | save.current.filtering: '保存当前过滤' 4 | new.shelf: '新书架' 5 | author: 作者 6 | serie: 系列 7 | index: 索引 8 | rename: 重命名 9 | upload: 上传 10 | upload.cover: '上传封面' 11 | picture.for: '图片为' 12 | no.picture.for: __no.picture.for 13 | download: 下载 14 | title: 标题 15 | authors: 作者们 16 | summary: 摘要 17 | publisher: 出版社 18 | tags: 标签 19 | verified: 已验证 20 | book: 书籍 21 | image: 图片 22 | suggested.images: '推荐图片' 23 | search.google.images: '在 Google 图片中搜索' 24 | search.goodreads: '在 Goodreads 上搜索' 25 | google.books.api: '来自 Google Books 的建议' 26 | openlibrary.api: '来自 OpenLibrary 的建议' 27 | extract.from-file: '从文件中提取封面' 28 | books.in.serie: '系列中的书籍' 29 | books.same.index: '同一索引的书籍' 30 | other.books: '其他书籍' 31 | books.same.author: '同一作者的书籍' 32 | missing.book: '缺失的书籍' 33 | books: 书籍 34 | reading.list: '阅读清单' 35 | reading.list.finished: '已完成' 36 | reading.list.showall: '查看阅读清单中的所有书籍' 37 | add_to_favorites: '通过点击书籍页面上的书签图标将书籍添加到您的阅读清单。' 38 | series_in_progress: '进行中的系列' 39 | need_inspiration: '需要一些灵感吗?' 40 | continue.reading: '继续阅读' 41 | hello: 你好 42 | menu.home: '主页' 43 | menu.books: '书籍' 44 | menu.authors: '作者' 45 | menu.series: '系列' 46 | menu.tags: '标签' 47 | menu.shelves: '书架' 48 | menu.allbooks: '所有书籍' 49 | menu.admin: '管理面板' 50 | menu.addbooks: '添加书籍' 51 | menu.useradmin: '管理用户' 52 | menu.upload: '上传' 53 | menu.notverified: '未验证' 54 | menu.profile: '我的个人资料' 55 | menu.logout: '注销' 56 | menu.timeline: '我的时间线' 57 | menu.kobodevices: 'Kobo 设备' 58 | menu.editshelves: '编辑书架' 59 | menu.readinglist: '阅读清单' 60 | filter.serie: '按系列过滤' -------------------------------------------------------------------------------- /Biblioteca/translations/security.fr.yaml: -------------------------------------------------------------------------------- 1 | 'An authentication exception occurred.': '发生了身份验证异常。' 2 | 'Authentication credentials could not be found.': '找不到身份验证凭据。' 3 | 'Authentication request could not be processed due to a system problem.': '由于系统问题,无法处理身份验证请求。' 4 | 'Invalid credentials.': '凭据无效。' 5 | 'Cookie has already been used by someone else.': '此 Cookie 已被其他人使用。' 6 | 'Not privileged to request the resource.': '没有权限请求该资源。' 7 | 'Invalid CSRF token.': '无效的 CSRF 令牌。' 8 | 'No authentication provider found to support the authentication token.': '找不到支持身份验证令牌的身份验证提供者。' 9 | 'No session available, it either timed out or cookies are not enabled.': '没有可用的会话,可能已超时或未启用 Cookie。' 10 | 'No token could be found.': '找不到令牌。' 11 | 'Username could not be found.': '找不到用户名。' 12 | 'Account has expired.': '账户已过期。' 13 | 'Credentials have expired.': '凭据已过期。' 14 | 'Account is disabled.': '账户已禁用。' 15 | 'Account is locked.': '账户已锁定。' 16 | 'Too many failed login attempts, please try again later.': '尝试登录失败次数过多,请稍后再试。' 17 | 'Invalid or expired login link.': '无效或过期的登录链接。' 18 | 'Too many failed login attempts, please try again in %minutes% minute.': '尝试登录失败次数过多,请在 %minutes% 分钟后再试。' 19 | 'Too many failed login attempts, please try again in %minutes% minutes.': '尝试登录失败次数过多,请在 %minutes% 分钟后再试。' 20 | password: 密码 21 | email: 邮箱 22 | please.sign.in: '请登录' 23 | logged.in.as: '您已登录为' 24 | logout: 注销 25 | remember.me: '记住我' 26 | sign.in: '登录' -------------------------------------------------------------------------------- /Biblioteca/translations/validators.fr.yaml: -------------------------------------------------------------------------------- 1 | 'This value should be false.': '该值应为假。' 2 | 'This value should be true.': '该值应为真。' 3 | 'This value should be of type {{ type }}.': '该值应为 {{ type }} 类型。' 4 | 'This value should be blank.': '该值应为空。' 5 | 'The value you selected is not a valid choice.': '您选择的值不是有效选项。' 6 | 'You must select at least {{ limit }} choice.|You must select at least {{ limit }} choices.': '您必须至少选择 {{ limit }} 个选项。' 7 | 'You must select at most {{ limit }} choice.|You must select at most {{ limit }} choices.': '您最多只能选择 {{ limit }} 个选项。' 8 | 'One or more of the given values is invalid.': '一个或多个给定值无效。' 9 | 'This field was not expected.': '此字段不被预期。' 10 | 'This field is missing.': '此字段缺失。' 11 | 'This value is not a valid date.': '该值不是有效日期。' 12 | 'This value is not a valid datetime.': '该值不是有效日期时间。' 13 | 'This value is not a valid email address.': '该值不是有效的电子邮件地址。' 14 | 'The file could not be found.': '找不到该文件。' 15 | 'The file is not readable.': '该文件不可读。' 16 | 'The file is too large ({{ size }} {{ suffix }}). Allowed maximum size is {{ limit }} {{ suffix }}.': '文件太大({{ size }} {{ suffix }})。允许的最大大小是 {{ limit }} {{ suffix }}。' 17 | 'The mime type of the file is invalid ({{ type }}). Allowed mime types are {{ types }}.': '文件的 MIME 类型无效({{ type }})。允许的 MIME 类型为 {{ types }}。' 18 | 'This value should be {{ limit }} or less.': '该值应为 {{ limit }} 或更小。' 19 | 'This value is too long. It should have {{ limit }} character or less.|This value is too long. It should have {{ limit }} characters or less.': '该值太长。应包含 {{ limit }} 个字符或更少。' 20 | 'This value should be {{ limit }} or more.': '该值应为 {{ limit }} 或更大。' 21 | 'This value is too short. It should have {{ limit }} character or more.|This value is too short. It should have {{ limit }} characters or more.': '该值太短。应包含 {{ limit }} 个字符或更多。' 22 | 'This value should not be blank.': '该值不应为空。' 23 | 'This value should not be null.': '该值不应为 null。' 24 | 'This value should be null.': '该值应为 null。' 25 | 'This value is not valid.': '该值无效。' 26 | 'This value is not a valid time.': '该值不是有效时间。' 27 | 'This value is not a valid URL.': '该值不是有效的 URL。' 28 | 'The two values should be equal.': '这两个值应相等。' 29 | 'The file is too large. Allowed maximum size is {{ limit }} {{ suffix }}.': '文件太大。允许的最大大小是 {{ limit }} {{ suffix }}。' 30 | 'The file is too large.': '文件太大。' 31 | 'The file could not be uploaded.': '文件无法上传。' 32 | 'This value should be a valid number.': '该值应为有效数字。' 33 | 'This file is not a valid image.': '该文件不是有效图片。' 34 | 'This is not a valid IP address.': '这不是有效的 IP 地址。' 35 | 'This value is not a valid language.': '该值不是有效语言。' 36 | 'This value is not a valid locale.': '该值不是有效区域设置。' 37 | 'This value is not a valid country.': '该值不是有效国家。' 38 | 'This value is already used.': '该值已被使用。' 39 | 'The size of the image could not be detected.': '无法检测到图像的大小。' 40 | 'The image width is too big ({{ width }}px). Allowed maximum width is {{ max_width }}px.': '图像宽度太大({{ width }}px)。允许的最大宽度为 {{ max_width }}px。' 41 | 'The image width is too small ({{ width }}px). Minimum width expected is {{ min_width }}px.': '图像宽度太小({{ width }}px)。期望的最小宽度为 {{ min_width }}px。' 42 | 'The image height is too big ({{ height }}px). Allowed maximum height is {{ max_height }}px.': '图像高度太大({{ height }}px)。允许的最大高度为 {{ max_height }}px。' 43 | 'The image height is too small ({{ height }}px). Minimum height expected is {{ min_height }}px.': '图像高度太小({{ height }}px)。期望的最小高度为 {{ min_height }}px。' 44 | "This value should be the user's current password.": "该值应为用户当前密码。" 45 | 'This value should have exactly {{ limit }} character.|This value should have exactly {{ limit }} characters.': '该值应恰好包含 {{ limit }} 个字符。' 46 | 'The file was only partially uploaded.': '文件仅部分上传。' 47 | 'No file was uploaded.': '未上传文件。' 48 | 'No temporary folder was configured in php.ini.': '在 php.ini 中未配置临时文件夹。' 49 | 'Cannot write temporary file to disk.': '无法将临时文件写入磁盘。' 50 | 'A PHP extension caused the upload to fail.': 'PHP 扩展导致上传失败。' 51 | 'This collection should contain {{ limit }} element or more.|This collection should contain {{ limit }} elements or more.': '此集合应包含 {{ limit }} 个或更多元素。' 52 | 'This collection should contain {{ limit }} element or less.|This collection should contain {{ limit }} elements or less.': '此集合应包含 {{ limit }} 个或更少元素。' 53 | 'This collection should contain exactly {{ limit }} element.|This collection should contain exactly {{ limit }} elements.': '此集合应恰好包含 {{ limit }} 个元素。' 54 | 'Invalid card number.': '卡号无效。' 55 | 'Unsupported card type or invalid card number.': '不支持的卡类型或无效卡号。' 56 | 'This is not a valid International Bank Account Number (IBAN).': '这不是有效的国际银行账号(IBAN)。' 57 | 'This value is not a valid ISBN-10.': '该值不是有效的 ISBN-10。' 58 | 'This value is not a valid ISBN-13.': '该值不是有效的 ISBN-13。' 59 | 'This value is neither a valid ISBN-10 nor a valid ISBN-13.': '该值既不是有效的 ISBN-10 也不是有效的 ISBN-13。' 60 | 'This value is not a valid ISSN.': '该值不是有效的 ISSN。' 61 | 'This value is not a valid currency.': '该值不是有效货币。' 62 | 'This value should be equal to {{ compared_value }}.': '该值应等于 {{ compared_value }}。' 63 | 'This value should be greater than {{ compared_value }}.': '该值应大于 {{ compared_value }}。' 64 | 'This value should be greater than or equal to {{ compared_value }}.': '该值应大于或等于 {{ compared_value }}。' 65 | 'This value should be identical to {{ compared_value_type }} {{ compared_value }}.': '该值应与 {{ compared_value_type }} {{ compared_value }} 完全相同。' 66 | 'This value should be less than {{ compared_value }}.': '该值应小于 {{ compared_value }}。' 67 | 'This value should be less than or equal to {{ compared_value }}.': '该值应小于或等于 {{ compared_value }}。' 68 | 'This value should not be equal to {{ compared_value }}.': '该值不应等于 {{ compared_value }}。' 69 | 'This value should not be identical to {{ compared_value_type }} {{ compared_value }}.': '该值不应与 {{ compared_value_type }} {{ compared_value }} 完全相同。' 70 | 'The image ratio is too big ({{ ratio }}). Allowed maximum ratio is {{ max_ratio }}.': '图像比例太大({{ ratio }})。允许的最大比例为 {{ max_ratio }}。' 71 | 'The image ratio is too small ({{ ratio }}). Minimum ratio expected is {{ min_ratio }}.': '图像比例太小({{ ratio }})。期望的最小比例为 {{ min_ratio }}。' 72 | 'The image is square ({{ width }}x{{ height }}px). Square images are not allowed.': '图像是正方形的({{ width }}x{{ height }}px)。不允许使用正方形图像。' 73 | 'The image is landscape oriented ({{ width }}x{{ height }}px). Landscape oriented images are not allowed.': '图像是横向的({{ width }}x{{ height }}px)。不允许使用横向图像。' 74 | 'The image is portrait oriented ({{ width }}x{{ height }}px). Portrait oriented images are not allowed.': '图像是纵向的({{ width }}x{{ height }}px)。不允许使用纵向图像。' 75 | 'An empty file is not allowed.': '不允许空文件。' 76 | 'The host could not be resolved.': '无法解析主机。' 77 | 'This value does not match the expected {{ charset }} charset.': '该值与预期的 {{ charset }} 字符集不匹配。' 78 | 'This is not a valid Business Identifier Code (BIC).': '这不是有效的商业标识码(BIC)。' 79 | Error: Error 80 | 'This is not a valid UUID.': '这不是有效的 UUID。' 81 | 'This value should be a multiple of {{ compared_value }}.': '该值应为 {{ compared_value }} 的倍数。' 82 | 'This Business Identifier Code (BIC) is not associated with IBAN {{ iban }}.': '该商业标识码(BIC)与 IBAN {{ iban }} 不关联。' 83 | 'This value should be valid JSON.': '该值应为有效的 JSON。' 84 | 'This collection should contain only unique elements.': '此集合应仅包含唯一元素。' 85 | 'This value should be positive.': '该值应为正数。' 86 | 'This value should be either positive or zero.': '该值应为正数或零。' 87 | 'This value should be negative.': '该值应为负数。' 88 | 'This value should be either negative or zero.': '该值应为负数或零。' 89 | 'This value is not a valid timezone.': '该值不是有效时区。' 90 | 'This password has been leaked in a data breach, it must not be used. Please use another password.': '该密码已在数据泄露中被泄露,不能使用。请使用其他密码。' 91 | 'This value should be between {{ min }} and {{ max }}.': '该值应在 {{ min }} 和 {{ max }} 之间。' 92 | 'This value is not a valid hostname.': '该值不是有效主机名。' 93 | 'The number of elements in this collection should be a multiple of {{ compared_value }}.': '该集合中的元素数量应为 {{ compared_value }} 的倍数。' 94 | 'This value should satisfy at least one of the following constraints:': '该值应满足以下至少一个约束:' 95 | 'Each element of this collection should satisfy its own set of constraints.': '该集合的每个元素应满足其自身的一组约束。' 96 | 'This value is not a valid International Securities Identification Number (ISIN).': '该值不是有效的国际证券识别号码(ISIN)。' 97 | 'This value should be a valid expression.': '该值应为有效表达式。' 98 | 'This value is not a valid CSS color.': '该值不是有效的 CSS 颜色。' 99 | 'This value is not a valid CIDR notation.': '该值不是有效的 CIDR 表示法。' 100 | 'The value of the netmask should be between {{ min }} and {{ max }}.': '子网掩码的值应在 {{ min }} 和 {{ max }} 之间。' 101 | 'The filename is too long. It should have {{ filename_max_length }} character or less.|The filename is too long. It should have {{ filename_max_length }} characters or less.': '文件名太长。应包含 {{ filename_max_length }} 个字符或更少。' 102 | 'The password strength is too low. Please use a stronger password.': '密码强度太低。请使用更强的密码。' 103 | 'This value contains characters that are not allowed by the current restriction-level.': '该值包含当前限制级别不允许的字符。' 104 | 'Using invisible characters is not allowed.': '不允许使用不可见字符。' 105 | 'Mixing numbers from different scripts is not allowed.': '不允许混合不同字符集的数字。' 106 | 'Using hidden overlay characters is not allowed.': '不允许使用隐藏的叠加字符。' 107 | 'The extension of the file is invalid ({{ extension }}). Allowed extensions are {{ extensions }}.': '文件扩展名无效({{ extension }})。允许的扩展名为 {{ extensions }}。' 108 | 'The detected character encoding is invalid ({{ detected }}). Allowed encodings are {{ encodings }}.': '检测到的字符编码无效({{ detected }})。允许的编码为 {{ encodings }}。' 109 | 'This value is not a valid MAC address.': '该值不是有效的 MAC 地址。' 110 | 'This URL is missing a top-level domain.': '该 URL 缺少顶级域名。' 111 | 'This form should not contain extra fields.': '此表单不应包含额外字段。' 112 | 'The uploaded file was too large. Please try to upload a smaller file.': '上传的文件太大。请尝试上传较小的文件。' 113 | 'The CSRF token is invalid. Please try to resubmit the form.': 'CSRF 令牌无效。请尝试重新提交表单。' 114 | 'This value is not a valid HTML5 color.': '该值不是有效的 HTML5 颜色。' 115 | 'Please enter a valid birthdate.': '请输入有效的出生日期。' 116 | 'The selected choice is invalid.': '所选选项无效。' 117 | 'The collection is invalid.': '该集合无效。' 118 | 'Please select a valid color.': '请选择有效颜色。' 119 | 'Please select a valid country.': '请选择有效国家。' 120 | 'Please select a valid currency.': '请选择有效货币。' 121 | 'Please choose a valid date interval.': '请选择有效的日期区间。' 122 | 'Please enter a valid date and time.': '请输入有效的日期和时间。' 123 | 'Please enter a valid date.': '请输入有效的日期。' 124 | 'Please select a valid file.': '请选择有效文件。' 125 | 'The hidden field is invalid.': '隐藏字段无效。' 126 | 'Please enter an integer.': '请输入整数。' 127 | 'Please select a valid language.': '请选择有效语言。' 128 | 'Please select a valid locale.': '请选择有效区域设置。' 129 | 'Please enter a valid money amount.': '请输入有效的金额。' 130 | 'Please enter a number.': '请输入数字。' 131 | 'The password is invalid.': '密码无效。' 132 | 'Please enter a percentage value.': '请输入百分比值。' 133 | 'The values do not match.': '值不匹配。' 134 | 'Please enter a valid time.': '请输入有效时间。' 135 | 'Please select a valid timezone.': '请选择有效时区。' 136 | 'Please enter a valid URL.': '请输入有效的 URL。' 137 | 'Please enter a valid search term.': '请输入有效的搜索词。' 138 | 'Please provide a valid phone number.': '请输入有效的电话号码。' 139 | 'The checkbox has an invalid value.': '复选框的值无效。' 140 | 'Please enter a valid email address.': '请输入有效的电子邮件地址。' 141 | 'Please select a valid option.': '请选择有效选项。' 142 | 'Please select a valid range.': '请选择有效范围。' 143 | 'Please enter a valid week.': '请输入有效周。' 144 | 'Need to be Hexadecimal': '__需要是十六进制' -------------------------------------------------------------------------------- /Chatwoot/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | base: &base 5 | image: chatwoot/chatwoot:latest 6 | #container_name: chatwoot-base 7 | env_file: env.txt ## Change this file for customized env variables 8 | volumes: 9 | - ./storage:/app/storage 10 | 11 | rails: 12 | <<: *base 13 | depends_on: 14 | - postgres 15 | - redis 16 | ports: 17 | - 3338:3000 18 | environment: 19 | - NODE_ENV=production 20 | - RAILS_ENV=production 21 | - INSTALLATION_ENV=docker 22 | entrypoint: docker/entrypoints/rails.sh 23 | command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0'] 24 | 25 | sidekiq: 26 | <<: *base 27 | depends_on: 28 | - postgres 29 | - redis 30 | environment: 31 | - NODE_ENV=production 32 | - RAILS_ENV=production 33 | - INSTALLATION_ENV=docker 34 | command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml'] 35 | 36 | postgres: 37 | image: postgres:14 38 | container_name: chatwoot-postgres 39 | restart: always 40 | #ports: 41 | # - 5432:5432 42 | volumes: 43 | - ./postgres:/var/lib/postgresql/data 44 | environment: 45 | - POSTGRES_DB=chatwoot 46 | - POSTGRES_USER=postgres 47 | # Please provide your own password. 48 | - POSTGRES_PASSWORD=postgres 49 | 50 | redis: 51 | image: redis:6.2-alpine 52 | container_name: chatwoot-redis 53 | restart: always 54 | command: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""] 55 | env_file: env.txt 56 | volumes: 57 | - ./redis:/data 58 | #ports: 59 | # - 6379:6379 60 | -------------------------------------------------------------------------------- /Chatwoot/env.txt: -------------------------------------------------------------------------------- 1 | # Used to verify the integrity of signed cookies. so ensure a secure value is set 2 | SECRET_KEY_BASE=replace_with_lengthy_secure_hex 3 | 4 | # Replace with the URL you are planning to use for your app 5 | FRONTEND_URL=http://192.168.0.199:3338 6 | # To use a dedicated URL for help center pages 7 | # HELPCENTER_URL=http://0.0.0.0:3000 8 | 9 | # If the variable is set, all non-authenticated pages would fallback to the default locale. 10 | # Whenever a new account is created, the default language will be DEFAULT_LOCALE instead of en 11 | # DEFAULT_LOCALE=en 12 | 13 | # If you plan to use CDN for your assets, set Asset CDN Host 14 | ASSET_CDN_HOST= 15 | 16 | # Force all access to the app over SSL, default is set to false 17 | FORCE_SSL=false 18 | 19 | # This lets you control new sign ups on your chatwoot installation 20 | # true : default option, allows sign ups 21 | # false : disables all the end points related to sign ups 22 | # api_only: disables the UI for signup, but you can create sign ups via the account apis 23 | ENABLE_ACCOUNT_SIGNUP=false 24 | 25 | # Redis config 26 | REDIS_URL=redis://redis:6379 27 | # If you are using docker-compose, set this variable's value to be any string, 28 | # which will be the password for the redis service running inside the docker-compose 29 | # to make it secure 30 | REDIS_PASSWORD= 31 | # Redis Sentinel can be used by passing list of sentinel host and ports e,g. sentinel_host1:port1,sentinel_host2:port2 32 | REDIS_SENTINELS= 33 | # Redis sentinel master name is required when using sentinel, default value is "mymaster". 34 | # You can find list of master using "SENTINEL masters" command 35 | REDIS_SENTINEL_MASTER_NAME= 36 | 37 | # By default Chatwoot will pass REDIS_PASSWORD as the password value for sentinels 38 | # Use the following environment variable to customize passwords for sentinels. 39 | # Use empty string if sentinels are configured with out passwords 40 | # REDIS_SENTINEL_PASSWORD= 41 | 42 | # Redis premium breakage in heroku fix 43 | # enable the following configuration 44 | # ref: https://github.com/chatwoot/chatwoot/issues/2420 45 | # REDIS_OPENSSL_VERIFY_MODE=none 46 | 47 | # Postgres Database config variables 48 | # You can leave POSTGRES_DATABASE blank. The default name of 49 | # the database in the production environment is chatwoot_production 50 | # POSTGRES_DATABASE= 51 | POSTGRES_HOST=postgres 52 | POSTGRES_USERNAME=postgres 53 | POSTGRES_PASSWORD=postgres 54 | RAILS_ENV=development 55 | # Changes the Postgres query timeout limit. The default is 14 seconds. Modify only when required. 56 | # POSTGRES_STATEMENT_TIMEOUT=14s 57 | RAILS_MAX_THREADS=5 58 | 59 | # The email from which all outgoing emails are sent 60 | # could user either `email@yourdomain.com` or `BrandName ` 61 | MAILER_SENDER_EMAIL=laosu 62 | 63 | #SMTP domain key is set up for HELO checking 64 | SMTP_DOMAIN=88.com 65 | # Set the value to "mailhog" if using docker-compose for development environments, 66 | # Set the value as "localhost" or your SMTP address in other environments 67 | # If SMTP_ADDRESS is empty, Chatwoot would try to use sendmail(postfix) 68 | SMTP_ADDRESS=smtp.88.com 69 | SMTP_PORT=645 70 | SMTP_USERNAME=wbsu2003@88.com 71 | SMTP_PASSWORD=<你的第三方客户端密码> 72 | # plain,login,cram_md5 73 | SMTP_AUTHENTICATION=login 74 | SMTP_ENABLE_STARTTLS_AUTO=true 75 | # Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert', see http://api.rubyonrails.org/classes/ActionMailer/Base.html 76 | SMTP_OPENSSL_VERIFY_MODE=peer 77 | # Comment out the following environment variables if required by your SMTP server 78 | # SMTP_TLS= 79 | SMTP_SSL=true 80 | 81 | # Mail Incoming 82 | # This is the domain set for the reply emails when conversation continuity is enabled 83 | MAILER_INBOUND_EMAIL_DOMAIN= 84 | # Set this to appropriate ingress channel with regards to incoming emails 85 | # Possible values are : 86 | # relay for Exim, Postfix, Qmail 87 | # mailgun for Mailgun 88 | # mandrill for Mandrill 89 | # postmark for Postmark 90 | # sendgrid for Sendgrid 91 | RAILS_INBOUND_EMAIL_SERVICE= 92 | # Use one of the following based on the email ingress service 93 | # Ref: https://edgeguides.rubyonrails.org/action_mailbox_basics.html 94 | RAILS_INBOUND_EMAIL_PASSWORD= 95 | MAILGUN_INGRESS_SIGNING_KEY= 96 | MANDRILL_INGRESS_API_KEY= 97 | 98 | # Storage 99 | ACTIVE_STORAGE_SERVICE=local 100 | 101 | # Amazon S3 102 | # documentation: https://www.chatwoot.com/docs/configuring-s3-bucket-as-cloud-storage 103 | S3_BUCKET_NAME= 104 | AWS_ACCESS_KEY_ID= 105 | AWS_SECRET_ACCESS_KEY= 106 | AWS_REGION= 107 | 108 | # Log settings 109 | # Disable if you want to write logs to a file 110 | RAILS_LOG_TO_STDOUT=true 111 | LOG_LEVEL=info 112 | LOG_SIZE=500 113 | # Configure this environment variable if you want to use lograge instead of rails logger 114 | #LOGRAGE_ENABLED=true 115 | 116 | ### This environment variables are only required if you are setting up social media channels 117 | 118 | # Facebook 119 | # documentation: https://www.chatwoot.com/docs/facebook-setup 120 | FB_VERIFY_TOKEN= 121 | FB_APP_SECRET= 122 | FB_APP_ID= 123 | 124 | # https://developers.facebook.com/docs/messenger-platform/instagram/get-started#app-dashboard 125 | IG_VERIFY_TOKEN= 126 | 127 | # Twitter 128 | # documentation: https://www.chatwoot.com/docs/twitter-app-setup 129 | TWITTER_APP_ID= 130 | TWITTER_CONSUMER_KEY= 131 | TWITTER_CONSUMER_SECRET= 132 | TWITTER_ENVIRONMENT= 133 | 134 | #slack integration 135 | SLACK_CLIENT_ID= 136 | SLACK_CLIENT_SECRET= 137 | 138 | # Google OAuth 139 | GOOGLE_OAUTH_CLIENT_ID= 140 | GOOGLE_OAUTH_CLIENT_SECRET= 141 | GOOGLE_OAUTH_CALLBACK_URL= 142 | 143 | ### Change this env variable only if you are using a custom build mobile app 144 | ## Mobile app env variables 145 | IOS_APP_ID=L7YLMN4634.com.chatwoot.app 146 | ANDROID_BUNDLE_ID=com.chatwoot.app 147 | 148 | # https://developers.google.com/android/guides/client-auth (use keytool to print the fingerprint in the first section) 149 | ANDROID_SHA256_CERT_FINGERPRINT=AC:73:8E:DE:EB:56:EA:CC:10:87:02:A7:65:37:7B:38:D4:5D:D4:53:F8:3B:FB:D3:C6:28:64:1D:AA:08:1E:D8 150 | 151 | ### Smart App Banner 152 | # https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html 153 | # You can find your app-id in https://itunesconnect.apple.com 154 | #IOS_APP_IDENTIFIER=1495796682 155 | 156 | ## Push Notification 157 | ## generate a new key value here : https://d3v.one/vapid-key-generator/ 158 | # VAPID_PUBLIC_KEY= 159 | # VAPID_PRIVATE_KEY= 160 | # 161 | # for mobile apps 162 | # FCM_SERVER_KEY= 163 | 164 | ### APM and Error Monitoring configurations 165 | ## Elastic APM 166 | ## https://www.elastic.co/guide/en/apm/agent/ruby/current/getting-started-rails.html 167 | # ELASTIC_APM_SERVER_URL= 168 | # ELASTIC_APM_SECRET_TOKEN= 169 | 170 | ## Sentry 171 | # SENTRY_DSN= 172 | 173 | ## LogRocket 174 | # LOG_ROCKET_PROJECT_ID=xxxxx/some-project 175 | 176 | # MICROSOFT CLARITY 177 | # MS_CLARITY_TOKEN=xxxxxxxxx 178 | 179 | ## Scout 180 | ## https://scoutapm.com/docs/ruby/configuration 181 | # SCOUT_KEY=YOURKEY 182 | # SCOUT_NAME=YOURAPPNAME (Production) 183 | # SCOUT_MONITOR=true 184 | 185 | ## NewRelic 186 | # https://docs.newrelic.com/docs/agents/ruby-agent/configuration/ruby-agent-configuration/ 187 | # NEW_RELIC_LICENSE_KEY= 188 | # Set this to true to allow newrelic apm to send logs. 189 | # This is turned off by default. 190 | # NEW_RELIC_APPLICATION_LOGGING_ENABLED= 191 | 192 | ## Datadog 193 | ## https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#environment-variables 194 | # DD_TRACE_AGENT_URL= 195 | 196 | # MaxMindDB API key to download GeoLite2 City database 197 | # IP_LOOKUP_API_KEY= 198 | 199 | ## Rack Attack configuration 200 | ## To prevent and throttle abusive requests 201 | # ENABLE_RACK_ATTACK=true 202 | 203 | ## Running chatwoot as an API only server 204 | ## setting this value to true will disable the frontend dashboard endpoints 205 | # CW_API_ONLY_SERVER=false 206 | 207 | ## Development Only Config 208 | # if you want to use letter_opener for local emails 209 | # LETTER_OPENER=true 210 | # meant to be used in github codespaces 211 | # WEBPACKER_DEV_SERVER_PUBLIC= 212 | 213 | # If you want to use official mobile app, 214 | # the notifications would be relayed via a Chatwoot server 215 | ENABLE_PUSH_RELAY_SERVER=true 216 | 217 | # Stripe API key 218 | STRIPE_SECRET_KEY= 219 | STRIPE_WEBHOOK_SECRET= 220 | 221 | # Set to true if you want to upload files to cloud storage using the signed url 222 | # Make sure to follow https://edgeguides.rubyonrails.org/active_storage_overview.html#cross-origin-resource-sharing-cors-configuration on the cloud storage after setting this to true. 223 | DIRECT_UPLOADS_ENABLED= 224 | 225 | #MS OAUTH creds 226 | AZURE_APP_ID= 227 | AZURE_APP_SECRET= 228 | 229 | ## Advanced configurations 230 | ## Change these values to fine tune performance 231 | # control the concurrency setting of sidekiq 232 | # SIDEKIQ_CONCURRENCY=10 233 | -------------------------------------------------------------------------------- /Chatwoot/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Chatwoot 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /ChiefOnboarding/django.mo: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/ChiefOnboarding/django.mo -------------------------------------------------------------------------------- /ChiefOnboarding/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | db: 5 | image: postgres:15 6 | container_name: chiefonboarding-db 7 | restart: always 8 | volumes: 9 | - ./data:/var/lib/postgresql/data/ 10 | environment: 11 | - POSTGRES_DB=chiefonboarding 12 | - POSTGRES_USER=postgres 13 | - POSTGRES_PASSWORD=postgres 14 | 15 | web: 16 | image: chiefonboarding/chiefonboarding:latest 17 | container_name: chiefonboarding-web 18 | restart: always 19 | ports: 20 | - 8203:8000 21 | environment: 22 | #- DEBUG=True 23 | - HTTP_INSECURE=True 24 | - SECRET_KEY=somethingsupersecret 25 | - BASE_URL=http://192.168.0.197:8203 26 | - DATABASE_URL=postgres://postgres:postgres@db:5432/chiefonboarding 27 | - ALLOWED_HOSTS=192.168.0.197 28 | depends_on: 29 | - db 30 | -------------------------------------------------------------------------------- /DataEase/conf/application.yml: -------------------------------------------------------------------------------- 1 | server: 2 | tomcat: 3 | connection-timeout: 70000 4 | spring: 5 | servlet: 6 | multipart: 7 | max-file-size: 500MB 8 | max-request-size: 500MB 9 | datasource: 10 | url: jdbc:mysql://${DE_MYSQL_HOST}:${DE_MYSQL_PORT}/${DE_MYSQL_DB}?${DE_MYSQL_PARAMS} 11 | username: ${DE_MYSQL_USER} 12 | password: ${DE_MYSQL_PASSWORD} 13 | -------------------------------------------------------------------------------- /DataEase/conf/install.conf: -------------------------------------------------------------------------------- 1 | # 基础配置 2 | ## 安装目录 3 | DE_BASE=/opt 4 | ## Service 端口 5 | DE_PORT=8100 6 | ## 登录超时时间,单位min。如果不设置则默认8小时,也就是480 7 | DE_LOGIN_TIMEOUT=480 8 | ## 安装模式 9 | DE_INSTALL_MODE=community 10 | 11 | # 数据库配置 12 | ## 是否使用外部数据库 13 | DE_EXTERNAL_MYSQL=false 14 | ## 数据库地址 15 | DE_MYSQL_HOST=mysql 16 | ## 数据库端口 17 | DE_MYSQL_PORT=3306 18 | ## DataEase 数据库库名 19 | DE_MYSQL_DB=dataease 20 | ## 数据库用户名 21 | DE_MYSQL_USER=root 22 | ## 数据库密码 23 | DE_MYSQL_PASSWORD=123456 24 | ## 数据库参数 25 | DE_MYSQL_PARAMS="autoReconnect=false&useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true" 26 | -------------------------------------------------------------------------------- /DataEase/conf/my.conf: -------------------------------------------------------------------------------- 1 | [mysqld] 2 | datadir=/var/lib/mysql 3 | 4 | default-storage-engine=INNODB 5 | character_set_server=utf8 6 | #lower_case_table_names=1 7 | table_open_cache=128 8 | max_connections=2000 9 | max_connect_errors=6000 10 | innodb_file_per_table=1 11 | innodb_buffer_pool_size=1G 12 | max_allowed_packet=64M 13 | transaction_isolation=READ-COMMITTED 14 | innodb_flush_method=O_DIRECT 15 | innodb_lock_wait_timeout=1800 16 | innodb_flush_log_at_trx_commit=0 17 | sync_binlog=0 18 | #group_concat_max_len=1024000 19 | max_allowed_packet=100000000 20 | 21 | sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION 22 | 23 | skip-name-resolve 24 | 25 | [mysql] 26 | default-character-set=utf8 27 | 28 | [mysql.server] 29 | default-character-set=utf8 30 | -------------------------------------------------------------------------------- /DataEase/dataease2.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/DataEase/dataease2.zip -------------------------------------------------------------------------------- /DataEase/dataease_standalone.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/DataEase/dataease_standalone.zip -------------------------------------------------------------------------------- /DataEase/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '2.1' 2 | 3 | services: 4 | dataease1: 5 | image: registry.cn-qingdao.aliyuncs.com/dataease/dataease:v2.5.0 6 | container_name: dataease-app 7 | ports: 8 | - 8100:8100 9 | volumes: 10 | - ./conf:/opt/apps/config 11 | - ./logs:/opt/dataease2.0/logs 12 | - ./data/static-resource:/opt/dataease2.0/data/static-resource 13 | - ./cache:/opt/dataease2.0/cache 14 | - ./data/geo:/opt/dataease2.0/data/geo 15 | - ./data/appearance:/opt/dataease2.0/data/appearance 16 | env_file: 17 | - ./conf/install.conf 18 | depends_on: 19 | - mysql 20 | 21 | mysql: 22 | image: registry.cn-qingdao.aliyuncs.com/dataease/mysql:8.3.0 23 | container_name: dataease-mysql 24 | #ports: 25 | # - 3306:3306 26 | environment: 27 | # - MYSQL_DATABASE=dataease 28 | - MYSQL_ROOT_PASSWORD=123456 29 | volumes: 30 | - ./conf/my.conf:/etc/mysql/conf.d/my.cnf 31 | - ./mysql:/docker-entrypoint-initdb.d/ 32 | - ./db:/var/lib/mysql 33 | -------------------------------------------------------------------------------- /DataEase/mysql/init.sql: -------------------------------------------------------------------------------- 1 | CREATE DATABASE `dataease` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; 2 | -------------------------------------------------------------------------------- /DataEase/readme.md: -------------------------------------------------------------------------------- 1 | 单实例执行下面的命令,可下载 dataease_standalone.zip 研究 2 | 3 | ```bash 4 | # 新建文件夹 dataease 和 子目录 5 | mkdir -p /volume1/docker/dataease/{cache,conf,data/{appearance,geo,static-resource},db,logs,mysql} 6 | 7 | # 进入 dataease 目录 8 | cd /volume1/docker/dataease 9 | 10 | # 将 docker-compose.yml 放入当前目录 11 | # 将 init.sql 放入 /mysql 目录 12 | # 将 application.yml、install.conf、my.conf 放入 /conf 目录 13 | 14 | # 一键启动 15 | docker-compose up -d 16 | ``` 17 | 双实例执行下面的命令,可下载 dataease2.zip 研究 18 | 19 | ```bash 20 | # 新建文件夹 dataease2 和 子目录 21 | mkdir -p /volume1/docker/dataease2/{one/{cache,data/{appearance,geo,static-resource},db,logs},two/{cache,data/{appearance,geo,static-resource},db,logs},conf,mysql} 22 | 23 | # 进入 dataease2 目录 24 | cd /volume1/docker/dataease2 25 | 26 | # 将 docker-compose.yml 放入当前目录 27 | # 将 init.sql 放入 /mysql 目录 28 | # 将 application.yml、install1.conf、install2.conf、my.conf 放入 /conf 目录 29 | 30 | # 一键启动 31 | docker-compose up -d 32 | 33 | # 如果出现连不上数据库,可以先启动数据库 34 | docker-compose up -d mysql-one mysql-two 35 | 36 | # 然后再启动其他的 37 | docker-compose up -d 38 | ``` 39 | -------------------------------------------------------------------------------- /Dify/dify.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/Dify/dify.zip -------------------------------------------------------------------------------- /Dify/nginx/conf.d/default.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen 80; 3 | server_name _; 4 | 5 | location /console/api { 6 | proxy_pass http://api:5001; 7 | include proxy.conf; 8 | } 9 | 10 | location /api { 11 | proxy_pass http://api:5001; 12 | include proxy.conf; 13 | } 14 | 15 | location /v1 { 16 | proxy_pass http://api:5001; 17 | include proxy.conf; 18 | } 19 | 20 | location /files { 21 | proxy_pass http://api:5001; 22 | include proxy.conf; 23 | } 24 | 25 | location / { 26 | proxy_pass http://web:3000; 27 | include proxy.conf; 28 | } 29 | 30 | # If you want to support HTTPS, please uncomment the code snippet below 31 | #listen 443 ssl; 32 | #ssl_certificate ./../ssl/your_cert_file.cer; 33 | #ssl_certificate_key ./../ssl/your_cert_key.key; 34 | #ssl_protocols TLSv1.1 TLSv1.2 TLSv1.3; 35 | #ssl_prefer_server_ciphers on; 36 | #ssl_session_cache shared:SSL:10m; 37 | #ssl_session_timeout 10m; 38 | } 39 | -------------------------------------------------------------------------------- /Dify/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | user nginx; 2 | worker_processes auto; 3 | 4 | error_log /var/log/nginx/error.log notice; 5 | pid /var/run/nginx.pid; 6 | 7 | 8 | events { 9 | worker_connections 1024; 10 | } 11 | 12 | 13 | http { 14 | include /etc/nginx/mime.types; 15 | default_type application/octet-stream; 16 | 17 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 18 | '$status $body_bytes_sent "$http_referer" ' 19 | '"$http_user_agent" "$http_x_forwarded_for"'; 20 | 21 | access_log /var/log/nginx/access.log main; 22 | 23 | sendfile on; 24 | #tcp_nopush on; 25 | 26 | keepalive_timeout 65; 27 | 28 | #gzip on; 29 | client_max_body_size 15M; 30 | 31 | include /etc/nginx/conf.d/*.conf; 32 | } 33 | -------------------------------------------------------------------------------- /Dify/nginx/proxy.conf: -------------------------------------------------------------------------------- 1 | proxy_set_header Host $host; 2 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 3 | proxy_set_header X-Forwarded-Proto $scheme; 4 | proxy_http_version 1.1; 5 | proxy_set_header Connection ""; 6 | proxy_buffering off; 7 | proxy_read_timeout 3600s; 8 | proxy_send_timeout 3600s; 9 | -------------------------------------------------------------------------------- /Dify/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Dify 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.tech](https://laosu.tech) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /ERPNext/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | backend: 5 | image: frappe/erpnext:${APP_VERSION} 6 | container_name: ${APP_NAME}-backend 7 | deploy: 8 | restart_policy: 9 | condition: on-failure 10 | volumes: 11 | - sites:/home/frappe/frappe-bench/sites 12 | - logs:/home/frappe/frappe-bench/logs 13 | 14 | configurator: 15 | image: frappe/erpnext:${APP_VERSION} 16 | container_name: ${APP_NAME}-configurator 17 | deploy: 18 | restart_policy: 19 | condition: none 20 | entrypoint: 21 | - bash 22 | - -c 23 | depends_on: 24 | - db 25 | command: 26 | - > 27 | ls -1 apps > sites/apps.txt; 28 | bench set-config -g db_host $$DB_HOST; 29 | bench set-config -gp db_port $$DB_PORT; 30 | bench set-config -g redis_cache "redis://$$REDIS_CACHE"; 31 | bench set-config -g redis_queue "redis://$$REDIS_QUEUE"; 32 | bench set-config -g redis_socketio "redis://$$REDIS_SOCKETIO"; 33 | bench set-config -gp socketio_port $$SOCKETIO_PORT; 34 | environment: 35 | DB_HOST: db 36 | DB_PORT: "3306" 37 | REDIS_CACHE: redis-cache:6379 38 | REDIS_QUEUE: redis-queue:6379 39 | REDIS_SOCKETIO: redis-socketio:6379 40 | SOCKETIO_PORT: "9000" 41 | volumes: 42 | - sites:/home/frappe/frappe-bench/sites 43 | - logs:/home/frappe/frappe-bench/logs 44 | 45 | create-site: 46 | image: frappe/erpnext:${APP_VERSION} 47 | container_name: ${APP_NAME}-create-site 48 | depends_on: 49 | - configurator 50 | deploy: 51 | restart_policy: 52 | condition: none 53 | volumes: 54 | - sites:/home/frappe/frappe-bench/sites 55 | - logs:/home/frappe/frappe-bench/logs 56 | entrypoint: 57 | - bash 58 | - -c 59 | command: 60 | - > 61 | wait-for-it -t 240 db:3306; 62 | wait-for-it -t 120 redis-cache:6379; 63 | wait-for-it -t 120 redis-queue:6379; 64 | wait-for-it -t 120 redis-socketio:6379; 65 | export start=`date +%s`; 66 | until [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".db_host // empty"` ]] && \ 67 | [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_cache // empty"` ]] && \ 68 | [[ -n `grep -hs ^ sites/common_site_config.json | jq -r ".redis_queue // empty"` ]]; 69 | do 70 | echo "Waiting for sites/common_site_config.json to be created"; 71 | sleep 5; 72 | if (( `date +%s`-start > 120 )); then 73 | echo "could not find sites/common_site_config.json with required keys"; 74 | exit 1 75 | fi 76 | done; 77 | echo "sites/common_site_config.json found"; 78 | bench new-site frontend --no-mariadb-socket --admin-password=${APP_PASSWORD} --db-root-password=${DB_ROOT_PASSWORD} --install-app erpnext --set-default; 79 | 80 | db: 81 | image: mariadb:10.6 82 | container_name: ${APP_NAME}-db 83 | healthcheck: 84 | test: mysqladmin ping -h localhost --password=${DB_PASSWORD} 85 | interval: 1s 86 | retries: 15 87 | deploy: 88 | restart_policy: 89 | condition: on-failure 90 | command: 91 | - --character-set-server=utf8mb4 92 | - --collation-server=utf8mb4_unicode_ci 93 | - --skip-character-set-client-handshake 94 | - --skip-innodb-read-only-compressed # Temporary fix for MariaDB 10.6 95 | environment: 96 | MYSQL_ROOT_PASSWORD: ${DB_ROOT_PASSWORD} 97 | volumes: 98 | - ./data:/var/lib/mysql 99 | #ports: 100 | # - "${DB_PORT}:3306" 101 | 102 | frontend: 103 | image: frappe/erpnext:${APP_VERSION} 104 | container_name: ${APP_NAME}-frontend 105 | deploy: 106 | restart_policy: 107 | condition: on-failure 108 | command: 109 | - nginx-entrypoint.sh 110 | environment: 111 | BACKEND: backend:8000 112 | FRAPPE_SITE_NAME_HEADER: frontend 113 | SOCKETIO: websocket:9000 114 | UPSTREAM_REAL_IP_ADDRESS: ${APP_HTTP_IP} 115 | UPSTREAM_REAL_IP_HEADER: X-Forwarded-For 116 | UPSTREAM_REAL_IP_RECURSIVE: "off" 117 | PROXY_READ_TIMOUT: 120 118 | CLIENT_MAX_BODY_SIZE: 50m 119 | volumes: 120 | - sites:/home/frappe/frappe-bench/sites 121 | - logs:/home/frappe/frappe-bench/logs 122 | ports: 123 | - "${APP_HTTP_PORT}:8080" 124 | 125 | queue-default: 126 | image: frappe/erpnext:${APP_VERSION} 127 | container_name: ${APP_NAME}-queue-default 128 | deploy: 129 | restart_policy: 130 | condition: on-failure 131 | command: 132 | - bench 133 | - worker 134 | - --queue 135 | - default 136 | volumes: 137 | - sites:/home/frappe/frappe-bench/sites 138 | - logs:/home/frappe/frappe-bench/logs 139 | 140 | queue-long: 141 | image: frappe/erpnext:${APP_VERSION} 142 | container_name: ${APP_NAME}-queue-long 143 | deploy: 144 | restart_policy: 145 | condition: on-failure 146 | command: 147 | - bench 148 | - worker 149 | - --queue 150 | - long 151 | volumes: 152 | - sites:/home/frappe/frappe-bench/sites 153 | - logs:/home/frappe/frappe-bench/logs 154 | 155 | queue-short: 156 | image: frappe/erpnext:${APP_VERSION} 157 | container_name: ${APP_NAME}-queue-short 158 | deploy: 159 | restart_policy: 160 | condition: on-failure 161 | command: 162 | - bench 163 | - worker 164 | - --queue 165 | - short 166 | volumes: 167 | - sites:/home/frappe/frappe-bench/sites 168 | - logs:/home/frappe/frappe-bench/logs 169 | 170 | redis-queue: 171 | image: redis:6.2-alpine 172 | container_name: ${APP_NAME}-redis-queue 173 | deploy: 174 | restart_policy: 175 | condition: on-failure 176 | volumes: 177 | - ./redis-queue-data:/data 178 | 179 | redis-cache: 180 | image: redis:6.2-alpine 181 | container_name: ${APP_NAME}-redis-cache 182 | deploy: 183 | restart_policy: 184 | condition: on-failure 185 | volumes: 186 | - ./redis-cache-data:/data 187 | 188 | redis-socketio: 189 | image: redis:6.2-alpine 190 | container_name: ${APP_NAME}-redis-socketio 191 | deploy: 192 | restart_policy: 193 | condition: on-failure 194 | volumes: 195 | - ./redis-socketio-data:/data 196 | 197 | scheduler: 198 | image: frappe/erpnext:${APP_VERSION} 199 | container_name: ${APP_NAME}-scheduler 200 | deploy: 201 | restart_policy: 202 | condition: on-failure 203 | command: 204 | - bench 205 | - schedule 206 | volumes: 207 | - sites:/home/frappe/frappe-bench/sites 208 | - logs:/home/frappe/frappe-bench/logs 209 | 210 | websocket: 211 | image: frappe/erpnext:${APP_VERSION} 212 | container_name: ${APP_NAME}-websocket 213 | deploy: 214 | restart_policy: 215 | condition: on-failure 216 | command: 217 | - node 218 | - /home/frappe/frappe-bench/apps/frappe/socketio.js 219 | volumes: 220 | - sites:/home/frappe/frappe-bench/sites 221 | - logs:/home/frappe/frappe-bench/logs 222 | 223 | volumes: 224 | logs: 225 | sites: 226 | -------------------------------------------------------------------------------- /ERPNext/env.txt: -------------------------------------------------------------------------------- 1 | # ERPNext config 2 | APP_NAME=erp 3 | APP_VERSION=v14.23.0 4 | APP_HTTP_IP=192.168.0.197 5 | APP_HTTP_PORT=6380 6 | APP_PASSWORD=admin 7 | 8 | # MariaDB config 9 | DB_HOST=db 10 | DB_PASSWORD=twj9nwyoutRei9C4VV 11 | DB_ROOT_PASSWORD=4aixKdghP3j56hPB8k 12 | DB_PORT=3336 13 | -------------------------------------------------------------------------------- /ERPNext/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 ERPNext 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /FastGPT/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "feConfigs": { 3 | "lafEnv": "https://laf.dev" 4 | }, 5 | "systemEnv": { 6 | "openapiPrefix": "fastgpt", 7 | "vectorMaxProcess": 15, 8 | "qaMaxProcess": 15, 9 | "pgHNSWEfSearch": 100 10 | }, 11 | "llmModels": [ 12 | { 13 | "model": "moonshot-v1-8k", 14 | "name": "moonshot-v1-8k", 15 | "maxContext": 16000, 16 | "avatar": "/imgs/model/moonshot.svg", 17 | "maxResponse": 4000, 18 | "quoteMaxToken": 13000, 19 | "maxTemperature": 1.2, 20 | "charsPointsPrice": 0, 21 | "censor": false, 22 | "vision": false, 23 | "datasetProcess": true, 24 | "usedInClassify": true, 25 | "usedInExtractFields": true, 26 | "usedInToolCall": true, 27 | "usedInQueryExtension": true, 28 | "toolChoice": true, 29 | "functionCall": true, 30 | "customCQPrompt": "", 31 | "customExtractPrompt": "", 32 | "defaultSystemChatPrompt": "", 33 | "defaultConfig": {} 34 | }, 35 | { 36 | "model": "moonshot-v1-32k", 37 | "name": "moonshot-v1-32k", 38 | "avatar": "/imgs/model/moonshot.svg", 39 | "maxContext": 125000, 40 | "maxResponse": 4000, 41 | "quoteMaxToken": 100000, 42 | "maxTemperature": 1.2, 43 | "charsPointsPrice": 0, 44 | "censor": false, 45 | "vision": false, 46 | "datasetProcess": false, 47 | "usedInClassify": true, 48 | "usedInExtractFields": true, 49 | "usedInToolCall": true, 50 | "usedInQueryExtension": true, 51 | "toolChoice": true, 52 | "functionCall": false, 53 | "customCQPrompt": "", 54 | "customExtractPrompt": "", 55 | "defaultSystemChatPrompt": "", 56 | "defaultConfig": {} 57 | }, 58 | { 59 | "model": "moonshot-v1-128k", 60 | "name": "moonshot-v1-128k", 61 | "avatar": "/imgs/model/moonshot.svg", 62 | "maxContext": 128000, 63 | "maxResponse": 4000, 64 | "quoteMaxToken": 100000, 65 | "maxTemperature": 1.2, 66 | "charsPointsPrice": 0, 67 | "censor": false, 68 | "vision": true, 69 | "datasetProcess": false, 70 | "usedInClassify": false, 71 | "usedInExtractFields": false, 72 | "usedInToolCall": false, 73 | "usedInQueryExtension": false, 74 | "toolChoice": true, 75 | "functionCall": false, 76 | "customCQPrompt": "", 77 | "customExtractPrompt": "", 78 | "defaultSystemChatPrompt": "", 79 | "defaultConfig": {} 80 | } 81 | ], 82 | "vectorModels": [ 83 | { 84 | "model": "m3e", 85 | "name": "M3E", 86 | "price": 0.1, 87 | "defaultToken": 500, 88 | "maxToken": 1800 89 | } 90 | ], 91 | "reRankModels": [], 92 | "audioSpeechModels": [ 93 | { 94 | "model": "tts-1", 95 | "name": "OpenAI TTS1", 96 | "charsPointsPrice": 0, 97 | "voices": [ 98 | { 99 | "label": "Alloy", 100 | "value": "alloy", 101 | "bufferId": "openai-Alloy" 102 | }, 103 | { 104 | "label": "Echo", 105 | "value": "echo", 106 | "bufferId": "openai-Echo" 107 | }, 108 | { 109 | "label": "Fable", 110 | "value": "fable", 111 | "bufferId": "openai-Fable" 112 | }, 113 | { 114 | "label": "Onyx", 115 | "value": "onyx", 116 | "bufferId": "openai-Onyx" 117 | }, 118 | { 119 | "label": "Nova", 120 | "value": "nova", 121 | "bufferId": "openai-Nova" 122 | }, 123 | { 124 | "label": "Shimmer", 125 | "value": "shimmer", 126 | "bufferId": "openai-Shimmer" 127 | } 128 | ] 129 | } 130 | ], 131 | "whisperModel": { 132 | "model": "whisper-1", 133 | "name": "Whisper1", 134 | "charsPointsPrice": 0 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /FastGPT/config(kimi-free-api).json: -------------------------------------------------------------------------------- 1 | { 2 | "feConfigs": { 3 | "lafEnv": "https://laf.dev" 4 | }, 5 | "systemEnv": { 6 | "openapiPrefix": "fastgpt", 7 | "vectorMaxProcess": 15, 8 | "qaMaxProcess": 15, 9 | "pgHNSWEfSearch": 100 10 | }, 11 | "llmModels": [ 12 | { 13 | "model": "kimi", 14 | "name": "kimi-free", 15 | "avatar": "/imgs/model/moonshot.svg", 16 | "maxContext": 128000, 17 | "maxResponse": 4000, 18 | "quoteMaxToken": 100000, 19 | "maxTemperature": 1.2, 20 | "charsPointsPrice": 0, 21 | "censor": false, 22 | "vision": true, 23 | "datasetProcess": false, 24 | "usedInClassify": false, 25 | "usedInExtractFields": false, 26 | "usedInToolCall": false, 27 | "usedInQueryExtension": false, 28 | "toolChoice": true, 29 | "functionCall": false, 30 | "customCQPrompt": "", 31 | "customExtractPrompt": "", 32 | "defaultSystemChatPrompt": "", 33 | "defaultConfig": {} 34 | } 35 | ], 36 | "vectorModels": [ 37 | { 38 | "model": "m3e", 39 | "name": "M3E", 40 | "price": 0.1, 41 | "defaultToken": 500, 42 | "maxToken": 1800 43 | } 44 | ], 45 | "reRankModels": [], 46 | "audioSpeechModels": [ 47 | { 48 | "model": "tts-1", 49 | "name": "OpenAI TTS1", 50 | "charsPointsPrice": 0, 51 | "voices": [ 52 | { 53 | "label": "Alloy", 54 | "value": "alloy", 55 | "bufferId": "openai-Alloy" 56 | }, 57 | { 58 | "label": "Echo", 59 | "value": "echo", 60 | "bufferId": "openai-Echo" 61 | }, 62 | { 63 | "label": "Fable", 64 | "value": "fable", 65 | "bufferId": "openai-Fable" 66 | }, 67 | { 68 | "label": "Onyx", 69 | "value": "onyx", 70 | "bufferId": "openai-Onyx" 71 | }, 72 | { 73 | "label": "Nova", 74 | "value": "nova", 75 | "bufferId": "openai-Nova" 76 | }, 77 | { 78 | "label": "Shimmer", 79 | "value": "shimmer", 80 | "bufferId": "openai-Shimmer" 81 | } 82 | ] 83 | } 84 | ], 85 | "whisperModel": { 86 | "model": "whisper-1", 87 | "name": "Whisper1", 88 | "charsPointsPrice": 0 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /FastGPT/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.3' 2 | 3 | services: 4 | pg: 5 | image: ankane/pgvector:v0.5.0 # git 6 | #image: registry.cn-hangzhou.aliyuncs.com/fastgpt/pgvector:v0.5.0 # 阿里云 7 | container_name: fastgpt-pg 8 | restart: always 9 | #ports: 10 | # - 5432:5432 11 | volumes: 12 | - ./pdata:/var/lib/postgresql/data 13 | environment: 14 | # 这里的配置只有首次运行生效。修改后,重启镜像是不会生效的。需要把持久化数据删除再重启,才有效果 15 | - POSTGRES_USER=username 16 | - POSTGRES_PASSWORD=password 17 | - POSTGRES_DB=postgres 18 | 19 | mongo: 20 | image: mongo:5.0.18 21 | #image: registry.cn-hangzhou.aliyuncs.com/fastgpt/mongo:5.0.18 22 | container_name: fastgpt-mongo 23 | restart: always 24 | #ports: 25 | # - 27017:27017 26 | volumes: 27 | - ./mdata:/data/db 28 | environment: 29 | - MONGO_INITDB_ROOT_USERNAME=myusername 30 | - MONGO_INITDB_ROOT_PASSWORD=mypassword 31 | command: mongod --keyFile /data/mongodb.key --replSet rs0 32 | entrypoint: 33 | - bash 34 | - -c 35 | - | 36 | openssl rand -base64 128 > /data/mongodb.key 37 | chmod 400 /data/mongodb.key 38 | chown 999:999 /data/mongodb.key 39 | echo 'const isInited = rs.status().ok === 1 40 | if(!isInited){ 41 | rs.initiate({ 42 | _id: "rs0", 43 | members: [ 44 | { _id: 0, host: "mongo:27017" } 45 | ] 46 | }) 47 | }' > /data/initReplicaSet.js 48 | # 启动MongoDB服务 49 | exec docker-entrypoint.sh "$$@" & 50 | 51 | # 等待MongoDB服务启动 52 | until mongo -u myusername -p mypassword --authenticationDatabase admin --eval "print('waited for connection')" > /dev/null 2>&1; do 53 | echo "Waiting for MongoDB to start..." 54 | sleep 2 55 | done 56 | 57 | # 执行初始化副本集的脚本 58 | mongo -u myusername -p mypassword --authenticationDatabase admin /data/initReplicaSet.js 59 | 60 | # 等待docker-entrypoint.sh脚本执行的MongoDB服务进程 61 | wait $$! 62 | 63 | fastgpt: 64 | image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.7 # git 65 | #image: registry.cn-hangzhou.aliyuncs.com/fastgpt/fastgpt:v4.7 # 阿里云 66 | container_name: fastgpt-web 67 | restart: always 68 | depends_on: 69 | - mongo 70 | - pg 71 | ports: 72 | - 3155:3000 73 | volumes: 74 | - ./config.json:/app/data/config.json 75 | - ./tmp:/app/tmp 76 | environment: 77 | # root 密码,用户名为: root。如果需要修改 root 密码,直接修改这个环境变量,并重启即可。 78 | - DEFAULT_ROOT_PSW=1234 79 | # AI模型的API地址哦。务必加 /v1。这里默认填写了OneApi的访问地址。 80 | - OPENAI_BASE_URL=http://192.168.0.197:3033/v1 81 | # AI模型的API Key。这里填写OneApi的令牌 82 | - CHAT_API_KEY=sk-bn6M52bOfdxYB3n2Ee717eA2C66b45318f1c95E4D9553d94 83 | # 数据库最大连接数 84 | - DB_MAX_LINK=30 85 | # 登录凭证密钥 86 | - TOKEN_KEY=any 87 | # root的密钥,常用于升级时候的初始化请求 88 | - ROOT_KEY=root_key 89 | # 文件阅读加密 90 | - FILE_TOKEN_KEY=filetoken 91 | # MongoDB 连接参数. 用户名myusername,密码mypassword。 92 | - MONGODB_URI=mongodb://myusername:mypassword@mongo:27017/fastgpt?authSource=admin 93 | # pg 连接参数 94 | - PG_URL=postgresql://username:password@pg:5432/postgres 95 | -------------------------------------------------------------------------------- /FastGPT/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 FastGPT 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /Helper/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.3" 2 | 3 | services: 4 | sqldb: 5 | image: mysql:5.7 6 | container_name: helper-mysql 7 | volumes: 8 | - ./data:/var/lib/mysql 9 | environment: 10 | - MYSQL_DATABASE=helper 11 | - MYSQL_USER=helper 12 | - MYSQL_PASSWORD=helper 13 | - MYSQL_ROOT_PASSWORD=helper 14 | command: --default-storage-engine innodb 15 | restart: unless-stopped 16 | healthcheck: 17 | test: mysqladmin -p$$MYSQL_ROOT_PASSWORD ping -h localhost 18 | interval: 20s 19 | start_period: 10s 20 | timeout: 10s 21 | retries: 3 22 | 23 | helper: 24 | image: eloufirhatim/helper:latest 25 | container_name: helper-server 26 | environment: 27 | - DB_CONNECTION=mysql 28 | - DB_HOST=sqldb 29 | - DB_PORT=3306 30 | - DB_DATABASE=helper 31 | - DB_USERNAME=helper 32 | - DB_PASSWORD=helper 33 | - MAIL_MAILER=smtp 34 | - MAIL_HOST=smtp.88.com 35 | - MAIL_PORT=25 36 | - MAIL_USERNAME=wbsu2003@88.com 37 | - MAIL_PASSWORD=<你的第三方邮件客户端密码> 38 | - MAIL_FROM_ADDRESS=wbsu2003@88.com 39 | - MAIL_ENCRYPTION=null 40 | depends_on: 41 | - sqldb 42 | restart: "no" 43 | ports: 44 | - 8114:8000 45 | volumes: 46 | - /etc/localtime:/etc/localtime 47 | -------------------------------------------------------------------------------- /Helper/lang.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/Helper/lang.zip -------------------------------------------------------------------------------- /Helper/lang/fr/auth.php: -------------------------------------------------------------------------------- 1 | '这些凭据与我们的记录不匹配。', 17 | 'password' => '提供的密码不正确。', 18 | 'throttle' => '登录尝试次数过多,请在 :seconds 秒后重试。', 19 | 20 | ]; 21 | -------------------------------------------------------------------------------- /Helper/lang/fr/pagination.php: -------------------------------------------------------------------------------- 1 | '« 上一条', 17 | 'next' => '下一条 »', 18 | 19 | ]; 20 | -------------------------------------------------------------------------------- /Helper/lang/fr/passwords.php: -------------------------------------------------------------------------------- 1 | '您的密码已被重置!', 17 | 'sent' => '我们已通过电子邮件向您发送了重置密码的链接!', 18 | 'throttled' => '请稍后再试。', 19 | 'token' => '此密码重置令牌无效。', 20 | 'user' => '找不到使用此电子邮件地址的用户。', 21 | ]; 22 | -------------------------------------------------------------------------------- /Helper/lang/fr/validation.php: -------------------------------------------------------------------------------- 1 | '字段 :attribute 必须被接受。', 16 | 'active_url' => '字段 :attribute 不是一个有效的 URL。', 17 | 'after' => '字段 :attribute 必须是 :date 之后的日期。', 18 | 'after_or_equal' => '字段 :attribute 必须是 :date 之后或等于 :date 的日期。', 19 | 'alpha' => '字段 :attribute 只能包含字母。', 20 | 'alpha_dash' => '字段 :attribute 只能包含字母、数字和破折号。', 21 | 'alpha_num' => '字段 :attribute 只能包含字母和数字。', 22 | 'array' => '字段 :attribute 必须是一个数组。', 23 | 'before' => '字段 :attribute 必须是 :date 之前的日期。', 24 | 'before_or_equal' => '字段 :attribute 必须是 :date 之前或等于 :date 的日期。', 25 | 'between' => [ 26 | 'numeric' => '字段 :attribute 的值必须介于 :min 和 :max 之间。', 27 | 'file' => '字段 :attribute 的文件大小必须介于 :min 和 :max 千字节之间。', 28 | 'string' => '字段 :attribute 的文本长度必须介于 :min 和 :max 个字符之间。', 29 | 'array' => '字段 :attribute 的数组元素个数必须介于 :min 和 :max 之间。', 30 | ], 31 | 'boolean' => '字段 :attribute 必须是 true 或 false。', 32 | 'confirmed' => '字段 :attribute 的确认字段不匹配。', 33 | 'date' => '字段 :attribute 不是一个有效的日期。', 34 | 'date_equals' => '字段 :attribute 必须等于 :date。', 35 | 'date_format' => '字段 :attribute 不符合格式 :format。', 36 | 'different' => '字段 :attribute 和 :other 必须不同。', 37 | 'digits' => '字段 :attribute 必须是 :digits 位数。', 38 | 'digits_between' => '字段 :attribute 必须介于 :min 和 :max 位数之间。', 39 | 'dimensions' => '字段 :attribute 的图像尺寸无效。', 40 | 'distinct' => '字段 :attribute 的值重复。', 41 | 'email' => '字段 :attribute 必须是一个有效的电子邮件地址。', 42 | 'ends_with' => '字段 :attribute 必须以以下值之一结尾::values', 43 | 'exists' => '选择的字段 :attribute 无效。', 44 | 'file' => '字段 :attribute 必须是一个文件。', 45 | 'filled' => '字段 :attribute 必须有一个值。', 46 | 'gt' => [ 47 | 'numeric' => '字段 :attribute 的值必须大于 :value。', 48 | 'file' => '字段 :attribute 的文件大小必须大于 :value 千字节。', 49 | 'string' => '字段 :attribute 的文本长度必须大于 :value 个字符。', 50 | 'array' => '字段 :attribute 的数组元素个数必须大于 :value。', 51 | ], 52 | 'gte' => [ 53 | 'numeric' => '字段 :attribute 的值必须大于或等于 :value。', 54 | 'file' => '字段 :attribute 的文件大小必须大于或等于 :value 千字节。', 55 | 'string' => '字段 :attribute 的文本长度必须至少为 :value 个字符。', 56 | 'array' => '字段 :attribute 的数组元素个数必须至少为 :value。', 57 | ], 58 | 'image' => '字段 :attribute 必须是一个图像。', 59 | 'in' => '字段 :attribute 无效。', 60 | 'in_array' => '字段 :attribute 不存在于 :other 中。', 61 | 'integer' => '字段 :attribute 必须是一个整数。', 62 | 'ip' => '字段 :attribute 必须是一个有效的 IP 地址。', 63 | 'ipv4' => '字段 :attribute 必须是一个有效的 IPv4 地址。', 64 | 'ipv6' => '字段 :attribute 必须是一个有效的 IPv6 地址。', 65 | 'json' => '字段 :attribute 必须是一个有效的 JSON 文档。', 66 | 'lt' => [ 67 | 'numeric' => '字段 :attribute 的值必须小于 :value。', 68 | 'file' => '字段 :attribute 的文件大小必须小于 :value 千字节。', 69 | 'string' => '字段 :attribute 的文本长度必须小于 :value 个字符。', 70 | 'array' => '字段 :attribute 的数组元素个数必须小于 :value。', 71 | ], 72 | 'lte' => [ 73 | 'numeric' => '字段 :attribute 的值必须小于或等于 :value。', 74 | 'file' => '字段 :attribute 的文件大小必须小于或等于 :value 千字节。', 75 | 'string' => '字段 :attribute 的文本长度不能超过 :value 个字符。', 76 | 'array' => '字段 :attribute 的数组元素个数不能超过 :value。', 77 | ], 78 | 'max' => [ 79 | 'numeric' => '字段 :attribute 的值不能大于 :max。', 80 | 'file' => '字段 :attribute 的文件大小不能超过 :max 千字节。', 81 | 'string' => '字段 :attribute 的文本长度不能超过 :max 个字符。', 82 | 'array' => '字段 :attribute 的数组元素个数不能超过 :max。', 83 | ], 84 | 'mimes' => '字段 :attribute 必须是类型为 : :values 的文件。', 85 | 'mimetypes' => '字段 :attribute 必须是类型为 : :values 的文件。', 86 | 'min' => [ 87 | 'numeric' => '字段 :attribute 的值必须大于或等于 :min。', 88 | 'file' => '字段 :attribute 的文件大小必须大于 :min 千字节。', 89 | 'string' => '字段 :attribute 的文本长度必须至少为 :min 个字符。', 90 | 'array' => '字段 :attribute 的数组元素个数必须至少为 :min。', 91 | ], 92 | 'multiple_of' => '字段 :attribute 的值必须是 :value 的倍数', 93 | 'not_in' => '所选字段 :attribute 无效。', 94 | 'not_regex' => '字段 :attribute 的格式无效。', 95 | 'numeric' => '字段 :attribute 必须是一个数字。', 96 | 'password' => '密码不正确', 97 | 'present' => '字段 :attribute 必须存在。', 98 | 'regex' => '字段 :attribute 的格式无效。', 99 | 'required' => '字段 :attribute 是必填的。', 100 | 'required_if' => '当字段 :other 的值为 :value 时,字段 :attribute 是必填的。', 101 | 'required_unless' => '除非字段 :other 的值为 :values,否则字段 :attribute 是必填的。', 102 | 'required_with' => '当 :values 存在时,字段 :attribute 是必填的。', 103 | 'required_with_all' => '当 :values 都存在时,字段 :attribute 是必填的。', 104 | 'required_without' => '当 :values 不存在时,字段 :attribute 是必填的。', 105 | 'required_without_all' => '当 :values 都不存在时,字段 :attribute 是必填的。', 106 | 'same' => '字段 :attribute 和 :other 必须相同。', 107 | 'size' => [ 108 | 'numeric' => '字段 :attribute 的值必须为 :size。', 109 | 'file' => '字段 :attribute 的文件大小必须为 :size 千字节。', 110 | 'string' => '字段 :attribute 的文本长度必须为 :size 个字符。', 111 | 'array' => '字段 :attribute 的数组元素个数必须为 :size。', 112 | ], 113 | 'starts_with' => '字段 :attribute 必须以以下值之一开头: :values', 114 | 'string' => '字段 :attribute 必须是一个字符串。', 115 | 'timezone' => '字段 :attribute 必须是一个有效的时区。', 116 | 'unique' => '字段 :attribute 的值已经被使用。', 117 | 'uploaded' => '无法上传字段 :attribute 的文件。', 118 | 'url' => '字段 :attribute 的URL格式无效。', 119 | 'uuid' => '字段 :attribute 必须是一个有效的UUID', 120 | 121 | /* 122 | |-------------------------------------------------------------------------- 123 | | Custom Validation Language Lines 124 | |-------------------------------------------------------------------------- 125 | | 126 | | Here you may specify custom validation messages for attributes using the 127 | | convention "attribute.rule" to name the lines. This makes it quick to 128 | | specify a specific custom language line for a given attribute rule. 129 | | 130 | */ 131 | 132 | 'custom' => [ 133 | 'attribute-name' => [ 134 | 'rule-name' => 'custom-message', 135 | ], 136 | ], 137 | 138 | /* 139 | |-------------------------------------------------------------------------- 140 | | Custom Validation Attributes 141 | |-------------------------------------------------------------------------- 142 | | 143 | | The following language lines are used to swap our attribute placeholder 144 | | with something more reader friendly such as "E-Mail Address" instead 145 | | of "email". This simply helps us make our message more expressive. 146 | | 147 | */ 148 | 149 | 'attributes' => [ 150 | 'name' => '姓名', 151 | 'username' => "用户名", 152 | 'email' => '邮件地址', 153 | 'first_name' => '名字', 154 | 'last_name' => '姓氏', 155 | 'password' => '密码', 156 | 'password_confirmation' => '确认密码', 157 | 'current_password' => '当前密码', 158 | 'city' => '城市', 159 | 'country' => '国家', 160 | 'address' => '地址', 161 | 'phone' => '电话', 162 | 'mobile' => '手机号码', 163 | 'age' => '年龄', 164 | 'sex' => '性别', 165 | 'gender' => '性别', 166 | 'day' => '日', 167 | 'month' => '月', 168 | 'year' => '年', 169 | 'hour' => '小时', 170 | 'minute' => '分钟', 171 | 'second' => '秒', 172 | 'title' => '标题', 173 | 'content' => '内容', 174 | 'description' => '描述', 175 | 'excerpt' => '摘要', 176 | 'date' => '日期', 177 | 'time' => '时间', 178 | 'available' => '可用', 179 | 'size' => '大小', 180 | ], 181 | ]; 182 | -------------------------------------------------------------------------------- /Helper/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Helper 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /InvenTree/.env: -------------------------------------------------------------------------------- 1 | # InvenTree environment variables for a postgresql production setup 2 | 3 | # Location of persistent database data (stored external to the docker containers) 4 | # Note: You *must* un-comment this line, and point it to a path on your local machine 5 | 6 | # e.g. Linux 7 | INVENTREE_EXT_VOLUME=/volume1/docker/inventree/data 8 | 9 | # e.g. Windows (docker desktop) 10 | #INVENTREE_EXT_VOLUME=c:/Users/me/inventree-data 11 | 12 | # Default web port for the InvenTree server 13 | INVENTREE_WEB_PORT=1337 14 | 15 | # Ensure debug is false for a production setup 16 | INVENTREE_DEBUG=False 17 | INVENTREE_LOG_LEVEL=WARNING 18 | 19 | # InvenTree admin account details 20 | # Un-comment (and complete) these lines to auto-create an admin acount 21 | INVENTREE_ADMIN_USER=laosu 22 | INVENTREE_ADMIN_PASSWORD=123456 23 | INVENTREE_ADMIN_EMAIL=wbsu2003@gmail.com 24 | 25 | # Database configuration options 26 | # Note: The example setup is for a PostgreSQL database 27 | INVENTREE_DB_ENGINE=postgresql 28 | INVENTREE_DB_NAME=inventree 29 | INVENTREE_DB_HOST=inventree-db 30 | INVENTREE_DB_PORT=5432 31 | 32 | # Database credentials - These must be configured before running 33 | # Uncomment the lines below, and change from the default values! 34 | INVENTREE_DB_USER=pguser 35 | INVENTREE_DB_PASSWORD=pgpassword 36 | 37 | # Redis cache setup (disabled by default) 38 | # Un-comment the following lines to enable Redis cache 39 | # Note that you will also have to run docker-compose with the --profile redis command 40 | # Refer to settings.py for other cache options 41 | #INVENTREE_CACHE_HOST=inventree-cache 42 | #INVENTREE_CACHE_PORT=6379 43 | 44 | # Options for gunicorn server 45 | INVENTREE_GUNICORN_TIMEOUT=90 46 | 47 | # Enable custom plugins? 48 | INVENTREE_PLUGINS_ENABLED=False 49 | 50 | # Run migrations automatically? 51 | INVENTREE_AUTO_UPDATE=False 52 | 53 | # Image tag that should be used 54 | INVENTREE_TAG=stable 55 | 56 | COMPOSE_PROJECT_NAME=inventree-production 57 | -------------------------------------------------------------------------------- /InvenTree/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | # Docker compose recipe for a production-ready InvenTree setup, with the following containers: 4 | # - PostgreSQL as the database backend 5 | # - gunicorn as the InvenTree web server 6 | # - django-q as the InvenTree background worker process 7 | # - nginx as a reverse proxy 8 | # - redis as the cache manager (optional, disabled by default) 9 | 10 | # --------------------- 11 | # READ BEFORE STARTING! 12 | # --------------------- 13 | 14 | # ----------------------------- 15 | # Setting environment variables 16 | # ----------------------------- 17 | # Shared environment variables should be stored in the env.txt file 18 | # Changes made to this file are reflected across all containers! 19 | # 20 | # IMPORTANT NOTE: 21 | # You should not have to change *anything* within this docker-compose.yml file! 22 | # Instead, make any changes in the env.txt file! 23 | 24 | # ------------------------ 25 | # InvenTree Image Versions 26 | # ------------------------ 27 | # By default, this docker-compose script targets the STABLE version of InvenTree, 28 | # image: inventree/inventree:stable 29 | # 30 | # To run the LATEST (development) version of InvenTree, 31 | # change the INVENTREE_TAG variable (in the env.txt file) to "latest" 32 | # 33 | # Alternatively, you could target a specific tagged release version with (for example): 34 | # INVENTREE_TAG=0.7.5 35 | # 36 | 37 | services: 38 | # Database service 39 | # Use PostgreSQL as the database backend 40 | inventree-db: 41 | image: postgres:13 42 | container_name: inventree-db 43 | expose: 44 | - ${INVENTREE_DB_PORT:-5432}/tcp 45 | environment: 46 | - PGDATA=/var/lib/postgresql/data/pgdb 47 | - POSTGRES_USER=${INVENTREE_DB_USER:?You must provide the 'INVENTREE_DB_USER' variable in the env.txt file} 48 | - POSTGRES_PASSWORD=${INVENTREE_DB_PASSWORD:?You must provide the 'INVENTREE_DB_PASSWORD' variable in the env.txt file} 49 | - POSTGRES_DB=${INVENTREE_DB_NAME:?You must provide the 'INVENTREE_DB_NAME' variable in the env.txt file} 50 | volumes: 51 | # Map 'data' volume such that postgres database is stored externally 52 | - inventree_data:/var/lib/postgresql/data/ 53 | restart: unless-stopped 54 | 55 | # redis acts as database cache manager 56 | # only runs under the "redis" profile : https://docs.docker.com/compose/profiles/ 57 | inventree-cache: 58 | image: redis:7.0 59 | container_name: inventree-cache 60 | depends_on: 61 | - inventree-db 62 | profiles: 63 | - redis 64 | env_file: 65 | - .env 66 | expose: 67 | - ${INVENTREE_CACHE_PORT:-6379} 68 | restart: always 69 | 70 | # InvenTree web server service 71 | # Uses gunicorn as the web server 72 | inventree-server: 73 | # If you wish to specify a particular InvenTree version, do so here 74 | image: inventree/inventree:${INVENTREE_TAG:-stable} 75 | container_name: inventree-server 76 | # Only change this port if you understand the stack. 77 | # If you change this you have to change: 78 | # - the proxy settings (on two lines) 79 | # - only change the exposed port - eg `1338:8000` if you want to expose the server on port 1338 80 | expose: 81 | - 8000 82 | depends_on: 83 | - inventree-db 84 | env_file: 85 | - .env 86 | volumes: 87 | # Data volume must map to /home/inventree/data 88 | - inventree_data:/home/inventree/data 89 | restart: unless-stopped 90 | 91 | # Background worker process handles long-running or periodic tasks 92 | inventree-worker: 93 | # If you wish to specify a particular InvenTree version, do so here 94 | image: inventree/inventree:${INVENTREE_TAG:-stable} 95 | container_name: inventree-worker 96 | command: invoke worker 97 | depends_on: 98 | - inventree-server 99 | env_file: 100 | - .env 101 | volumes: 102 | # Data volume must map to /home/inventree/data 103 | - inventree_data:/home/inventree/data 104 | restart: unless-stopped 105 | 106 | # nginx acts as a reverse proxy 107 | # static files are served directly by nginx 108 | # media files are served by nginx, although authentication is redirected to inventree-server 109 | # web requests are redirected to gunicorn 110 | # NOTE: You will need to provide a working nginx.conf file! 111 | inventree-proxy: 112 | image: nginx 113 | container_name: inventree-proxy 114 | depends_on: 115 | - inventree-server 116 | env_file: 117 | - .env 118 | ports: 119 | # Default web port is 1337 (can be changed in the env.txt file) 120 | - ${INVENTREE_WEB_PORT:-1337}:80 121 | volumes: 122 | # Provide nginx configuration file to the container 123 | # Refer to the provided example file as a starting point 124 | - ./nginx.prod.conf:/etc/nginx/conf.d/default.conf:ro 125 | # nginx proxy needs access to static and media files 126 | - inventree_data:/var/www 127 | restart: unless-stopped 128 | 129 | volumes: 130 | # Persistent data, stored external to the container(s) 131 | inventree_data: 132 | driver: local 133 | driver_opts: 134 | type: none 135 | o: bind 136 | # This directory specified where InvenTree data are stored "outside" the docker containers 137 | device: ${INVENTREE_EXT_VOLUME:?You must specify the 'INVENTREE_EXT_VOLUME' variable in the env.txt file!} 138 | -------------------------------------------------------------------------------- /InvenTree/nginx.prod.conf: -------------------------------------------------------------------------------- 1 | server { 2 | 3 | # Listen for connection on (internal) port 80 4 | # If you are exposing this server to the internet, you should use HTTPS! 5 | # In which case, you should also set up a redirect from HTTP to HTTPS, and listen on port 443 6 | # See the Nginx documentation for more details 7 | listen 80; 8 | 9 | real_ip_header proxy_protocol; 10 | 11 | location / { 12 | 13 | proxy_set_header Host $http_host; 14 | proxy_set_header X-Forwarded-By $server_addr:$server_port; 15 | proxy_set_header X-Forwarded-For $remote_addr; 16 | proxy_set_header X-Forwarded-Proto $scheme; 17 | proxy_set_header X-Real-IP $remote_addr; 18 | proxy_set_header CLIENT_IP $remote_addr; 19 | 20 | proxy_pass_request_headers on; 21 | 22 | proxy_redirect off; 23 | 24 | client_max_body_size 100M; 25 | 26 | proxy_buffering off; 27 | proxy_request_buffering off; 28 | 29 | # Do not touch this unless you have a specific reason - this and the docker-compose need to match 30 | proxy_pass http://inventree-server:8000; 31 | } 32 | 33 | # Redirect any requests for static files 34 | location /static/ { 35 | alias /var/www/static/; 36 | autoindex on; 37 | 38 | # Caching settings 39 | expires 30d; 40 | add_header Pragma public; 41 | add_header Cache-Control "public"; 42 | } 43 | 44 | # Redirect any requests for media files 45 | location /media/ { 46 | alias /var/www/media/; 47 | 48 | # Media files require user authentication 49 | auth_request /auth; 50 | 51 | # Content header to force download 52 | add_header Content-disposition "attachment"; 53 | } 54 | 55 | # Use the 'user' API endpoint for auth 56 | location /auth { 57 | internal; 58 | 59 | proxy_pass http://inventree-server:8000/auth/; 60 | 61 | proxy_pass_request_body off; 62 | proxy_set_header Content-Length ""; 63 | proxy_set_header X-Original-URI $request_uri; 64 | } 65 | 66 | } 67 | -------------------------------------------------------------------------------- /InvenTree/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 InvenTree 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /Kyoo/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | back: 5 | image: zoriya/kyoo_back:master 6 | container_name: kyoo_back 7 | restart: on-failure 8 | env_file: 9 | - ./env.txt 10 | depends_on: 11 | postgres: 12 | condition: service_healthy 13 | volumes: 14 | - ./kyoo:/kyoo 15 | 16 | front: 17 | image: zoriya/kyoo_front:master 18 | container_name: kyoo_front 19 | restart: on-failure 20 | environment: 21 | - KYOO_URL=${KYOO_URL:-http://back:5000} 22 | - PUBLIC_BACK_URL=${PUBLIC_BACK_URL} 23 | 24 | scanner: 25 | image: zoriya/kyoo_scanner:master 26 | container_name: kyoo_scanner 27 | restart: on-failure 28 | depends_on: 29 | back: 30 | condition: service_healthy 31 | env_file: 32 | - ./env.txt 33 | environment: 34 | - KYOO_URL=${KYOO_URL:-http://back:5000} 35 | volumes: 36 | - ${LIBRARY_ROOT}:/video 37 | 38 | transcoder: 39 | image: zoriya/kyoo_transcoder:master 40 | container_name: kyoo_transcoder 41 | restart: on-failure 42 | env_file: 43 | - ./env.txt 44 | volumes: 45 | - ${LIBRARY_ROOT}:/video 46 | - ${CACHE_ROOT}:/cache 47 | - ./metadata:/metadata 48 | 49 | ingress: 50 | image: nginx 51 | container_name: kyoo_nginx 52 | restart: on-failure 53 | environment: 54 | - PORT=8901 55 | - FRONT_URL=http://front:8901 56 | - BACK_URL=${KYOO_URL:-http://back:5000} 57 | volumes: 58 | - ./nginx.conf:/etc/nginx/templates/kyoo.conf.template:ro 59 | depends_on: 60 | - back 61 | - front 62 | ports: 63 | - "8901:8901" 64 | 65 | postgres: 66 | image: postgres:15 67 | container_name: kyoo_postgres 68 | restart: on-failure 69 | env_file: 70 | - ./env.txt 71 | volumes: 72 | - ./data:/var/lib/postgresql/data 73 | healthcheck: 74 | test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}"] 75 | interval: 5s 76 | timeout: 5s 77 | retries: 5 78 | -------------------------------------------------------------------------------- /Kyoo/env.txt: -------------------------------------------------------------------------------- 1 | # Useful config options 2 | LIBRARY_ROOT=./video 3 | CACHE_ROOT=./tmp/kyoo_cache 4 | LIBRARY_LANGUAGES=en 5 | 6 | # A pattern (regex) to ignore video files. 7 | LIBRARY_IGNORE_PATTERN=.*/[dD]ownloads?/.* 8 | 9 | # The following two values should be set to a random sequence of characters. 10 | # You MUST change thoses when installing kyoo (for security) 11 | AUTHENTICATION_SECRET=4c@mraGB!KRfF@kpS8739y9FcHemKxBsqqxLbdR? 12 | # You can input multiple api keys separated by a , 13 | KYOO_APIKEYS=t7H5!@4iMNsAaSJQ49pat4jprJgTcF656if#J3 14 | 15 | DEFAULT_PERMISSIONS=overall.read 16 | UNLOGGED_PERMISSIONS=overall.read 17 | 18 | THEMOVIEDB_APIKEY= 19 | PUBLIC_BACK_URL=http://localhost:5000 20 | 21 | 22 | 23 | # Following options are optional and only useful for debugging. 24 | 25 | # To debug the front end, you can set the following to an external backend 26 | KYOO_URL= 27 | # The library root inside the container. 28 | KYOO_LIBRARY_ROOT=/video 29 | 30 | # Database things 31 | POSTGRES_USER=KyooUser 32 | POSTGRES_PASSWORD=KyooPassword 33 | POSTGRES_DB=kyooDB 34 | POSTGRES_SERVER=postgres 35 | POSTGRES_PORT=5432 36 | 37 | # vi: ft=sh 38 | -------------------------------------------------------------------------------- /Kyoo/nginx.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen ${PORT}; 3 | root /usr/share/nginx/html; 4 | 5 | location / { 6 | proxy_pass ${FRONT_URL}; 7 | proxy_http_version 1.1; 8 | proxy_set_header Upgrade $http_upgrade; 9 | proxy_set_header Connection "upgrade"; 10 | } 11 | 12 | location /api/ { 13 | proxy_pass ${BACK_URL}/; 14 | proxy_http_version 1.1; 15 | proxy_set_header Upgrade $http_upgrade; 16 | proxy_set_header Connection "upgrade"; 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /Kyoo/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Kyoo 相关的设置 2 | 3 | ```bash 4 | # 新建文件夹 kyoo 和 子目录 5 | mkdir -p /volume1/docker/kyoo/{data,kyoo,metadata,video,tmp/kyoo_cache} 6 | 7 | # 进入 kyoo 目录 8 | cd /volume1/docker/kyoo 9 | 10 | # 将 docker-compose.yml 、 env.txt 、 nginx.conf 放入当前目录 11 | 12 | # 一键启动 13 | docker-compose --env-file env.txt up -d 14 | ``` 15 | 16 | 17 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 18 | 19 | 欢迎关注公众号: 20 | 21 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 22 | -------------------------------------------------------------------------------- /LibreKB/readme.md: -------------------------------------------------------------------------------- 1 | 仅针对 v1.2.0 版 2 | 3 | 用 index.php 替换 /admin/index.php 文件 4 | -------------------------------------------------------------------------------- /LibrePhotos/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # DO NOT EDIT 2 | # The .env file has everything you need to edit. 3 | # Run options: 4 | # 1. Use prebuilt images (preferred method): 5 | # run cmd: docker-compose up -d 6 | # 2. Build images on your own machine: 7 | # build cmd: COMPOSE_DOCKER_CLI_BUILD=1 DOCKER_BUILDKIT=1 docker-compose build 8 | # run cmd: docker-compose up -d 9 | 10 | version: "3.8" 11 | services: 12 | proxy: 13 | image: reallibrephotos/librephotos-proxy:${tag} 14 | container_name: librephotos-proxy 15 | restart: unless-stopped 16 | volumes: 17 | - ${scanDirectory}:/data 18 | - ${data}/protected_media:/protected_media 19 | ports: 20 | - ${httpPort}:80 21 | depends_on: 22 | - backend 23 | - frontend 24 | 25 | db: 26 | image: postgres:13 27 | container_name: librephotos-db 28 | restart: unless-stopped 29 | environment: 30 | - POSTGRES_USER=${dbUser} 31 | - POSTGRES_PASSWORD=${dbPass} 32 | - POSTGRES_DB=${dbName} 33 | volumes: 34 | - ${data}/db:/var/lib/postgresql/data 35 | command: postgres -c fsync=off -c synchronous_commit=off -c full_page_writes=off -c random_page_cost=1.0 36 | healthcheck: 37 | test: psql -U ${dbUser} -d ${dbName} -c "SELECT 1;" 38 | interval: 5s 39 | timeout: 5s 40 | retries: 5 41 | 42 | frontend: 43 | image: reallibrephotos/librephotos-frontend:${tag} 44 | container_name: librephotos-frontend 45 | restart: unless-stopped 46 | 47 | backend: 48 | image: reallibrephotos/librephotos:${tag} 49 | container_name: librephotos-backend 50 | restart: unless-stopped 51 | volumes: 52 | - ${scanDirectory}:/data 53 | - ${data}/protected_media:/protected_media 54 | - ${data}/logs:/logs 55 | - ${data}/cache:/root/.cache 56 | environment: 57 | - SECRET_KEY=${shhhhKey:-} 58 | - BACKEND_HOST=backend 59 | - ADMIN_EMAIL=${adminEmail:-} 60 | - ADMIN_USERNAME=${userName:-} 61 | - ADMIN_PASSWORD=${userPass:-} 62 | - DB_BACKEND=postgresql 63 | - DB_NAME=${dbName} 64 | - DB_USER=${dbUser} 65 | - DB_PASS=${dbPass} 66 | - DB_HOST=${dbHost} 67 | - DB_PORT=5432 68 | - MAPBOX_API_KEY=${mapApiKey:-} 69 | - WEB_CONCURRENCY=${gunniWorkers:-1} 70 | - SKIP_PATTERNS=${skipPatterns:-} 71 | - ALLOW_UPLOAD=${allowUpload:-false} 72 | - CSRF_TRUSTED_ORIGINS=${csrfTrustedOrigins:-} 73 | - DEBUG=0 74 | - HEAVYWEIGHT_PROCESS=${HEAVYWEIGHT_PROCESS:-} 75 | depends_on: 76 | db: 77 | condition: service_healthy 78 | -------------------------------------------------------------------------------- /LibrePhotos/env.txt: -------------------------------------------------------------------------------- 1 | # This file contains all the things you need to change to set up your Libre Photos. 2 | # There are a few items that must be set for it to work such as the location of your photos. 3 | # After the mandatory entries there are some optional ones that you may set. 4 | 5 | # Start of mandatory changes. 6 | 7 | # Location of your photos. 8 | scanDirectory=./pictures 9 | 10 | # Internal data of LibrePhotos 11 | data=./data 12 | 13 | # ------------------------------------------------------------------------------------------------ 14 | 15 | # Wow, we are at the optional now. Pretty easy so far. You do not have to change any of the below. 16 | 17 | # Set this value if you have a custom domain name. This allows uploads and django-admin access. If you do not have a custom domain name, leave this blank. 18 | csrfTrustedOrigins= 19 | 20 | #What port should Libre Photos be accessed at (Default 3000) 21 | httpPort=3068 22 | 23 | # What branch should we install the latest weekly build or the development branch (dev) 24 | tag=latest 25 | 26 | # Number of workers, which take care of the request to the api. This setting can dramatically affect the ram usage. 27 | # A positive integer generally in the 2-4 x $(NUM_CORES) range. 28 | # You鈥檒l want to vary this a bit to find the best for your particular workload. 29 | # Each worker needs 800MB of RAM. Change at your own will. Default is 2. 30 | gunniWorkers=2 31 | 32 | # You can set the database name. Did you know Libre Photos was forked from OwnPhotos? 33 | dbName=librephotos 34 | 35 | # Here you can change the user name for the database. 36 | dbUser=docker 37 | 38 | # The password used by the database. 39 | dbPass=AaAa1234 40 | 41 | # Default minimum rating to interpret as favorited. This default value is used when creating a new user. 42 | # Users can change this in their settings (Dashboards > Library). 43 | DEFAULT_FAVORITE_MIN_RATING=4 44 | 45 | # Database host. Only change this if you want to use your own existing Postgres server. If using your own server, you can remove the 'db' container from docker-compose.yml. If you're changing the name of the DB's container name (DB_CONT_NAME further down), you need to set this variable to match that name too. 46 | dbHost=db 47 | 48 | # Set the names of the docker containers to your own entries. Or don't, I'm not your dad. 49 | # Changing these will require you to `make rename` to rename the services, and start the system with your chosen `docker-compose up -d` invocation again. 50 | # Note that changing the DB_CONT_NAME will also need you to set the `dbHost` variable to the same value. 51 | DB_CONT_NAME=db 52 | BACKEND_CONT_NAME=backend 53 | FRONTEND_CONT_NAME=frontend 54 | PROXY_CONT_NAME=proxy 55 | PGADMIN_CONT_NAME=pgadmin 56 | # --------------------------------------------------------------------------------------------- 57 | 58 | # If you are not a developer ignore the following parameters: you will never need them. 59 | 60 | # Where shall we store the backend and frontend code files. 61 | codedir=./librephotos/code 62 | 63 | # Location for pgAdmin 64 | pgAdminLocation=./librephotos/pgadmin 65 | -------------------------------------------------------------------------------- /LibrePhotos/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 LibrePhotos 相关的设置 2 | 3 | ```bash 4 | # 新建文件夹 librephotos 和 子目录 5 | mkdir -p /volume1/docker/librephotos/{data/{cache,db,logs,protected_media},pictures} 6 | 7 | # 进入 librephotos 目录 8 | cd /volume1/docker/librephotos 9 | 10 | # 将 docker-compose.yml 和 env.txt 放入当前目录 11 | 12 | # 一键启动 13 | docker-compose --env-file env.txt up -d 14 | ``` 15 | 16 | 17 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 18 | 19 | 欢迎关注公众号: 20 | 21 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 22 | -------------------------------------------------------------------------------- /Librum/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | librum: 5 | image: ghcr.io/librum-reader/librum-server:latest 6 | container_name: librum 7 | ports: 8 | - 5314:5000 9 | volumes: 10 | - ./book:/var/lib/librum-server/librum_storage 11 | - ./librum:/var/lib/librum 12 | environment: 13 | - JWTValidIssuer=exampleIssuer # Optional. You can leave it as-is 14 | - JWTKey=exampleOfALongSecretToken # Optional. You can leave it as-is 15 | # - SMTPEndpoint=smtp.example.com # Example for Gmail: smtp.gmail.com:587 16 | # - SMTPUsername=mailuser123 17 | # - SMTPPassword=smtpUserPassword123 18 | # - SMTPMailFrom=mailuser123@example.com 19 | - DBConnectionString=Server=librum_db;port=3306;Database=librum;Uid=librum;Pwd=mariadb; 20 | - AdminEmail=admin@example.com # Admin login username 21 | - AdminPassword=strongPassword123 # Admin login password 22 | #- OpenAIToken= # Optional. Generate here: https://platform.openai.com/api-keys 23 | restart: unless-stopped 24 | depends_on: 25 | librum_db: 26 | condition: service_healthy # Ensures the DB is up before the server. 27 | 28 | librum_db: 29 | image: mariadb:latest 30 | container_name: librum_db 31 | # ports: 32 | # - 3316:3306 33 | volumes: 34 | - ./data:/var/lib/mysql 35 | - ./initdb:/docker-entrypoint-initdb.d 36 | environment: 37 | - MARIADB_USER=librum 38 | - MARIADB_PASSWORD=mariadb 39 | - MARIADB_DATABASE=librum 40 | - MARIADB_ROOT_PASSWORD=mariadb 41 | restart: unless-stopped 42 | healthcheck: # Ensures the DB is up before the server. 43 | test: ["CMD", "mariadb-admin", "ping", "-u", "librum", "-p'mariadb'", "-h", "localhost"] 44 | interval: 20s 45 | timeout: 40s 46 | retries: 3 47 | start_period: 30s 48 | -------------------------------------------------------------------------------- /Librum/librum_mariadb.sql: -------------------------------------------------------------------------------- 1 | -- Create table AspNetRoles 2 | create table AspNetRoles 3 | ( 4 | Id varchar(255) not null 5 | primary key, 6 | Name varchar(256) null, 7 | NormalizedName varchar(256) null, 8 | ConcurrencyStamp longtext null, 9 | constraint RoleNameIndex 10 | unique (NormalizedName) 11 | ); 12 | 13 | 14 | -- Create table AspNetUsers 15 | create table AspNetUsers 16 | ( 17 | Id varchar(255) not null 18 | primary key, 19 | FirstName varchar(40) null, 20 | LastName varchar(50) null, 21 | Name varchar(150) null, 22 | Email varchar(256) not null, 23 | ProductId longtext null, 24 | CustomerId longtext null, 25 | AccountCreation datetime(6) not null, 26 | ProfilePictureLastUpdated datetime(6) not null, 27 | AccountLastDowngraded datetime(6) not null, 28 | HasProfilePicture tinyint(1) not null, 29 | AiExplanationRequestsMadeToday int not null, 30 | RootFolderId char(36) charset ascii not null, 31 | UserName varchar(256) null, 32 | NormalizedUserName varchar(256) null, 33 | NormalizedEmail varchar(256) null, 34 | EmailConfirmed tinyint(1) not null, 35 | PasswordHash longtext null, 36 | SecurityStamp longtext null, 37 | ConcurrencyStamp longtext null, 38 | PhoneNumber longtext null, 39 | PhoneNumberConfirmed tinyint(1) not null, 40 | TwoFactorEnabled tinyint(1) not null, 41 | LockoutEnd datetime(6) null, 42 | LockoutEnabled tinyint(1) not null, 43 | AccessFailedCount int not null, 44 | constraint IX_AspNetUsers_Email 45 | unique (Email) 46 | ); 47 | 48 | 49 | -- Create table AspNetRoleClaims 50 | CREATE TABLE AspNetRoleClaims ( 51 | Id INT NOT NULL AUTO_INCREMENT, 52 | RoleId VARCHAR(255) NOT NULL, 53 | ClaimType LONGTEXT NULL, 54 | ClaimValue LONGTEXT NULL, 55 | PRIMARY KEY (Id), 56 | FOREIGN KEY (RoleId) REFERENCES AspNetRoles(Id) ON DELETE CASCADE 57 | 58 | ); 59 | 60 | 61 | -- Create table AspNetUserClaims 62 | CREATE TABLE AspNetUserClaims ( 63 | Id INT NOT NULL AUTO_INCREMENT, 64 | UserId VARCHAR(255) NOT NULL, 65 | ClaimType LONGTEXT NULL, 66 | ClaimValue LONGTEXT NULL, 67 | PRIMARY KEY (Id), 68 | FOREIGN KEY (UserId) REFERENCES AspNetUsers(Id) ON DELETE CASCADE 69 | ); 70 | 71 | 72 | -- Create table AspNetUserLogins 73 | CREATE TABLE AspNetUserLogins ( 74 | LoginProvider NVARCHAR(450) NOT NULL, 75 | ProviderKey NVARCHAR(450) NOT NULL, 76 | ProviderDisplayName LONGTEXT NULL, 77 | UserId VARCHAR(255) NOT NULL, 78 | PRIMARY KEY (LoginProvider, ProviderKey), 79 | FOREIGN KEY (UserId) REFERENCES AspNetUsers(Id) ON DELETE CASCADE 80 | ); 81 | 82 | 83 | -- Create table AspNetUserRoles 84 | CREATE TABLE AspNetUserRoles ( 85 | UserId VARCHAR(255) NOT NULL, 86 | RoleId VARCHAR(255) NOT NULL, 87 | PRIMARY KEY (UserId, RoleId), 88 | FOREIGN KEY (RoleId) REFERENCES AspNetRoles(Id) ON DELETE CASCADE, 89 | FOREIGN KEY (UserId) REFERENCES AspNetUsers(Id) ON DELETE CASCADE 90 | ); 91 | 92 | 93 | -- Create table AspNetUserTokens 94 | CREATE TABLE AspNetUserTokens ( 95 | UserId VARCHAR(255) NOT NULL, 96 | LoginProvider VARCHAR(255) NOT NULL, 97 | Name VARCHAR(255) NOT NULL, 98 | Value LONGTEXT NULL, 99 | PRIMARY KEY (UserId, LoginProvider, Name), 100 | FOREIGN KEY (UserId) REFERENCES AspNetUsers(Id) ON DELETE CASCADE 101 | ); 102 | 103 | 104 | -- Create table Folders 105 | CREATE TABLE Folders ( 106 | FolderId VARCHAR(255) NOT NULL PRIMARY KEY, 107 | Name VARCHAR(5000) NOT NULL, 108 | Color VARCHAR(500) NOT NULL, 109 | Icon VARCHAR(500) NOT NULL, 110 | Description LONGTEXT NULL, 111 | LastModified VARCHAR(500) NOT NULL, 112 | IndexInParent INT NOT NULL, 113 | ParentFolderId VARCHAR(255), 114 | FOREIGN KEY (ParentFolderId) REFERENCES Folders(FolderId) ON DELETE CASCADE 115 | ); 116 | 117 | 118 | -- Create table User 119 | CREATE TABLE User ( 120 | Id VARCHAR(450) NOT NULL PRIMARY KEY, 121 | FirstName VARCHAR(40), 122 | LastName VARCHAR(50), 123 | Name VARCHAR(150), 124 | Email VARCHAR(50) NOT NULL UNIQUE, 125 | ProductId VARCHAR(255), 126 | CustomerId VARCHAR(255), 127 | AccountCreation DATETIME NOT NULL, 128 | ProfilePictureLastUpdated DATETIME NOT NULL, 129 | AccountLastDowngraded DATETIME NOT NULL DEFAULT '9999-12-31 23:59:59', 130 | HasProfilePicture BOOLEAN NOT NULL, 131 | AiExplanationRequestsMadeToday INT NOT NULL DEFAULT 0, 132 | RootFolderId VARCHAR(255), 133 | FOREIGN KEY (RootFolderId) REFERENCES Folders(FolderId) ON DELETE SET NULL 134 | ); 135 | 136 | 137 | -- Create table Books 138 | CREATE TABLE Books ( 139 | BookId VARCHAR(255) NOT NULL PRIMARY KEY, 140 | Title VARCHAR(2000) NOT NULL, 141 | PageCount INT NOT NULL CHECK (PageCount >= 0), 142 | CurrentPage INT NOT NULL CHECK (CurrentPage >= 0), 143 | Format VARCHAR(100) NOT NULL, 144 | Extension VARCHAR(500) NULL, 145 | Language VARCHAR(100) NULL, 146 | DocumentSize VARCHAR(60) NOT NULL, 147 | PagesSize VARCHAR(600) NOT NULL, 148 | Creator VARCHAR(2000) NULL, 149 | Authors VARCHAR(2000) NULL, 150 | CreationDate VARCHAR(140) NULL, 151 | AddedToLibrary VARCHAR(255) NOT NULL, 152 | LastOpened VARCHAR(255) NULL, 153 | LastModified VARCHAR(255) NOT NULL, 154 | CoverLastModified VARCHAR(255) NOT NULL, 155 | CoverSize BIGINT NOT NULL DEFAULT 0, 156 | HasCover BOOLEAN NOT NULL DEFAULT FALSE, 157 | ProjectGutenbergId INT NOT NULL DEFAULT 0, 158 | ColorTheme VARCHAR(255) NOT NULL, 159 | FileHash VARCHAR(255) NOT NULL, 160 | ParentFolderId VARCHAR(200) NULL, 161 | UserId VARCHAR(450) NULL, 162 | FOREIGN KEY (UserId) REFERENCES AspNetUsers(Id) 163 | ); 164 | 165 | 166 | -- Create table Bookmarks 167 | CREATE TABLE Bookmarks ( 168 | BookmarkId VARCHAR(255) NOT NULL PRIMARY KEY, 169 | Name VARCHAR(5000) NOT NULL, 170 | PageNumber INT NOT NULL, 171 | YOffset FLOAT NOT NULL, 172 | BookId VARCHAR(255), 173 | FOREIGN KEY (BookId) REFERENCES Books(BookId) ON DELETE CASCADE 174 | ); 175 | 176 | 177 | -- Create table Highlights 178 | CREATE TABLE Highlights ( 179 | HighlightId VARCHAR(255) NOT NULL PRIMARY KEY, 180 | Color VARCHAR(500) NOT NULL, 181 | PageNumber INT NOT NULL, 182 | BookId VARCHAR(255) NOT NULL, 183 | FOREIGN KEY (BookId) REFERENCES Books(BookId) ON DELETE CASCADE 184 | ); 185 | 186 | 187 | -- Create table Products 188 | CREATE TABLE Products ( 189 | ProductId VARCHAR(255) NOT NULL PRIMARY KEY, -- Identificador del producto 190 | Name VARCHAR(255) NOT NULL, -- Nombre del producto 191 | Description TEXT NOT NULL, -- Descripción del producto 192 | Price INT NOT NULL, -- Precio del producto 193 | PriceId VARCHAR(255), -- ID del precio, opcional 194 | BookStorageLimit BIGINT NOT NULL, -- Límite de almacenamiento 195 | AiRequestLimit INT NOT NULL, -- Límite de solicitudes de AI 196 | LiveMode BOOLEAN NOT NULL DEFAULT TRUE -- Indica si está en modo activo 197 | ); 198 | 199 | 200 | -- Create table ProductFeature 201 | CREATE TABLE ProductFeature ( 202 | ProductFeatureId VARCHAR(255) NOT NULL PRIMARY KEY, -- Usando VARCHAR(255) para almacenar GUID 203 | Name VARCHAR(255) NOT NULL, -- Nombre de la característica 204 | ProductId VARCHAR(255), -- ID del producto asociado, suponiendo que es un VARCHAR 205 | FOREIGN KEY (ProductId) REFERENCES Products(ProductId) ON DELETE CASCADE -- Clave foránea hacia Product 206 | ); 207 | 208 | 209 | -- Create table RectF 210 | CREATE TABLE RectF ( 211 | RectFId VARCHAR(255) NOT NULL PRIMARY KEY, -- Usando VARCHAR(255) para almacenar GUID 212 | X FLOAT NOT NULL, -- Coordenada X del rectángulo 213 | Y FLOAT NOT NULL, -- Coordenada Y del rectángulo 214 | Width FLOAT NOT NULL, -- Ancho del rectángulo 215 | Height FLOAT NOT NULL, -- Alto del rectángulo 216 | HighlightId VARCHAR(255), -- ID del Highlight asociado 217 | FOREIGN KEY (HighlightId) REFERENCES Highlights(HighlightId) ON DELETE CASCADE -- Clave foránea a Highlight 218 | ); 219 | 220 | -- Create table Tags 221 | CREATE TABLE Tags ( 222 | TagId VARCHAR(255) NOT NULL PRIMARY KEY, 223 | Name VARCHAR(5000) NOT NULL, 224 | CreationDate DATETIME NOT NULL, 225 | UserId VARCHAR(450), 226 | BookId VARCHAR(255) NOT NULL, -- Asumiendo que TagId ya existe 227 | FOREIGN KEY (UserId) REFERENCES AspNetUsers(Id) ON DELETE CASCADE, 228 | FOREIGN KEY (BookId) REFERENCES Books(BookId) ON DELETE CASCADE, 229 | FOREIGN KEY (UserId) REFERENCES AspNetUsers(Id) ON DELETE CASCADE 230 | ) ; 231 | 232 | -- Create dummy product 233 | INSERT INTO Products (ProductId, Name, Description, Price, PriceId, BookStorageLimit, AiRequestLimit, LiveMode) VALUES ('1', 'Selfhosted', 'Self hosted plan', 0, '0', 1000000, 1000000, 1); 234 | 235 | 236 | -- This needs to be executed after initialize the application because the Admin account is needed. 237 | UPDATE AspNetUsers SET ProductId=1 WHERE Name like 'Admin'; -------------------------------------------------------------------------------- /Librum/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Librum 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.tech](https://laosu.tech) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /LubeLogger/zh_CN.json: -------------------------------------------------------------------------------- 1 | { 2 | "Garage": "车库", 3 | "Settings": "设置", 4 | "Admin_Panel": "管理员面板", 5 | "Logout": "登出", 6 | "Dark_Mode": "深色模式", 7 | "Enable_CSV_Imports": "启用CSV导入", 8 | "Use_Imperial_Calculation_for_Fuel_Economy_Calculations(MPG)": "使用英制计算进行燃油经济性计算(英里每加仑)", 9 | "This_Will_Also_Change_Units_to_Miles_and_Gallons": "这也会将单位更改为英里和加仑", 10 | "Use_UK_MPG_Calculation": "使用英国MPG计算", 11 | "Input_Gas_Consumption_in_Liters,_it_will_be_converted_to_UK_Gals_for_MPG_Calculation": "以升为单位的输入耗气量,将转换为英国加仑数,用于计算 MPG", 12 | "Sort_lists_in_Descending_Order(Newest_to_Oldest)": "按降序排序列表(从最新到最旧)", 13 | "Replace_$0.00_Costs_with_---": "用---替换$0.00的成本", 14 | "Use_Three_Decimals_For_Fuel_Cost": "使用三位小数计算燃油成本", 15 | "Display_Saved_Notes_in_Markdown": "以Markdown格式显示保存的笔记", 16 | "Auto_Refresh_Lapsed_Recurring_Reminders": "自动刷新已过期的循环提醒", 17 | "Auto_Insert_Odometer_Records": "自动插入里程表记录", 18 | "Only_when_Adding_Service/Repair/Upgrade/Fuel_Record_or_Completing_a_Plan": "仅在添加服务/维修/升级/燃油记录或完成计划时", 19 | "Enable_Authentication": "启用身份验证", 20 | "Visible_Tabs": "可见选项卡", 21 | "Service_Records": "服务记录", 22 | "Dashboard": "仪表板", 23 | "Repairs": "维修", 24 | "Upgrades": "升级", 25 | "Fuel": "燃油", 26 | "Odometer": "里程表", 27 | "Taxes": "税费", 28 | "Notes": "笔记", 29 | "Reminder": "提醒", 30 | "Supplies": "用品", 31 | "Planner": "计划", 32 | "Default_Tab": "默认选项卡", 33 | "Service_Record": "服务记录", 34 | "Tax": "税费", 35 | "Reminders": "提醒", 36 | "Backups": "备份", 37 | "Make": "制造商", 38 | "Restore": "恢复", 39 | "About": "关于", 40 | "Add_New_Vehicle": "添加新车辆", 41 | "Year": "年份", 42 | "Year(must_be_after_1900)": "年份(必须在1900年之后)", 43 | "Model": "型号", 44 | "License_Plate": "车牌号", 45 | "Electric_Vehicle": "电动车", 46 | "Use_Engine_Hours": "使用发动机运行小时数", 47 | "Tags(optional)": "标签(可选)", 48 | "Upload_a_picture(optional)": "上传图片(可选)", 49 | "Cancel": "取消", 50 | "Edit_Vehicle": "编辑车辆", 51 | "Delete_Vehicle": "删除车辆", 52 | "Manage_Vehicle": "管理车辆", 53 | "Expenses_by_Type": "按类型分类的费用", 54 | "Service": "维修", 55 | "Expenses_by_Month": "按月份分类的费用", 56 | "As_of_Today": "截至今日", 57 | "+30_Days": "+30天", 58 | "+60_Days": "+60天", 59 | "+90_Days": "+90天", 60 | "Not_Urgent": "不紧急", 61 | "Urgent": "紧急", 62 | "Very_Urgent": "非常紧急", 63 | "Past_Due": "逾期", 64 | "Reminders_by_Category": "按类别分类的提醒", 65 | "Reminders_by_Urgency": "按紧急程度分类的提醒", 66 | "Collaborators": "协作者", 67 | "Username": "用户名", 68 | "Delete": "删除", 69 | "Fuel_Mileage_by_Month": "按月份分类的燃油里程", 70 | "Vehicle_Maintenance_Report": "车辆维护报告", 71 | "Export_Attachments": "导出附件", 72 | "Gasoline": "汽油", 73 | "Last_Reported_Odometer_Reading": "最近报告的里程表读数", 74 | "Average_Fuel_Economy": "平均燃油经济性", 75 | "Total_Spent(excl._fuel)": "总花费(不包括燃油)", 76 | "Total_Spent_on_Fuel": "总花费燃油", 77 | "Type": "类型", 78 | "Date": "日期", 79 | "Description": "描述", 80 | "Cost": "费用", 81 | "Repair": "维修", 82 | "Upgrade": "升级", 83 | "#_of_Odometer_Records": "里程表记录数", 84 | "Add_Odometer_Record": "添加里程表记录", 85 | "Import_via_CSV": "通过CSV导入", 86 | "Export_to_CSV": "导出为CSV", 87 | "Print": "打印", 88 | "Add_New_Odometer_Record": "添加新的里程表记录", 89 | "Date_recorded": "记录日期", 90 | "Odometer_reading": "里程表读数", 91 | "Notes(optional)": "备注(可选)", 92 | "Upload_documents(optional)": "上传文档(可选)", 93 | "Max_File_Size:_28.6MB": "最大文件大小:28.6MB", 94 | "#_of_Service_Records": "服务记录数量", 95 | "Total": "总计", 96 | "Add_Service_Record": "添加服务记录", 97 | "No_data_found,_create_reminders_to_see_visualizations_here.": "未找到数据,请创建提醒以查看可视化结果。", 98 | "No_data_found,_insert/select_some_data_to_see_visualizations_here.": "未找到数据,请插入/选择一些数据以查看可视化结果。", 99 | "Edit_Odometer_Record": "编辑里程表记录", 100 | "Import_Data_from_CSV": "从CSV导入数据", 101 | "In_order_for_this_utility_to_function_properly,_your_CSV_file_MUST_be_formatted_exactly_like_the_provided_sample._Dates_must_be_supplied_in_a_string._Numbers_must_be_supplied_as_numbers_without_currency_formatting.": "为了使此工具正常工作,您的CSV文件必须与提供的示例完全相同格式。日期必须以字符串形式提供。数字必须以数字形式提供,不带货币格式。", 102 | "Failure_to_format_the_data_correctly_can_cause_data_corruption._Please_make_sure_you_make_a_copy_of_the_local_database_before_proceeding.": "如果数据格式不正确,可能会导致数据损坏。在继续之前,请确保您已经备份了本地数据库的副本。", 103 | "Download_Sample": "下载示例", 104 | "Upload_CSV_File": "上传CSV文件", 105 | "Import": "导入", 106 | "Edit_Service_Record": "编辑服务记录", 107 | "Date_service_was_performed": "服务执行日期", 108 | "Odometer_reading_when_serviced": "维修时的里程表读数", 109 | "Description_of_item(s)_serviced(i.e._Oil_Change)": "维修项目描述(例如:更换机油)", 110 | "Cost_of_the_service": "维修费用", 111 | "Move_To": "移动到", 112 | "#_of_Repair_Records": "维修记录数量", 113 | "Add_Repair_Record": "添加维修记录", 114 | "Add_New_Repair_Record": "添加新的维修记录", 115 | "Date_repair_was_performed": "维修执行日期", 116 | "Odometer_reading_when_repaired": "维修时的里程表读数", 117 | "Description_of_item(s)_repaired(i.e._Alternator)": "维修项目描述(例如:更换发电机)", 118 | "Cost_of_the_repair": "维修费用", 119 | "Choose_Supplies": "选择材料", 120 | "Add_Reminder": "添加提醒", 121 | "Select_Supplies": "选择材料", 122 | "No_supplies_with_quantities_greater_than_0_is_found.": "没有找到数量大于0的材料。", 123 | "Select": "选择", 124 | "#_of_Upgrade_Records": "升级记录数量", 125 | "Add_Upgrade_Record": "添加升级记录", 126 | "Add_New_Upgrade_Record": "添加新的升级记录", 127 | "Date_upgrade/mods_was_installed": "升级/改装安装日期", 128 | "Odometer_reading_when_upgraded/modded": "升级/改装时的里程表读数", 129 | "Description_of_item(s)_upgraded/modded": "升级/改装项目描述", 130 | "Cost_of_the_upgrade/mods": "升级/改装费用", 131 | "#_of_Gas_Records": "加油记录数量", 132 | "Total_Fuel_Consumed": "总消耗燃油", 133 | "Total_Cost": "总费用", 134 | "Add_Gas_Record": "添加加油记录", 135 | "Date_Refueled": "加油日期", 136 | "Consumption": "消耗量", 137 | "Fuel_Economy": "燃油经济性", 138 | "Unit_Cost": "单位成本", 139 | "#_of_Supply_Records": "# of Supply Records", 140 | "Add_Supply_Record": "添加供应记录", 141 | "Part_#": "零件号", 142 | "Supplier": "供应商", 143 | "Quantity": "数量", 144 | "Add_New_Supply_Record": "添加新的供应记录", 145 | "Date_purchased": "购买日期", 146 | "Part_Number": "零件号", 147 | "Part_#/Model_#/SKU_#": "零件号/型号/库存单位号", 148 | "Description_of_the_Part/Supplies": "零件/供应品描述", 149 | "Supplier/Vendor": "供应商/供应商", 150 | "Part_Supplier": "零件供应商", 151 | "Edit_Supply_Record": "编辑供应记录", 152 | "Add_New_Service_Record": "添加新的服务记录", 153 | "Supplies_are_requisitioned_immediately_after_the_record_is_created_and_cannot_be_modified._If_you_have_incorrectly_entered_the_amount_you_needed_you_will_need_to_correct_it_in_the_Supplies_tab.": "在创建记录后,供应品将立即被征用,并且无法修改。如果您错误地输入了所需数量,则需要在“供应品”选项卡中进行更正。", 154 | "In_Stock": "库存中", 155 | "Edit_Repair_Record": "编辑维修记录", 156 | "Edit_Upgrade_Record": "编辑升级记录", 157 | "Save_Vehicle": "保存车辆", 158 | "Add_New_Gas_Record": "添加新的加油记录", 159 | "Date_refueled": "加油日期", 160 | "Odometer_Reading": "里程表读数", 161 | "Odometer_reading_when_refueled": "加油时的里程表读数", 162 | "Fuel_Consumption": "燃油消耗量", 163 | "Amount_of_gas_refueled": "加油量", 164 | "Is_Filled_To_Full": "加满", 165 | "Missed_Fuel_Up(Skip_MPG_Calculation)": "错过加油(跳过每加仑英里数计算)", 166 | "Cost_of_gas_refueled": "加油费用", 167 | "Unit": "单位", 168 | "#_of_Tax_Records": "税务记录数量", 169 | "Add_Tax_Record": "添加税务记录", 170 | "Add_New_Tax_Record": "添加新的税务记录", 171 | "Date_tax_was_paid": "缴税日期", 172 | "Description_of_tax_paid(i.e._Registration)": "缴纳的税务描述(例如:注册费)", 173 | "Cost_of_tax_paid": "缴纳的税务费用", 174 | "Is_Recurring": "是否循环", 175 | "Month": "月份", 176 | "1_Month": "1个月", 177 | "3_Months": "3个月", 178 | "6_Months": "6个月", 179 | "1_Year": "1年", 180 | "2_Years": "2年", 181 | "3_Years": "3年", 182 | "5_Years": "5年", 183 | "Edit_Tax_Record": "编辑税务记录", 184 | "#_of_Notes": "备注数量", 185 | "Add_Note": "添加备注", 186 | "Note": "备注", 187 | "Add_New_Note": "添加新的备注", 188 | "Pinned": "已固定", 189 | "Description_of_the_note": "备注描述", 190 | "Min_Fuel_Economy": "最低燃油经济性", 191 | "Max_Fuel_Economy": "最高燃油经济性", 192 | "Edit_Gas_Record": "编辑加油记录", 193 | "#_of_Plan_Records": "计划记录数量", 194 | "Add_Plan_Record": "添加计划记录", 195 | "Planned": "计划中", 196 | "Doing": "进行中", 197 | "Testing": "测试中", 198 | "Done": "已完成", 199 | "Add_New_Plan_Record": "添加新的计划记录", 200 | "Describe_the_Plan": "描述计划", 201 | "Cost_of_the_Plan": "计划成本", 202 | "Priority": "优先级", 203 | "Critical": "紧急", 204 | "Normal": "正常", 205 | "Low": "低", 206 | "Current_Stage": "当前阶段", 207 | "#_of_Reminders": "提醒数量", 208 | "Urgency": "紧急程度", 209 | "Metric": "度量", 210 | "Add_New_Reminder": "添加新的提醒", 211 | "Reminder_Description": "提醒描述", 212 | "Remind_me_on": "提醒日期", 213 | "Future_Date": "未来日期", 214 | "Future_Odometer_Reading": "未来里程表读数", 215 | "Whichever_comes_first": "以先到者为准", 216 | "Other": "其他", 217 | "Edit_Reminder": "编辑提醒", 218 | "Replace_picture(optional)": "替换图片(可选)", 219 | "Language": "语言", 220 | "Manage_Languages": "管理语言", 221 | "Upload": "上传", 222 | "Tokens": "令牌", 223 | "Generate_User_Token": "生成用户令牌", 224 | "Auto_Notify(via_Email)": "自动通知(通过电子邮件)", 225 | "Token": "令牌", 226 | "Issued_To": "发给", 227 | "Users": "用户", 228 | "Email": "电子邮件", 229 | "Is_Admin": "是管理员", 230 | "An_error_has_occurred,_please_try_again_later": "发生了错误,请稍后重试", 231 | "Edit_Note": "编辑备注", 232 | "Password": "密码", 233 | "Remember_Me": "记住我", 234 | "Login": "登录", 235 | "Forgot_Password": "忘记密码", 236 | "Register": "注册", 237 | "Request": "请求", 238 | "I_Have_a_Token": "我有一个令牌", 239 | "Back_to_Login": "返回登录", 240 | "Email_Address": "电子邮件地址", 241 | "New_Password": "新密码", 242 | "Reset_Password": "重置密码", 243 | "No_data_found_or_all_records_have_zero_sums,_insert_records_with_non-zero_sums_to_see_visualizations_here.": "未找到数据或所有记录的总和为零,请插入总和非零的记录以查看可视化结果。", 244 | "Save_as_Template": "另存为模板", 245 | "View_Templates": "查看模板", 246 | "Select_Template": "选择模板", 247 | "No_templates_are_found.": "找不到模板。", 248 | "Use": "使用", 249 | "Edit_Plan_Record": "编辑计划记录", 250 | "Date_Created": "创建日期", 251 | "Last_Modified": "上次修改", 252 | "Shop_Supplies": "店铺用品", 253 | "Uploaded_Documents": "已上传的文件", 254 | "Upload_more_documents": "上传更多文件", 255 | "Database_Migration": "数据库迁移", 256 | "Instructions": "说明", 257 | "To_Postgres": "到Postgres", 258 | "From_Postgres": "从Postgres", 259 | "Import_To_Postgres": "导入到Postgres", 260 | "Export_From_Postgres": "导出自Postgres", 261 | "Create": "创建", 262 | "Manage_Extra_Fields": "管理额外字段", 263 | "Add/Remove_Extra_Fields": "添加/删除额外字段", 264 | "Name": "名称", 265 | "Required": "必填项", 266 | "Add_New_Field": "添加新字段", 267 | "Close": "关闭", 268 | "Calendar": "日历", 269 | "View_Reminder": "查看提醒", 270 | "Mark_as_Done": "标记为已完成", 271 | "Login_via": "通过...登录", 272 | "Distance_Traveled_by_Month": "每月行驶里程", 273 | "Expenses_and_Distance_Traveled_by_Month": "每月费用和行驶里程", 274 | "Select_All": "全选", 275 | "Supply_Requisition_History": "物资申请历史", 276 | "No_supply_requisitions_in_history": "历史上没有物资申请", 277 | "Plan": "计划", 278 | "Deselect_All": "取消全选", 279 | "Duplicate": "复制", 280 | "Toggle_Pin": "切换固定", 281 | "Pin": "固定", 282 | "Unpin": "取消固定", 283 | "Profile": "档案", 284 | "Update_Profile": "更新档案", 285 | "Account_Username": "账号用户名", 286 | "Send_Token": "发送令牌", 287 | "Update": "更新", 288 | "Show_Extra_Field_Columns": "显示额外字段列", 289 | "Enabling_this_may_cause_performance_issues": "警告!启用此功能可能会导致性能问题", 290 | "Visible_Columns": "可见列", 291 | "Edit_Multiple": "编辑多个", 292 | "Edit_Multiple_Records": "编辑多个记录", 293 | "(multiple)": "(多个)", 294 | "Tags(use_---_to_clear_all_existing_tags)": "标签(使用 --- 清除所有现有标签)", 295 | "Notes(use_---_to_clear_all_existing_notes)": "备注(使用 --- 清除所有现有备注)", 296 | "Edit": "编辑", 297 | "Search": "搜索", 298 | "Delta": "Delta", 299 | "Vehicle": "车辆", 300 | "Select_Reminder": "选择提醒器", 301 | "Purchased_Date(optional)": "购买日期(可选)", 302 | "Purchased_Date": "购买日期", 303 | "Sold_Date(optional)": "售出日期(可选)", 304 | "Sold_Date": "售出日期", 305 | "SOLD": "已售出", 306 | "Days": "天数", 307 | "Input_Gas_Consumption_in_Liters,it_will_be_converted_to_UK_Gals_for_MPG_Calculation": "输入以升为单位的汽油消耗量,将将其转换为英国加仑进行MPG计算", 308 | "Replace$0.00_Costs_with_---": "用---替换$0.00的成本", 309 | "#of_Supply_Records": "供应记录数量", 310 | "Part#": "零件号" 311 | } 312 | -------------------------------------------------------------------------------- /Plane/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | plane-web: 5 | container_name: plane-frontend 6 | image: makeplane/plane-frontend:latest 7 | restart: always 8 | command: /usr/local/bin/start.sh 9 | environment: 10 | NEXT_PUBLIC_API_BASE_URL: ${NEXT_PUBLIC_API_BASE_URL} 11 | NEXT_PUBLIC_GOOGLE_CLIENTID: 0 12 | NEXT_PUBLIC_GITHUB_APP_NAME: 0 13 | NEXT_PUBLIC_GITHUB_ID: 0 14 | NEXT_PUBLIC_SENTRY_DSN: 0 15 | NEXT_PUBLIC_ENABLE_OAUTH: 0 16 | NEXT_PUBLIC_ENABLE_SENTRY: 0 17 | #ports: 18 | # - 3636:3000 19 | 20 | plane-api: 21 | container_name: plane-backend 22 | image: makeplane/plane-backend:latest 23 | restart: always 24 | command: ./bin/takeoff 25 | environment: 26 | DJANGO_SETTINGS_MODULE: plane.settings.production 27 | DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE} 28 | REDIS_URL: redis://plane-redis:6379/ 29 | EMAIL_HOST: ${EMAIL_HOST} 30 | EMAIL_HOST_USER: ${EMAIL_HOST_USER} 31 | EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD} 32 | EMAIL_PORT: ${EMAIL_PORT} 33 | EMAIL_FROM: ${EMAIL_FROM} 34 | AWS_REGION: ${AWS_REGION} 35 | AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} 36 | AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} 37 | AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME} 38 | FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT} 39 | WEB_URL: ${WEB_URL} 40 | GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET} 41 | DISABLE_COLLECTSTATIC: 1 42 | DOCKERIZED: 1 43 | OPENAI_API_KEY: ${OPENAI_API_KEY} 44 | GPT_ENGINE: ${GPT_ENGINE} 45 | SECRET_KEY: ${SECRET_KEY} 46 | DEFAULT_EMAIL: ${DEFAULT_EMAIL} 47 | DEFAULT_PASSWORD: ${DEFAULT_PASSWORD} 48 | USE_MINIO: 1 49 | depends_on: 50 | - plane-db 51 | - plane-redis 52 | #ports: 53 | # - 3637:8000 54 | 55 | plane-worker: 56 | container_name: plane-worker 57 | image: makeplane/plane-worker:latest 58 | restart: always 59 | command: ./bin/worker 60 | environment: 61 | DJANGO_SETTINGS_MODULE: plane.settings.production 62 | DATABASE_URL: postgres://${PGUSER}:${PGPASSWORD}@${PGHOST}:5432/${PGDATABASE} 63 | REDIS_URL: redis://plane-redis:6379/ 64 | EMAIL_HOST: ${EMAIL_HOST} 65 | EMAIL_HOST_USER: ${EMAIL_HOST_USER} 66 | EMAIL_HOST_PASSWORD: ${EMAIL_HOST_PASSWORD} 67 | EMAIL_PORT: ${EMAIL_PORT} 68 | EMAIL_FROM: ${EMAIL_FROM} 69 | AWS_REGION: ${AWS_REGION} 70 | AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} 71 | AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} 72 | AWS_S3_BUCKET_NAME: ${AWS_S3_BUCKET_NAME} 73 | FILE_SIZE_LIMIT: ${FILE_SIZE_LIMIT} 74 | WEB_URL: ${WEB_URL} 75 | GITHUB_CLIENT_SECRET: ${GITHUB_CLIENT_SECRET} 76 | DISABLE_COLLECTSTATIC: 1 77 | DOCKERIZED: 1 78 | OPENAI_API_KEY: ${OPENAI_API_KEY} 79 | GPT_ENGINE: ${GPT_ENGINE} 80 | SECRET_KEY: ${SECRET_KEY} 81 | DEFAULT_EMAIL: ${DEFAULT_EMAIL} 82 | DEFAULT_PASSWORD: ${DEFAULT_PASSWORD} 83 | USE_MINIO: 1 84 | depends_on: 85 | - plane-api 86 | - plane-db 87 | - plane-redis 88 | 89 | plane-db: 90 | container_name: plane-db 91 | image: postgres:14 92 | restart: always 93 | command: postgres -c 'max_connections=1000' 94 | environment: 95 | POSTGRES_USER: ${PGUSER} 96 | POSTGRES_DB: ${PGDATABASE} 97 | POSTGRES_PASSWORD: ${PGPASSWORD} 98 | volumes: 99 | - ./pgdata:/var/lib/postgresql/data 100 | 101 | plane-redis: 102 | container_name: plane-redis 103 | image: redis:6.2 104 | restart: always 105 | volumes: 106 | - ./redisdata:/data 107 | 108 | plane-minio: 109 | container_name: plane-minio 110 | image: minio/minio 111 | volumes: 112 | - ./uploads:/export 113 | environment: 114 | MINIO_ROOT_USER: ${AWS_ACCESS_KEY_ID} 115 | MINIO_ROOT_PASSWORD: ${AWS_SECRET_ACCESS_KEY} 116 | command: server /export --console-address ":9090" 117 | #ports: 118 | # - 3638:9000 119 | 120 | createbuckets: 121 | image: minio/mc 122 | depends_on: 123 | - plane-minio 124 | entrypoint: > 125 | /bin/sh -c " /usr/bin/mc config host add plane-minio http://plane-minio:9000 \$AWS_ACCESS_KEY_ID \$AWS_SECRET_ACCESS_KEY; /usr/bin/mc mb plane-minio/\$AWS_S3_BUCKET_NAME; /usr/bin/mc anonymous set download plane-minio/\$AWS_S3_BUCKET_NAME; exit 0; " 126 | 127 | plane-nginx: 128 | container_name: plane-nginx 129 | image: nginx 130 | ports: 131 | - 3639:80 132 | volumes: 133 | - ./nginx.conf:/etc/nginx/conf.d/default.conf:ro 134 | depends_on: 135 | - plane-web 136 | - plane-api -------------------------------------------------------------------------------- /Plane/env.txt: -------------------------------------------------------------------------------- 1 | # Frontend 2 | # Extra image domains that need to be added for Next Image 3 | NEXT_PUBLIC_EXTRA_IMAGE_DOMAINS= 4 | # Google Client ID for Google OAuth 5 | NEXT_PUBLIC_GOOGLE_CLIENTID="" 6 | # Github ID for Github OAuth 7 | NEXT_PUBLIC_GITHUB_ID="" 8 | # Github App Name for GitHub Integration 9 | NEXT_PUBLIC_GITHUB_APP_NAME="" 10 | # Sentry DSN for error monitoring 11 | NEXT_PUBLIC_SENTRY_DSN="" 12 | # Enable/Disable OAUTH - default 0 for selfhosted instance 13 | NEXT_PUBLIC_ENABLE_OAUTH=0 14 | # Enable/Disable sentry 15 | NEXT_PUBLIC_ENABLE_SENTRY=0 16 | # Enable/Disable session recording 17 | NEXT_PUBLIC_ENABLE_SESSION_RECORDER=0 18 | # Enable/Disable event tracking 19 | NEXT_PUBLIC_TRACK_EVENTS=0 20 | # Slack for Slack Integration 21 | NEXT_PUBLIC_SLACK_CLIENT_ID="" 22 | 23 | # Backend 24 | 25 | # Database Settings 26 | PGUSER="plane" 27 | PGPASSWORD="plane" 28 | PGHOST="plane-db" 29 | PGDATABASE="plane" 30 | 31 | # Email Settings 32 | EMAIL_HOST=smtp.88.com 33 | EMAIL_HOST_USER=wbsu2003@88.com 34 | EMAIL_HOST_PASSWORD=<第三方邮件客户端密码> 35 | EMAIL_PORT=25 36 | EMAIL_FROM="laosu " 37 | 38 | # AWS Settings 39 | AWS_REGION="" 40 | AWS_ACCESS_KEY_ID="access-key" 41 | AWS_SECRET_ACCESS_KEY="secret-key" 42 | # Changing this requires change in the nginx.conf for uploads if using minio setup 43 | AWS_S3_BUCKET_NAME="uploads" 44 | # Maximum file upload limit 45 | FILE_SIZE_LIMIT=5242880 46 | 47 | # GPT settings 48 | OPENAI_API_KEY="" 49 | GPT_ENGINE="" 50 | 51 | # Github 52 | GITHUB_CLIENT_SECRET="" # For fetching release notes 53 | 54 | # Settings related to Docker 55 | DOCKERIZED=1 56 | 57 | # Nginx Configuration 58 | NGINX_PORT=80 59 | 60 | # Default Creds 61 | DEFAULT_EMAIL="captain@plane.so" 62 | DEFAULT_PASSWORD="password123" 63 | 64 | # Auto generated and Required that will be generated from setup.sh 65 | NEXT_PUBLIC_API_BASE_URL=https://plane.laosu.ml:444 66 | WEB_URL=https://plane.laosu.ml:444 67 | SECRET_KEY=IVBfieeGdbKOIXC1a+Pqb989ju41Swyv6sxNUZLv6ZA= -------------------------------------------------------------------------------- /Plane/nginx.conf: -------------------------------------------------------------------------------- 1 | upstream plane { 2 | server plane-nginx:80; 3 | } 4 | 5 | error_log /var/log/nginx/error.log; 6 | 7 | server { 8 | listen 80; 9 | root /www/data/; 10 | access_log /var/log/nginx/access.log; 11 | location / { 12 | proxy_pass http://plane-web:3000/; 13 | proxy_set_header Host $host; 14 | proxy_set_header X-Real-IP $remote_addr; 15 | } 16 | location /api/ { 17 | proxy_pass http://plane-api:8000/api/; 18 | proxy_set_header Host $host; 19 | proxy_set_header X-Real-IP $remote_addr; 20 | } 21 | location /uploads/ { 22 | proxy_pass http://plane-minio:9000/uploads/; 23 | proxy_set_header Host $host; 24 | proxy_set_header X-Real-IP $remote_addr; 25 | } 26 | 27 | error_page 500 502 503 504 /50x.html; 28 | location = /50x.html { 29 | root /usr/share/nginx/html; 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /Plane/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Plane 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # synology 2 | 与群晖相关的代码片段存放 3 | 4 | 具体的使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 5 | 6 | 欢迎关注公众号: 7 | 8 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 9 | -------------------------------------------------------------------------------- /Raneto/config.js: -------------------------------------------------------------------------------- 1 | // Modules 2 | var path = require('path'); 3 | 4 | // Which Theme to Use? 5 | // 6 | // Local Directory Example (for development or custom themes) 7 | // var theme_dir = path.join(__dirname, 'themes'); 8 | // var theme_name = 'my-theme-directory'; 9 | // 10 | // Themes from NPM 11 | // use "dist" as the theme name for modules (for now) 12 | var theme_dir = path.join( 13 | __dirname, 14 | '..', 15 | 'node_modules', 16 | '@raneto/theme-default' 17 | ); 18 | var theme_name = 'dist'; 19 | 20 | var config = { 21 | // Your site title (format: page_title - site_title) 22 | site_title: '老苏的测试站点', 23 | 24 | // The base URL of your site (can use %base_url% in Markdown files) 25 | // This should be the full path to your Raneto installation: 26 | // example 1: https://raneto.mydomain.com 27 | // example 2: https://www.mydomain.com/raneto 28 | // Do not include a trailing "/" 29 | // Leave this as an empty string to use the default 30 | base_url: '', 31 | nowrap: true, 32 | 33 | // Path Prefix 34 | // If you are running Raneto on a subpath of your domain, add it here 35 | // Leave it blank if you are not sure 36 | // 37 | // Example: if you are running Raneto at http://www.mydomain.com/raneto 38 | // then you would enter '/raneto' below 39 | path_prefix: '', 40 | 41 | // Used for the "Get in touch" page footer link 42 | support_email: '', 43 | 44 | // Footer Text / Copyright 45 | copyright: `Copyright © ${new Date().getFullYear()} - Powered by Raneto`, 46 | 47 | // Excerpt length (used in search) 48 | excerpt_length: 400, 49 | 50 | // The meta value by which to sort pages (value should be an integer) 51 | // If this option is blank pages will be sorted alphabetically 52 | page_sort_meta: 'sort', 53 | 54 | // Should categories be sorted numerically (true) or alphabetically (false) 55 | // If true category folders need to contain a "sort" file with an integer value 56 | category_sort: true, 57 | 58 | // Controls behavior of home page if meta ShowOnHome is not present. If set to true 59 | // all categories or files that do not specify ShowOnHome meta property will be shown 60 | show_on_home_default: true, 61 | 62 | // Theme (see top of file) 63 | theme_dir, 64 | theme_name, 65 | 66 | // Specify the path of your content folder where all your '.md' files are located 67 | // Fix: Cannot be an absolute path 68 | content_dir: path.join(__dirname, '..', 'content', 'pages'), 69 | 70 | // Where is the public directory or document root? 71 | public_dir: path.join(theme_dir, theme_name, 'public'), 72 | 73 | // The base URL of your images folder, 74 | // Relative to config.public_dir 75 | // (can use %image_url% in Markdown files) 76 | image_url: '/images', 77 | 78 | // Add your analytics tracking code (including script tags) 79 | analytics: '', 80 | 81 | // Set to true to enable the web editor 82 | allow_editing: true, 83 | 84 | // Set to true to enable HTTP Basic Authentication 85 | authentication: true, 86 | 87 | // If editing is enabled, set this to true to only authenticate for editing, not for viewing 88 | authentication_for_edit: true, 89 | 90 | // If authentication is enabled, set this to true to enable authentication for reading too 91 | authentication_for_read: false, 92 | 93 | // Google OAuth 94 | googleoauth: false, 95 | google_group_restriction: { 96 | enabled: false, 97 | api_key: 'GOOGLE_API_KEY', 98 | group_name: 'GOOGLE_GROUP_NAME', 99 | }, 100 | oauth2: { 101 | client_id: 'GOOGLE_CLIENT_ID', 102 | client_secret: 'GOOGLE_CLIENT_SECRET', 103 | callback: 'http://localhost:3000/auth/google/callback', 104 | hostedDomain: 'google.com', 105 | }, 106 | secret: 'someCoolSecretRightHere', 107 | 108 | // ##### WARNING ##### 109 | // You MUST change the username and password for security 110 | // Do NOT use "admin" as a username as it's easily guessed. 111 | // You are encouraged to use tools to generate a password 112 | // Preferably, use a local password manager 113 | // If you absolutely must use an online tool, here are some suggestions 114 | // https://bitwarden.com/password-generator/ 115 | // https://www.grc.com/passwords.htm 116 | credentials: [ 117 | { 118 | username: 'laosu', 119 | password: '123456', 120 | }, 121 | { 122 | username: 'xiaosu', 123 | password: '123456', 124 | }, 125 | ], 126 | 127 | locale: 'zh', 128 | 129 | // Support search with extra languages 130 | searchExtraLanguages: ['zh'], 131 | 132 | // Sets the format for datetime's 133 | datetime_format: 'Do MMM YYYY', 134 | 135 | // Set to true to render suitable layout for RTL languages 136 | rtl_layout: false, 137 | 138 | // Edit Home Page title, description, etc. 139 | home_meta: { 140 | // title : 'Custom Home Title', 141 | // description : 'Custom Home Description' 142 | }, 143 | 144 | // variables: [ 145 | // { 146 | // name: 'test_variable', 147 | // content: 'test variable' 148 | // }, 149 | // { 150 | // name: 'test_variable_2', 151 | // content: 'test variable 2' 152 | // } 153 | // ] 154 | 155 | // Set to true to enable generation of table of contents 156 | table_of_contents: false, 157 | 158 | // Configure generation of table of contents (see markdown-toc's docs for details on available options) 159 | table_of_contents_options: { 160 | // append: 'Table of contents appendix', 161 | // maxdepth: 6, 162 | // firsth1: true, 163 | }, 164 | 165 | menu_on_pages: true, 166 | menu_on_page_collapsible: true, 167 | }; 168 | 169 | // Exports 170 | module.exports = config; 171 | -------------------------------------------------------------------------------- /Raneto/content.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/Raneto/content.zip -------------------------------------------------------------------------------- /Raneto/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "2.1" 2 | 3 | services: 4 | raneto: 5 | image: raneto/raneto:latest 6 | container_name: raneto 7 | restart: unless-stopped 8 | ports: 9 | - 3844:3000 10 | volumes: 11 | - ./config:/opt/raneto/config 12 | - ./content:/opt/raneto/content 13 | -------------------------------------------------------------------------------- /Raneto/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Raneto 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /Revolt/caddyfile.txt: -------------------------------------------------------------------------------- 1 | {$HOSTNAME} { 2 | route /api* { 3 | uri strip_prefix /api 4 | reverse_proxy http://api:8000 5 | } 6 | 7 | route /ws { 8 | @upgrade { 9 | header Connection *Upgrade* 10 | header Upgrade websocket 11 | } 12 | 13 | uri strip_prefix /ws 14 | reverse_proxy @upgrade http://events:9000 15 | } 16 | 17 | route /autumn* { 18 | uri strip_prefix /autumn 19 | reverse_proxy http://autumn:3000 20 | } 21 | 22 | route /january* { 23 | uri strip_prefix /january 24 | reverse_proxy http://january:7000 25 | } 26 | 27 | reverse_proxy http://web:5000 28 | } 29 | -------------------------------------------------------------------------------- /Revolt/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | # MongoDB database 5 | database: 6 | image: mongo 7 | container_name: revolt-database 8 | restart: always 9 | volumes: 10 | - ./data:/data/db 11 | 12 | # Redis server 13 | redis: 14 | image: eqalpha/keydb 15 | container_name: revolt-redis 16 | restart: always 17 | 18 | # S3-compatible storage server 19 | minio: 20 | image: minio/minio 21 | container_name: revolt-minio 22 | command: server /data 23 | env_file: env.txt 24 | volumes: 25 | - ./minio:/data 26 | restart: always 27 | 28 | # Caddy web server 29 | caddy: 30 | image: caddy 31 | container_name: revolt-caddy 32 | restart: always 33 | env_file: env.txt 34 | ports: 35 | - "11080:80" 36 | - "11443:443" 37 | volumes: 38 | - ./caddyfile.txt:/etc/caddy/Caddyfile 39 | - ./caddy-data:/data 40 | - ./caddy-config:/config 41 | 42 | # API server (delta) 43 | api: 44 | image: ghcr.io/revoltchat/server 45 | container_name: revolt-api 46 | env_file: env.txt 47 | depends_on: 48 | - database 49 | - redis 50 | - caddy 51 | restart: always 52 | 53 | # Events service (quark) 54 | events: 55 | image: ghcr.io/revoltchat/bonfire 56 | container_name: revolt-events 57 | env_file: env.txt 58 | depends_on: 59 | - database 60 | - redis 61 | - caddy 62 | restart: always 63 | 64 | # Web App (revite) 65 | web: 66 | image: ghcr.io/revoltchat/client:master 67 | container_name: revolt-web 68 | env_file: env.txt 69 | depends_on: 70 | - caddy 71 | restart: always 72 | 73 | # File server (autumn) 74 | autumn: 75 | image: ghcr.io/revoltchat/autumn 76 | container_name: revolt-autumn 77 | env_file: env.txt 78 | depends_on: 79 | - database 80 | - createbuckets 81 | - caddy 82 | environment: 83 | - AUTUMN_MONGO_URI=mongodb://database 84 | restart: always 85 | 86 | # Metadata and image proxy (january) 87 | january: 88 | image: ghcr.io/revoltchat/january 89 | container_name: revolt-january 90 | depends_on: 91 | - caddy 92 | restart: always 93 | 94 | # Create buckets for minio. 95 | createbuckets: 96 | image: minio/mc 97 | container_name: revolt-mc 98 | depends_on: 99 | - minio 100 | env_file: env.txt 101 | entrypoint: > 102 | /bin/sh -c " 103 | while ! curl -s --output /dev/null --connect-timeout 1 http://minio:9000; do echo 'Waiting minio...' && sleep 0.1; done; 104 | /usr/bin/mc alias set minio http://minio:9000 $MINIO_ROOT_USER $MINIO_ROOT_PASSWORD; 105 | /usr/bin/mc mb minio/attachments; 106 | /usr/bin/mc mb minio/avatars; 107 | /usr/bin/mc mb minio/backgrounds; 108 | /usr/bin/mc mb minio/icons; 109 | /usr/bin/mc mb minio/banners; 110 | /usr/bin/mc mb minio/emojis; 111 | exit 0; 112 | " 113 | -------------------------------------------------------------------------------- /Revolt/env.txt: -------------------------------------------------------------------------------- 1 | ## 2 | ## Quark configuration 3 | ## 4 | 5 | # MongoDB 6 | MONGODB=mongodb://database 7 | 8 | # Redis 9 | REDIS_URI=redis://redis/ 10 | 11 | # Hostname used for Caddy 12 | # This should in most cases match REVOLT_APP_URL 13 | #HOSTNAME=http://local.revolt.chat 14 | HOSTNAME=:80 15 | 16 | # URL to where the Revolt app is publicly accessible 17 | REVOLT_APP_URL=http://192.168.0.197:11080 18 | 19 | # URL to where the API is publicly accessible 20 | REVOLT_PUBLIC_URL=http://192.168.0.197:11080/api 21 | VITE_API_URL=http://192.168.0.197:11080/api 22 | 23 | # URL to where the WebSocket server is publicly accessible 24 | REVOLT_EXTERNAL_WS_URL=ws://192.168.0.197:11080/ws 25 | 26 | # URL to where Autumn is publicly available 27 | AUTUMN_PUBLIC_URL=http://192.168.0.197:11080/autumn 28 | 29 | # URL to where January is publicly available 30 | JANUARY_PUBLIC_URL=http://192.168.0.197:11080/january 31 | 32 | 33 | ## 34 | ## hCaptcha Settings 35 | ## 36 | 37 | # If you are sure that you don't want to use hCaptcha, set to 1. 38 | REVOLT_UNSAFE_NO_CAPTCHA=1 39 | 40 | # hCaptcha API key (This is the "Secret key" from your User Settings page) 41 | # REVOLT_HCAPTCHA_KEY=0x0000000000000000000000000000000000000000 42 | 43 | # hCaptcha site key 44 | # REVOLT_HCAPTCHA_SITEKEY=10000000-ffff-ffff-ffff-000000000001 45 | 46 | 47 | ## 48 | ## Email Settings 49 | ## 50 | 51 | # If you are sure that you don't want to use email verification, set to 1. 52 | REVOLT_UNSAFE_NO_EMAIL=1 53 | 54 | # SMTP host 55 | # REVOLT_SMTP_HOST=smtp.example.com 56 | 57 | # SMTP username 58 | # REVOLT_SMTP_USERNAME=noreply@example.com 59 | 60 | # SMTP password 61 | # REVOLT_SMTP_PASSWORD=CHANGEME 62 | 63 | # SMTP From header 64 | # REVOLT_SMTP_FROM=Revolt 65 | 66 | 67 | ## 68 | ## Application Settings 69 | ## 70 | 71 | # Whether to only allow users to sign up if they have an invite code 72 | REVOLT_INVITE_ONLY=0 73 | 74 | # Maximum number of people that can be in a group chat 75 | REVOLT_MAX_GROUP_SIZE=150 76 | 77 | # VAPID keys for push notifications 78 | # Generate using this guide: https://gitlab.insrt.uk/revolt/delta/-/wikis/vapid 79 | # --> Please replace these keys before going into production! <-- 80 | REVOLT_VAPID_PRIVATE_KEY=LS0tLS1CRUdJTiBFQyBQUklWQVRFIEtFWS0tLS0tCk1IY0NBUUVFSUJSUWpyTWxLRnBiVWhsUHpUbERvcEliYk1yeVNrNXpKYzVYVzIxSjJDS3hvQW9HQ0NxR1NNNDkKQXdFSG9VUURRZ0FFWnkrQkg2TGJQZ2hEa3pEempXOG0rUXVPM3pCajRXT1phdkR6ZU00c0pqbmFwd1psTFE0WAp1ZDh2TzVodU94QWhMQlU3WWRldVovWHlBdFpWZmNyQi9BPT0KLS0tLS1FTkQgRUMgUFJJVkFURSBLRVktLS0tLQo= 81 | REVOLT_VAPID_PUBLIC_KEY=BGcvgR-i2z4IQ5Mw841vJvkLjt8wY-FjmWrw83jOLCY52qcGZS0OF7nfLzuYbjsQISwVO2HXrmf18gLWVX3Kwfw= 82 | 83 | 84 | ## 85 | ## Autumn configuration 86 | ## 87 | 88 | # S3 Region 89 | AUTUMN_S3_REGION=minio 90 | 91 | # S3 Endpoint 92 | AUTUMN_S3_ENDPOINT=http://minio:9000 93 | 94 | # MinIO Root User 95 | MINIO_ROOT_USER=minioautumn 96 | 97 | # MinIO Root Password 98 | MINIO_ROOT_PASSWORD=minioautumn 99 | 100 | # AWS Access Key ID 101 | AWS_ACCESS_KEY_ID=minioautumn 102 | 103 | # AWS Secret Key 104 | AWS_SECRET_ACCESS_KEY=minioautumn 105 | -------------------------------------------------------------------------------- /Revolt/readme.md: -------------------------------------------------------------------------------- 1 | 仅适用于局域网访问和使用 2 | -------------------------------------------------------------------------------- /Teable/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.9' 2 | 3 | services: 4 | teable: 5 | image: ghcr.io/teableio/teable:latest 6 | container_name: teable-app 7 | restart: always 8 | ports: 9 | - '3091:3000' 10 | volumes: 11 | - ./data:/app/.assets:rw 12 | env_file: 13 | - env.txt 14 | environment: 15 | - TZ=${TIMEZONE} 16 | - NEXT_ENV_IMAGES_ALL_REMOTE=true 17 | depends_on: 18 | - teable_db_migrate 19 | 20 | teable_db: 21 | image: postgres:15 22 | container_name: teable-db 23 | restart: always 24 | ports: 25 | - '42345:5432' 26 | volumes: 27 | - ./db:/var/lib/postgresql/data:rw 28 | environment: 29 | - TZ=${TIMEZONE} 30 | - POSTGRES_DB=${POSTGRES_DB} 31 | - POSTGRES_USER=${POSTGRES_USER} 32 | - POSTGRES_PASSWORD=${POSTGRES_PASSWORD} 33 | healthcheck: 34 | test: ['CMD-SHELL', "sh -c 'pg_isready -U ${POSTGRES_USER} -d ${POSTGRES_DB}'"] 35 | interval: 10s 36 | timeout: 3s 37 | retries: 3 38 | 39 | teable_db_migrate: 40 | image: ghcr.io/teableio/teable-db-migrate:latest 41 | container_name: teable-db-migrate 42 | environment: 43 | - TZ=${TIMEZONE} 44 | - PRISMA_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@teable_db:5432/${POSTGRES_DB} 45 | depends_on: 46 | - teable_db 47 | -------------------------------------------------------------------------------- /Teable/env.txt: -------------------------------------------------------------------------------- 1 | TIMEZONE=Asia/Shanghai 2 | 3 | # Postgres 4 | POSTGRES_HOST=teable-db 5 | POSTGRES_PORT=5432 6 | POSTGRES_DB=example 7 | POSTGRES_USER=example 8 | POSTGRES_PASSWORD=standalone_replace_password 9 | 10 | # App 11 | PUBLIC_ORIGIN=http://192.168.0.197:3091 12 | PRISMA_DATABASE_URL=postgresql://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB} 13 | PUBLIC_DATABASE_PROXY=192.168.0.197:42345 14 | 15 | # Need to support sending emails to enable the following configurations 16 | # You need to modify the configuration according to the actual situation, otherwise it will not be able to send emails correctly. 17 | #BACKEND_MAIL_HOST=smtp.teable.io 18 | #BACKEND_MAIL_PORT=465 19 | #BACKEND_MAIL_SECURE=true 20 | #BACKEND_MAIL_SENDER=noreply.teable.io 21 | #BACKEND_MAIL_SENDER_NAME=Teable 22 | #BACKEND_MAIL_AUTH_USER=username 23 | #BACKEND_MAIL_AUTH_PASS=password 24 | -------------------------------------------------------------------------------- /Teable/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Teable 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.tech](https://laosu.tech) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.tech/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /Teable/人员信息统计表.xlsx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/Teable/人员信息统计表.xlsx -------------------------------------------------------------------------------- /Tellor/dcoker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | mysql: 5 | image: mysql:5.7 6 | ports: 7 | - "3306:3306" 8 | volumes: 9 | - ./data:/var/lib/mysql 10 | - ./initdb:/docker-entrypoint-initdb.d 11 | environment: 12 | MYSQL_ROOT_PASSWORD: root 13 | MYSQL_DATABASE: tellordb 14 | MYSQL_USER: telloruser 15 | MYSQL_PASSWORD: tellorpasswd 16 | 17 | web: 18 | image: wbsu2003/tellor:v1 19 | ports: 20 | - "3438:80" 21 | environment: 22 | DB_DATABASE: tellordb 23 | DB_USER: telloruser 24 | DB_PASSWORD: tellorpasswd 25 | DB_HOST: mysql 26 | depends_on: 27 | - mysql 28 | -------------------------------------------------------------------------------- /Tellor/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Tellor 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.tech](https://laosu.tech) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /Tellor/setup-db.sql: -------------------------------------------------------------------------------- 1 | -- setup-db.sql 2 | 3 | -- 创建数据库 4 | CREATE DATABASE IF NOT EXISTS tellordb; 5 | 6 | -- 创建用户并授权 7 | CREATE USER 'telloruser'@'localhost' IDENTIFIED BY 'tellorpasswd'; 8 | GRANT ALL PRIVILEGES ON tellordb.* TO 'telloruser'@'localhost'; 9 | 10 | -- 创建 boards 表 11 | CREATE TABLE IF NOT EXISTS `boards` ( 12 | `id` BINARY(16) NOT NULL, 13 | `name` VARCHAR(127) NOT NULL, 14 | `bgimg` VARCHAR(1023) CHARACTER SET ascii COLLATE ascii_bin, 15 | PRIMARY KEY (`id`) 16 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; 17 | 18 | -- 创建 lists 表 19 | CREATE TABLE IF NOT EXISTS `lists` ( 20 | `board` BINARY(16) NOT NULL, 21 | `id` BINARY(16) NOT NULL, 22 | `color` CHAR(6) CHARACTER SET ascii COLLATE ascii_bin, 23 | `name` VARCHAR(1023) NOT NULL, 24 | `ordr` INT(10) UNSIGNED NOT NULL, 25 | KEY `listsBoardIdx` (`board`) 26 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; 27 | 28 | -- 创建 cards 表 29 | CREATE TABLE IF NOT EXISTS `cards` ( 30 | `board` BINARY(16) NOT NULL, 31 | `list` BINARY(16) NOT NULL, 32 | `id` BINARY(16) NOT NULL, 33 | `parent` CHAR(16) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, 34 | `title` VARCHAR(1023) NOT NULL, 35 | `tags` VARCHAR(127) CHARACTER SET ascii COLLATE ascii_bin, 36 | `cdate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), 37 | `mdate` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP() ON UPDATE CURRENT_TIMESTAMP(), 38 | `description` TEXT, 39 | KEY `cardsBoardIdx` (`board`) 40 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; 41 | 42 | -- 创建 archive 表 43 | CREATE TABLE IF NOT EXISTS `archive` ( 44 | `board` BINARY(16) NOT NULL, 45 | `list` BINARY(16) NOT NULL, 46 | `id` BINARY(16) NOT NULL, 47 | `parent` CHAR(16) CHARACTER SET ascii COLLATE ascii_bin NOT NULL, 48 | `title` VARCHAR(1023) NOT NULL, 49 | `tags` VARCHAR(127) CHARACTER SET ascii COLLATE ascii_bin, 50 | `cdate` DATETIME NOT NULL, 51 | `mdate` DATETIME NOT NULL, 52 | `description` TEXT 53 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; 54 | 55 | -- 创建 history 表 56 | CREATE TABLE IF NOT EXISTS `history` ( 57 | `board` BINARY(16) NOT NULL, 58 | `cardid` BINARY(16) NOT NULL, 59 | `type` BINARY(3) NOT NULL, 60 | `change_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP(), 61 | `patch` BLOB, 62 | INDEX `historyIdx` (`board`, `cardid`) 63 | ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin; 64 | -------------------------------------------------------------------------------- /WiseMapping/01drop-schemas.sql: -------------------------------------------------------------------------------- 1 | DROP TABLE IF EXISTS ACCESS_AUDITORY; 2 | DROP TABLE IF EXISTS COLLABORATION; 3 | DROP TABLE IF EXISTS COLLABORATION_PROPERTIES; 4 | DROP TABLE IF EXISTS MINDMAP_HISTORY; 5 | DROP TABLE IF EXISTS LABEL; 6 | DROP TABLE IF EXISTS MINDMAP; 7 | DROP TABLE IF EXISTS R_LABEL_MINDMAP; 8 | DROP TABLE IF EXISTS USER; 9 | DROP TABLE IF EXISTS COLLABORATOR; 10 | COMMIT; -------------------------------------------------------------------------------- /WiseMapping/02create-database.sql: -------------------------------------------------------------------------------- 1 | # 2 | # Command: mysql -u root -p < create_database.sql 3 | # 4 | DROP DATABASE IF EXISTS wisemapping; 5 | 6 | CREATE DATABASE IF NOT EXISTS wisemapping 7 | CHARACTER SET = 'utf8' 8 | COLLATE = 'utf8_unicode_ci'; 9 | GRANT ALL ON wisemapping.* TO 'wisemapping'@'localhost'; 10 | SET PASSWORD FOR 'wisemapping'@'localhost' = PASSWORD('password'); -------------------------------------------------------------------------------- /WiseMapping/03create-schemas.sql: -------------------------------------------------------------------------------- 1 | # 2 | # Command: mysql -u root -p < create_schemas.sql 3 | # 4 | 5 | USE wisemapping; 6 | 7 | CREATE TABLE COLLABORATOR ( 8 | id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 9 | email VARCHAR(255) 10 | CHARACTER SET utf8 NOT NULL UNIQUE, 11 | creation_date DATE 12 | ) 13 | CHARACTER SET utf8; 14 | 15 | CREATE TABLE USER ( 16 | colaborator_id INTEGER NOT NULL PRIMARY KEY, 17 | authentication_type CHAR(1) 18 | CHARACTER SET utf8 NOT NULL, 19 | authenticator_uri VARCHAR(255) 20 | CHARACTER SET utf8, 21 | firstname VARCHAR(255) CHARACTER SET utf8 NOT NULL, 22 | lastname VARCHAR(255) CHARACTER SET utf8 NOT NULL, 23 | password VARCHAR(255) CHARACTER SET utf8 NOT NULL, 24 | activation_code BIGINT(20) NOT NULL, 25 | activation_date DATE, 26 | allow_send_email CHAR(1) CHARACTER SET utf8 NOT NULL DEFAULT 0, 27 | locale VARCHAR(5), 28 | google_sync BOOL, 29 | sync_code VARCHAR(255), 30 | google_token VARCHAR(255), 31 | FOREIGN KEY (colaborator_id) REFERENCES COLLABORATOR (id) 32 | ON DELETE CASCADE 33 | ON UPDATE NO ACTION 34 | ) 35 | CHARACTER SET utf8; 36 | 37 | CREATE TABLE MINDMAP ( 38 | id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 39 | title VARCHAR(255) 40 | CHARACTER SET utf8 NOT NULL, 41 | description VARCHAR(255) 42 | CHARACTER SET utf8 NOT NULL, 43 | xml MEDIUMBLOB NOT NULL, 44 | public BOOL NOT NULL DEFAULT 0, 45 | creation_date DATETIME, 46 | edition_date DATETIME, 47 | creator_id INTEGER NOT NULL, 48 | last_editor_id INTEGER NOT NULL, 49 | FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id) 50 | ON DELETE CASCADE 51 | ON UPDATE NO ACTION 52 | ) 53 | CHARACTER SET utf8; 54 | 55 | CREATE TABLE LABEL ( 56 | id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 57 | title VARCHAR(30) 58 | CHARACTER SET utf8 NOT NULL, 59 | creator_id INTEGER NOT NULL, 60 | parent_label_id INTEGER, 61 | color VARCHAR(7) NOT NULL, 62 | iconName VARCHAR(50) NOT NULL, 63 | FOREIGN KEY (creator_id) REFERENCES USER (colaborator_id), 64 | FOREIGN KEY (parent_label_id) REFERENCES LABEL (id) 65 | ON DELETE CASCADE 66 | ON UPDATE NO ACTION 67 | ) 68 | CHARACTER SET utf8; 69 | 70 | CREATE TABLE R_LABEL_MINDMAP ( 71 | mindmap_id INTEGER NOT NULL, 72 | label_id INTEGER NOT NULL, 73 | PRIMARY KEY (mindmap_id, label_id), 74 | FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id), 75 | FOREIGN KEY (label_id) REFERENCES LABEL (id) 76 | ON DELETE CASCADE 77 | ON UPDATE NO ACTION 78 | ) 79 | CHARACTER SET utf8; 80 | 81 | CREATE TABLE MINDMAP_HISTORY 82 | (id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 83 | xml MEDIUMBLOB NOT NULL, 84 | mindmap_id INTEGER NOT NULL, 85 | creation_date DATETIME, 86 | editor_id INTEGER NOT NULL, 87 | FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id) 88 | ON DELETE CASCADE 89 | ON UPDATE NO ACTION 90 | ) 91 | CHARACTER SET utf8; 92 | 93 | CREATE TABLE COLLABORATION_PROPERTIES ( 94 | id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 95 | starred BOOL NOT NULL DEFAULT 0, 96 | mindmap_properties VARCHAR(512) 97 | CHARACTER SET utf8 98 | ) 99 | CHARACTER SET utf8; 100 | 101 | CREATE TABLE COLLABORATION ( 102 | id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 103 | colaborator_id INTEGER NOT NULL, 104 | properties_id INTEGER NOT NULL, 105 | mindmap_id INTEGER NOT NULL, 106 | role_id INTEGER NOT NULL, 107 | UNIQUE KEY UC_ROLE (mindmap_id,colaborator_id), 108 | FOREIGN KEY (colaborator_id) REFERENCES COLLABORATOR (id), 109 | FOREIGN KEY (mindmap_id) REFERENCES MINDMAP (id) 110 | ON DELETE CASCADE 111 | ON UPDATE NO ACTION, 112 | FOREIGN KEY (properties_id) REFERENCES COLLABORATION_PROPERTIES (id) 113 | ON DELETE CASCADE 114 | ON UPDATE NO ACTION 115 | ) 116 | CHARACTER SET utf8; 117 | 118 | CREATE TABLE ACCESS_AUDITORY ( 119 | id INTEGER NOT NULL PRIMARY KEY AUTO_INCREMENT, 120 | login_date DATE, 121 | user_id INTEGER NOT NULL, 122 | FOREIGN KEY (user_id) REFERENCES USER (colaborator_id) 123 | ON DELETE CASCADE 124 | ON UPDATE NO ACTION 125 | ) 126 | CHARACTER SET utf8; 127 | 128 | COMMIT; -------------------------------------------------------------------------------- /WiseMapping/04apopulate-schemas.sql: -------------------------------------------------------------------------------- 1 | # 2 | # Command: mysql -u root -p < apopulate_schemas.sql 3 | # 4 | 5 | INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (1, 'test@wisemapping.org', CURRENT_DATE()); 6 | INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) 7 | VALUES (1, 'Test', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURRENT_DATE(), 1,'D'); 8 | 9 | INSERT INTO COLLABORATOR (id, email, creation_date) VALUES (2, 'admin@wisemapping.org', CURRENT_DATE()); 10 | INSERT INTO USER (colaborator_id, firstname, lastname, password, activation_code, activation_date, allow_send_email,authentication_type) 11 | VALUES (2, 'Admin', 'User', 'ENC:a94a8fe5ccb19ba61c4c0873d391e987982fbbd3', 1237, CURRENT_DATE(), 1,'D'); 12 | 13 | COMMIT; 14 | -------------------------------------------------------------------------------- /WiseMapping/app.properties: -------------------------------------------------------------------------------- 1 | ################################################################################## 2 | # Database Configuration 3 | ################################################################################## 4 | 5 | # MySQL 5.X configuration properties 6 | #database.url=jdbc:mysql://localhost/wisemapping?useUnicode=yes&characterEncoding=UTF-8 7 | #database.driver=com.mysql.jdbc.Driver 8 | #database.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 9 | #database.username=wisemapping 10 | #database.password=password 11 | #database.validation.enabled=true 12 | #database.validation.query=SELECT 1 13 | 14 | ## PostgreSQL configuration properties 15 | #database.url=jdbc:postgresql:///wisemapping 16 | #database.driver=org.postgresql.Driver 17 | #database.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect 18 | #database.username= 19 | #database.password= 20 | #database.validation.enabled=true 21 | #database.validation.query= 22 | #database.validation.enabled=false 23 | 24 | 25 | # HSQL Configuration properties 26 | database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping 27 | database.driver=org.hsqldb.jdbc.JDBCDriver 28 | database.hibernate.dialect=org.hibernate.dialect.HSQLDialect 29 | 30 | database.username=sa 31 | database.password= 32 | database.validation.enabled=false 33 | database.validation.query= 34 | 35 | ################################################################################## 36 | # Mail configuration. Must be configured to enable user registration confirmation. 37 | ################################################################################## 38 | 39 | #------------------------ 40 | # Plain SMTP Server Configuration 41 | #------------------------ 42 | mail.smtp.port=25 43 | mail.smtp.host=localhost 44 | mail.username=root 45 | mail.password= 46 | mail.smtp.auth=false 47 | mail.smtp.starttls.enable=false 48 | mail.smtp.quitwait=false 49 | 50 | #------------------------ 51 | # GMAIL SMTP Configuration 52 | #------------------------ 53 | #mail.smtp.port=587 54 | #mail.smtp.host=smtp.gmail.com 55 | #mail.username= 56 | #mail.password= 57 | #mail.smtp.auth=true 58 | #mail.smtp.starttls.enable=true 59 | #mail.smtp.quitwait=false 60 | 61 | #------------------------ 62 | # Emails configuration 63 | #------------------------ 64 | 65 | # Required: "from" email account that will appear in the emails sent from the sender. 66 | mail.serverSendEmail=root@localhost 67 | 68 | # Optional: Support account that the users could use to contact you. This address will appear in emails and in some places in the site. 69 | mail.supportEmail=root@localhost 70 | 71 | ################################################################################## 72 | # Users Registration Configuration 73 | ################################################################################## 74 | 75 | # Enable captcha confirmation 76 | google.recaptcha2.enabled = true 77 | 78 | # ReCaptcha is the default captcha. Public and private keys are required. 79 | # More Info: http://www.google.com/recaptcha . 80 | google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI 81 | google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe 82 | 83 | ################################################################################## 84 | # Site configuration 85 | ################################################################################## 86 | 87 | # Site administration user. This user will have special permissions for operations such as removing users, set password 88 | # etc. 89 | admin.user = admin@wisemapping.org 90 | 91 | # Base URL where WiseMapping is deployed. By default, It will be automatically inferred. 92 | #site.baseurl = http://localhost:8080 93 | 94 | # Site Homepage URL. This will be used as URL for homepage location. 95 | site.homepage = c/login 96 | 97 | # Font end static content can be deployed externally to the web app. Uncomment here and specify the url base location. 98 | site.static.js.url = /static 99 | 100 | ################################################################################## 101 | # Google Analytics Settings 102 | ################################################################################## 103 | google.analytics.enabled=false 104 | google.analytics.account=UA-XXXX 105 | 106 | ################################################################################## 107 | # Google Ads enable 108 | ################################################################################## 109 | google.ads.enabled=false 110 | 111 | ####################################################################################### 112 | # Authentication Configuration Section 113 | ####################################################################################### 114 | 115 | # Two type of security are supported: 116 | # - db: User are stored in the database. Registration is required in advance. 117 | # - ldap: Authentication takes place using a LDAP. In this case, security.ldap.* must be configured. 118 | security.type=db 119 | 120 | # LDAP Configuration properties. 121 | security.ldap.server=ldap://localhost:389 122 | 123 | # If anonymous password is required, change the wisemapping-security-ldap.xml removing the 124 | security.ldap.server.user=cn=pveiga,dc=wisemapping,dc=com 125 | security.ldap.server.password=password 126 | security.ldap.basedn=dc=wisemapping,dc=com 127 | 128 | # This will be concatenated as part of the DN. In this case, I will be "ou=people". 129 | # In case this need to be changed, modify the wisemapping-security-ldap.xml. 130 | security.ldap.subDn=ou=people 131 | 132 | # Attribute used as authentication login (Eg: in this case, the user email will be used) 133 | security.ldap.auth.attribute=mail 134 | security.ldap.lastName.attribute=sn 135 | security.ldap.firstName.attribute=givenName 136 | 137 | ####################################################################################### 138 | # Google OAuth Authentication 139 | ####################################################################################### 140 | # OAuth Client id 141 | #security.oauth2.google.clientId= 142 | # OAuth Client secret 143 | #security.oauth2.google.clientSecret= 144 | # Redirect to this url, this url must be configured in the google app {baseurl}/c/registration-google 145 | #security.oauth2.google.callbackUrl= 146 | 147 | # Google service for finish registration process, ie. exchange temporal code for user token 148 | security.oauth2.google.confirmUrl=https://oauth2.googleapis.com/token 149 | # Google service for get user data (name, email, etc) 150 | security.oauth2.google.userinfoUrl=https://www.googleapis.com/oauth2/v3/userinfo 151 | # Url for starting auth process with google 152 | security.oauth2.google.url=https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=${security.oauth2.google.callbackUrl}&prompt=consent&response_type=code&client_id=${security.oauth2.google.clientId}&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=offline&state=wisemapping&include_granted_scopes=true 153 | 154 | 155 | 156 | 157 | ####################################################################################### 158 | # User Account filtering policies 159 | ####################################################################################### 160 | 161 | # Coma separated list of domains and emails ban 162 | #accounts.exclusion.domain= 163 | -------------------------------------------------------------------------------- /WiseMapping/app.properties.txt: -------------------------------------------------------------------------------- 1 | ################################################################################## 2 | # Database Configuration 3 | ################################################################################## 4 | 5 | # MySQL 5.X configuration properties 6 | database.url=jdbc:mysql://192.168.0.197:3307/wisemapping?useUnicode=yes&characterEncoding=UTF-8 7 | database.driver=com.mysql.jdbc.Driver 8 | database.hibernate.dialect=org.hibernate.dialect.MySQL5Dialect 9 | database.username=wisemapping 10 | database.password=123456 11 | database.validation.enabled=true 12 | database.validation.query=SELECT 1 13 | 14 | ## PostgreSQL configuration properties 15 | #database.url=jdbc:postgresql:///wisemapping 16 | #database.driver=org.postgresql.Driver 17 | #database.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect 18 | #database.username= 19 | #database.password= 20 | #database.validation.enabled=true 21 | #database.validation.query= 22 | #database.validation.enabled=false 23 | 24 | 25 | # HSQL Configuration properties 26 | #database.url=jdbc:hsqldb:file:${database.base.url}/db/wisemapping 27 | #database.driver=org.hsqldb.jdbc.JDBCDriver 28 | #database.hibernate.dialect=org.hibernate.dialect.HSQLDialect 29 | 30 | #database.username=sa 31 | #database.password= 32 | #database.validation.enabled=false 33 | #database.validation.query= 34 | 35 | ################################################################################## 36 | # Mail configuration. Must be configured to enable user registration confirmation. 37 | ################################################################################## 38 | 39 | #------------------------ 40 | # Plain SMTP Server Configuration 41 | #------------------------ 42 | mail.smtp.port=25 43 | mail.smtp.host=smtp.88.com 44 | mail.username=wbsu2003@88.com 45 | mail.password=<第三方邮件客户端密码> 46 | mail.smtp.auth=false 47 | mail.smtp.starttls.enable=false 48 | mail.smtp.quitwait=false 49 | 50 | #------------------------ 51 | # GMAIL SMTP Configuration 52 | #------------------------ 53 | #mail.smtp.port=587 54 | #mail.smtp.host=smtp.gmail.com 55 | #mail.username= 56 | #mail.password= 57 | #mail.smtp.auth=true 58 | #mail.smtp.starttls.enable=true 59 | #mail.smtp.quitwait=false 60 | 61 | #------------------------ 62 | # Emails configuration 63 | #------------------------ 64 | 65 | # Required: "from" email account that will appear in the emails sent from the sender. 66 | mail.serverSendEmail=wbsu2003@88.com 67 | 68 | # Optional: Support account that the users could use to contact you. This address will appear in emails and in some places in the site. 69 | mail.supportEmail=wbsu2003@88.com 70 | 71 | ################################################################################## 72 | # Users Registration Configuration 73 | ################################################################################## 74 | 75 | # Enable captcha confirmation 76 | google.recaptcha2.enabled = false 77 | 78 | # ReCaptcha is the default captcha. Public and private keys are required. 79 | # More Info: http://www.google.com/recaptcha . 80 | google.recaptcha2.siteKey = 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI 81 | google.recaptcha2.secretKey = 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe 82 | 83 | ################################################################################## 84 | # Site configuration 85 | ################################################################################## 86 | 87 | # Site administration user. This user will have special permissions for operations such as removing users, set password 88 | # etc. 89 | admin.user = wbsu2003@@hotmail.com 90 | 91 | # Base URL where WiseMapping is deployed. By default, It will be automatically inferred. 92 | site.baseurl = http://192.168.0.197:8813 93 | 94 | # Site Homepage URL. This will be used as URL for homepage location. 95 | site.homepage = c/login 96 | 97 | # Font end static content can be deployed externally to the web app. Uncomment here and specify the url base location. 98 | site.static.js.url = /static 99 | 100 | ################################################################################## 101 | # Google Analytics Settings 102 | ################################################################################## 103 | google.analytics.enabled=false 104 | google.analytics.account=UA-XXXX 105 | 106 | ################################################################################## 107 | # Google Ads enable 108 | ################################################################################## 109 | google.ads.enabled=false 110 | 111 | ####################################################################################### 112 | # Authentication Configuration Section 113 | ####################################################################################### 114 | 115 | # Two type of security are supported: 116 | # - db: User are stored in the database. Registration is required in advance. 117 | # - ldap: Authentication takes place using a LDAP. In this case, security.ldap.* must be configured. 118 | security.type=db 119 | 120 | # LDAP Configuration properties. 121 | security.ldap.server=ldap://localhost:389 122 | 123 | # If anonymous password is required, change the wisemapping-security-ldap.xml removing the 124 | security.ldap.server.user=cn=pveiga,dc=wisemapping,dc=com 125 | security.ldap.server.password=password 126 | security.ldap.basedn=dc=wisemapping,dc=com 127 | 128 | # This will be concatenated as part of the DN. In this case, I will be "ou=people". 129 | # In case this need to be changed, modify the wisemapping-security-ldap.xml. 130 | security.ldap.subDn=ou=people 131 | 132 | # Attribute used as authentication login (Eg: in this case, the user email will be used) 133 | security.ldap.auth.attribute=mail 134 | security.ldap.lastName.attribute=sn 135 | security.ldap.firstName.attribute=givenName 136 | 137 | ####################################################################################### 138 | # Google OAuth Authentication 139 | ####################################################################################### 140 | # OAuth Client id 141 | #security.oauth2.google.clientId= 142 | # OAuth Client secret 143 | #security.oauth2.google.clientSecret= 144 | # Redirect to this url, this url must be configured in the google app {baseurl}/c/registration-google 145 | #security.oauth2.google.callbackUrl= 146 | 147 | # Google service for finish registration process, ie. exchange temporal code for user token 148 | security.oauth2.google.confirmUrl=https://oauth2.googleapis.com/token 149 | # Google service for get user data (name, email, etc) 150 | security.oauth2.google.userinfoUrl=https://www.googleapis.com/oauth2/v3/userinfo 151 | # Url for starting auth process with google 152 | security.oauth2.google.url=https://accounts.google.com/o/oauth2/v2/auth?redirect_uri=${security.oauth2.google.callbackUrl}&prompt=consent&response_type=code&client_id=${security.oauth2.google.clientId}&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.profile%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email&access_type=offline&state=wisemapping&include_granted_scopes=true 153 | 154 | 155 | 156 | 157 | ####################################################################################### 158 | # User Account filtering policies 159 | ####################################################################################### 160 | 161 | # Coma separated list of domains and emails ban 162 | #accounts.exclusion.domain= 163 | -------------------------------------------------------------------------------- /WiseMapping/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 WiseMapping 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /authelia/authelia.conf: -------------------------------------------------------------------------------- 1 | location / { 2 | set $upstream_authelia http://192.168.0.199:9091; # authelia 的 ip 和端口 3 | proxy_pass $upstream_authelia; 4 | client_body_buffer_size 128k; 5 | 6 | #Timeout if the real server is dead 7 | proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; 8 | 9 | # Advanced Proxy Config 10 | send_timeout 5m; 11 | proxy_read_timeout 360; 12 | proxy_send_timeout 360; 13 | proxy_connect_timeout 360; 14 | 15 | # Basic Proxy Config 16 | proxy_set_header Host $http_host; # 原为 $host,按照作者建议改为 $http_host; 17 | proxy_set_header X-Real-IP $remote_addr; 18 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 19 | proxy_set_header X-Forwarded-Proto $scheme; 20 | proxy_set_header X-Forwarded-Host $host; 21 | proxy_set_header X-Forwarded-Uri $request_uri; 22 | proxy_set_header X-Forwarded-Ssl on; 23 | proxy_redirect http:// $scheme://; 24 | proxy_http_version 1.1; 25 | proxy_set_header Connection ""; 26 | proxy_cache_bypass $cookie_session; 27 | proxy_no_cache $cookie_session; 28 | proxy_buffers 64 256k; 29 | 30 | set_real_ip_from 192.168.0.0/24; #根据你的网段进行修改 31 | real_ip_header X-Forwarded-For; 32 | real_ip_recursive on; 33 | } 34 | -------------------------------------------------------------------------------- /authelia/configuration.yml: -------------------------------------------------------------------------------- 1 | # yamllint disable rule:comments-indentation 2 | --- 3 | ############################################################################### 4 | # Authelia Configuration # 5 | ############################################################################### 6 | 7 | theme: light #light/dark 8 | jwt_secret: 7tiqSgZY8kb8JthmoVoHWja2 #any text or number you want to add here to create jwt Token 9 | 10 | default_redirection_url: https://auth.laosu.ml:444 # where to redirect for a non-existent URL,一般填 authelia 的完整域名,有端口也要带上 11 | 12 | server: 13 | host: 0.0.0.0 14 | port: 9091 15 | path: "" 16 | read_buffer_size: 4096 17 | write_buffer_size: 4096 18 | enable_pprof: false 19 | enable_expvars: false 20 | disable_healthcheck: false 21 | tls: 22 | key: "" 23 | certificate: "" 24 | 25 | log: 26 | level: debug 27 | 28 | totp: 29 | issuer: laosu.ml #your authelia top-level domain,这里不要带端口 30 | period: 30 31 | skew: 1 32 | 33 | authentication_backend: 34 | disable_reset_password: false 35 | refresh_interval: 5m 36 | file: 37 | path: /config/users_database.yml #this is where your authorized users are stored 38 | password: 39 | algorithm: argon2id 40 | iterations: 1 41 | key_length: 32 42 | salt_length: 16 43 | memory: 1024 44 | parallelism: 8 45 | 46 | access_control: 47 | default_policy: deny 48 | rules: 49 | ## bypass rule 50 | - domain: "auth.laosu.ml" #This should be your authentication URL,这里不要带端口 51 | policy: bypass 52 | - domain: 53 | - "ad.laosu.ml" #example domain to protect,这里不要带端口 54 | - "sp1.laosu.ml" #example domain to protect,这里不要带端口 55 | policy: one_factor 56 | - domain: 57 | - "nas.laosu.ml" #example subdomain to protect,这里不要带端口 58 | - "n8n.laosu.ml" #example subdomain to protect,这里不要带端口 59 | policy: two_factor 60 | 61 | session: 62 | name: authelia_session 63 | secret: unsecure_session_secret #any text or number you want to add here to create jwt Token 64 | expiration: 3600 # 1 hour 65 | inactivity: 300 # 5 minutes 66 | domain: laosu.ml # Should match whatever your root protected domain is,这里不要带端口 67 | 68 | regulation: 69 | max_retries: 3 70 | find_time: 10m 71 | ban_time: 12h 72 | 73 | storage: 74 | local: 75 | path: /config/db.sqlite3 #数据库,也可以使用 MySQL. 76 | encryption_key: tujXiHx2ety6HRErqquML35m #用于加密数据库的随机值,大于12位 77 | 78 | 79 | notifier: 80 | disable_startup_check: true 81 | smtp: 82 | host: smtp.88.com # 邮件 SMTP 服务器地址 83 | port: 465 # 邮件 SMTP 服务器端口 84 | timeout: 5s # 超时 85 | username: youremail@88.com # 用户名 86 | password: <你的邮件密码> # 密码 87 | sender: "laosu " 88 | identifier: localhost 89 | subject: "[Authelia] {title}" 90 | startup_check_address: youremail@88.com 91 | disable_require_tls: false 92 | disable_html_emails: false 93 | 94 | tls: 95 | skip_verify: false 96 | minimum_version: TLS1.2 -------------------------------------------------------------------------------- /authelia/protected_domain.conf: -------------------------------------------------------------------------------- 1 | location /authelia { 2 | internal; 3 | set $upstream_authelia http://192.168.0.199:9091/api/verify; # authelia 的 ip 和端口 4 | proxy_pass_request_body off; 5 | proxy_pass $upstream_authelia; 6 | proxy_set_header Content-Length ""; 7 | 8 | # Timeout if the real server is dead 9 | proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; 10 | client_body_buffer_size 128k; 11 | proxy_set_header Host $http_host; 12 | proxy_set_header X-Original-URL $scheme://$http_host$request_uri; 13 | proxy_set_header X-Real-IP $remote_addr; 14 | proxy_set_header X-Forwarded-For $remote_addr; 15 | proxy_set_header X-Forwarded-Proto $scheme; 16 | proxy_set_header X-Forwarded-Host $http_host; 17 | proxy_set_header X-Forwarded-Uri $request_uri; 18 | proxy_set_header X-Forwarded-Ssl on; 19 | proxy_redirect http:// $scheme://; 20 | proxy_http_version 1.1; 21 | proxy_set_header Connection ""; 22 | proxy_cache_bypass $cookie_session; 23 | proxy_no_cache $cookie_session; 24 | proxy_buffers 4 32k; 25 | 26 | send_timeout 5m; 27 | proxy_read_timeout 240; 28 | proxy_send_timeout 240; 29 | proxy_connect_timeout 240; 30 | } 31 | 32 | location / { 33 | set $upstream_speedtest http://192.168.0.199:8180; # 更改应用的名称, IP 和端口 34 | proxy_pass $upstream_speedtest; # 更改应用的名称,一般可以用 upstream_应用名称 的方式 35 | 36 | auth_request /authelia; 37 | auth_request_set $target_url $scheme://$http_host$request_uri; 38 | auth_request_set $user $upstream_http_remote_user; 39 | auth_request_set $groups $upstream_http_remote_groups; 40 | proxy_set_header Remote-User $user; 41 | proxy_set_header Remote-Groups $groups; 42 | error_page 401 =302 https://auth.laosu.ml:444/?rd=$target_url; # 改为你的 authelia 域名,有端口也要带上 43 | 44 | client_body_buffer_size 128k; 45 | 46 | proxy_next_upstream error timeout invalid_header http_500 http_502 http_503; 47 | 48 | send_timeout 5m; 49 | proxy_read_timeout 360; 50 | proxy_send_timeout 360; 51 | proxy_connect_timeout 360; 52 | 53 | proxy_set_header Host $http_host; 54 | proxy_set_header X-Real-IP $remote_addr; 55 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 56 | proxy_set_header X-Forwarded-Proto $scheme; 57 | proxy_set_header X-Forwarded-Host $http_host; 58 | proxy_set_header X-Forwarded-Uri $request_uri; 59 | proxy_set_header X-Forwarded-Ssl on; 60 | proxy_redirect http:// $scheme://; 61 | proxy_http_version 1.1; 62 | proxy_set_header Connection ""; 63 | proxy_cache_bypass $cookie_session; 64 | proxy_no_cache $cookie_session; 65 | proxy_buffers 64 256k; 66 | 67 | set_real_ip_from 192.168.0.0/16; 68 | real_ip_header X-Forwarded-For; 69 | real_ip_recursive on; 70 | } -------------------------------------------------------------------------------- /authelia/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 authelia 相关的设置 2 | 3 | 4 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 5 | 6 | 欢迎关注公众号: 7 | 8 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 9 | -------------------------------------------------------------------------------- /authelia/users_database.yml: -------------------------------------------------------------------------------- 1 | --- 2 | ############################################################### 3 | # Users Database # 4 | ############################################################### 5 | 6 | # This file can be used if you do not have an LDAP set up. 7 | 8 | # List of users 9 | users: 10 | authelia: 11 | displayname: "Authelia User" 12 | # 密码是 is 123456 13 | password: "$argon2id$v=19$m=65536,t=1,p=8$MzV1MWw4U0FtZ3hzek9hZg$35thNbH+Vu5is9B3t57XlfHy4k7Co0sB1qabYkHGDUg" # yamllint disable-line rule:line-length 14 | email: wbsu2003@hotmail.com 15 | groups: 16 | - admins 17 | - dev 18 | ... -------------------------------------------------------------------------------- /dootask/.env: -------------------------------------------------------------------------------- 1 | APP_NAME=Dootask 2 | APP_ENV=local 3 | APP_KEY=CftDzPNs38fHbnA2esT5kWrJXJmLrzxR 4 | APP_DEBUG=true 5 | APP_SCHEME=auto 6 | APP_URL=http://192.168.0.114 7 | 8 | APP_ID=b11de8 9 | APP_IPPR=172.68.0 10 | APP_PORT=2222 11 | 12 | LOG_CHANNEL=stack 13 | LOG_LEVEL=debug 14 | 15 | DB_CONNECTION=mysql 16 | DB_HOST="${APP_IPPR}.5" 17 | DB_PORT=3306 18 | DB_DATABASE=dootask 19 | DB_USERNAME=dootask 20 | DB_PASSWORD=123456 21 | 22 | DB_ROOT_PASSWORD=a1d3ed86997cb69f 23 | DB_PREFIX=pre_ 24 | 25 | BROADCAST_DRIVER=log 26 | CACHE_DRIVER=redis 27 | QUEUE_CONNECTION=redis 28 | SESSION_DRIVER=redis 29 | SESSION_LIFETIME=120 30 | 31 | MEMCACHED_HOST=127.0.0.1 32 | 33 | REDIS_HOST="${APP_IPPR}.4" 34 | REDIS_PASSWORD=null 35 | REDIS_PORT=6379 36 | 37 | MAIL_MAILER=smtp 38 | MAIL_HOST=mailhog 39 | MAIL_PORT=1025 40 | MAIL_USERNAME=null 41 | MAIL_PASSWORD=null 42 | MAIL_ENCRYPTION=null 43 | MAIL_FROM_ADDRESS=null 44 | MAIL_FROM_NAME="${APP_NAME}" 45 | 46 | AWS_ACCESS_KEY_ID= 47 | AWS_SECRET_ACCESS_KEY= 48 | AWS_DEFAULT_REGION=us-east-1 49 | AWS_BUCKET= 50 | 51 | PUSHER_APP_ID= 52 | PUSHER_APP_KEY= 53 | PUSHER_APP_SECRET= 54 | PUSHER_APP_CLUSTER=mt1 55 | 56 | MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}" 57 | MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}" 58 | 59 | LARAVELS_LISTEN_IP=0.0.0.0 60 | LARAVELS_LISTEN_PORT=20000 61 | -------------------------------------------------------------------------------- /dootask/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3' 2 | 3 | services: 4 | php: 5 | container_name: "dootask-php-${APP_ID}" 6 | image: "kuaifan/php:swoole-8.0" 7 | shm_size: "1024m" 8 | volumes: 9 | - ./docker/crontab/crontab.conf:/etc/supervisor/conf.d/crontab.conf 10 | - ./docker/php/php.conf:/etc/supervisor/conf.d/php.conf 11 | - ./docker/php/php.ini:/usr/local/etc/php/php.ini 12 | - ./docker/log/supervisor:/var/log/supervisor 13 | - ./:/var/www 14 | environment: 15 | TZ: "Asia/Shanghai" 16 | LANG: "C.UTF-8" 17 | MODE: "production" 18 | MYSQL_HOST: "${DB_HOST}" 19 | MYSQL_PORT: "${DB_PORT}" 20 | MYSQL_DB_NAME: "${DB_DATABASE}" 21 | MYSQL_USERNAME: "${DB_USERNAME}" 22 | MYSQL_PASSWORD: "${DB_PASSWORD}" 23 | networks: 24 | extnetwork: 25 | ipv4_address: "${APP_IPPR}.2" 26 | depends_on: 27 | - redis 28 | - mariadb 29 | restart: unless-stopped 30 | 31 | nginx: 32 | container_name: "dootask-nginx-${APP_ID}" 33 | image: "nginx:alpine" 34 | ports: 35 | - "${APP_PORT}:80" 36 | volumes: 37 | - ./docker/nginx:/etc/nginx/conf.d 38 | - ./public:/var/www/public 39 | environment: 40 | TZ: "Asia/Shanghai" 41 | networks: 42 | extnetwork: 43 | ipv4_address: "${APP_IPPR}.3" 44 | links: 45 | - php 46 | - office 47 | - fileview 48 | - drawio-webapp 49 | - drawio-export 50 | restart: unless-stopped 51 | 52 | redis: 53 | container_name: "dootask-redis-${APP_ID}" 54 | image: "redis:alpine" 55 | environment: 56 | TZ: "Asia/Shanghai" 57 | networks: 58 | extnetwork: 59 | ipv4_address: "${APP_IPPR}.4" 60 | restart: unless-stopped 61 | 62 | mariadb: 63 | container_name: "dootask-mariadb-${APP_ID}" 64 | image: "mariadb" 65 | ports: 66 | # mysql ports item 67 | - "33062:3306" # mysql ports value 68 | volumes: 69 | - ./docker/mysql/repassword.sh:/etc/mysql/repassword.sh 70 | - ./docker/mysql/conf.d:/etc/mysql/conf.d 71 | - ./docker/mysql/data:/var/lib/mysql 72 | environment: 73 | TZ: "Asia/Shanghai" 74 | MYSQL_PREFIX: "${DB_PREFIX}" 75 | MYSQL_ROOT_PASSWORD: "${DB_ROOT_PASSWORD}" 76 | MYSQL_DATABASE: "${DB_DATABASE}" 77 | MYSQL_USER: "${DB_USERNAME}" 78 | MYSQL_PASSWORD: "${DB_PASSWORD}" 79 | networks: 80 | extnetwork: 81 | ipv4_address: "${APP_IPPR}.5" 82 | restart: unless-stopped 83 | 84 | office: 85 | container_name: "dootask-office-${APP_ID}" 86 | image: "onlyoffice/documentserver:7.0.0.132" 87 | environment: 88 | TZ: "Asia/Shanghai" 89 | networks: 90 | extnetwork: 91 | ipv4_address: "${APP_IPPR}.6" 92 | restart: unless-stopped 93 | 94 | fileview: 95 | container_name: "dootask-fileview-${APP_ID}" 96 | image: "kuaifan/fileview:4.1.0-SNAPSHOT-RC3" 97 | environment: 98 | TZ: "Asia/Shanghai" 99 | KK_CONTEXT_PATH: "/fileview" 100 | networks: 101 | extnetwork: 102 | ipv4_address: "${APP_IPPR}.7" 103 | restart: unless-stopped 104 | 105 | drawio-webapp: 106 | container_name: "dootask-drawio-webapp-${APP_ID}" 107 | image: "jgraph/drawio:16.6.1" 108 | networks: 109 | extnetwork: 110 | ipv4_address: "${APP_IPPR}.8" 111 | environment: 112 | TZ: "Asia/Shanghai" 113 | depends_on: 114 | - drawio-export 115 | restart: unless-stopped 116 | 117 | drawio-export: 118 | container_name: "dootask-drawio-export-${APP_ID}" 119 | image: "jgraph/export-server" 120 | networks: 121 | extnetwork: 122 | ipv4_address: "${APP_IPPR}.9" 123 | environment: 124 | TZ: "Asia/Shanghai" 125 | volumes: 126 | - ./docker/drawio/export/fonts:/usr/share/fonts/drawio 127 | restart: unless-stopped 128 | 129 | networks: 130 | extnetwork: 131 | ipam: 132 | config: 133 | - subnet: "172.68.0.0/24" 134 | -------------------------------------------------------------------------------- /dootask/readme.md: -------------------------------------------------------------------------------- 1 | 2 | ```bash 3 | # 使用gitee克隆项目到您的本地或服务器 4 | git clone https://gitee.com/aipaw/dootask.git 5 | 6 | # 进入目录 7 | cd dootask 8 | 9 | # 一键安装项目(自定义端口安装 ./cmd install --port 2222) 10 | ./cmd install 11 | 12 | # 一键启动 13 | docker-compose up -d 14 | 15 | # 一键删除 16 | docker-compose down 17 | ``` 18 | -------------------------------------------------------------------------------- /immich/.env: -------------------------------------------------------------------------------- 1 | # 数据库 2 | DB_USERNAME=postgres 3 | DB_PASSWORD=postgres 4 | DB_DATABASE_NAME=immich 5 | DB_LOCATION=./data 6 | 7 | # Redis 8 | REDIS_HOSTNAME=immich_redis 9 | 10 | # 上传文件配置 11 | UPLOAD_LOCATION=./upload 12 | 13 | #JWT SECRET 14 | JWT_SECRET=RdjXLHfm3gTcqWq7z6GBwtyipvuHMBMiZ2VygWLVRCBdWdSBgP9jSEk5E9Y8Xhhy 15 | 16 | # MAPBOX 17 | ## ENABLE_MAPBOX -> 如果为真,则必须提供 MAPBOX_KEY 18 | ENABLE_MAPBOX=false 19 | MAPBOX_KEY= 20 | 21 | # 网页地址 22 | VITE_SERVER_ENDPOINT=http://192.168.0.197:2383 23 | -------------------------------------------------------------------------------- /immich/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3.8" 2 | 3 | services: 4 | immich-server: 5 | image: altran1502/immich-server:latest 6 | entrypoint: [ "/bin/sh", "./start-server.sh" ] 7 | expose: 8 | - "3000" 9 | volumes: 10 | - ${UPLOAD_LOCATION}:/usr/src/app/upload 11 | env_file: 12 | - .env 13 | environment: 14 | - NODE_ENV=production 15 | depends_on: 16 | - redis 17 | - database 18 | networks: 19 | - immich-network 20 | restart: always 21 | 22 | immich-microservices: 23 | image: altran1502/immich-server:latest 24 | entrypoint: [ "/bin/sh", "./start-microservices.sh" ] 25 | volumes: 26 | - ${UPLOAD_LOCATION}:/usr/src/app/upload 27 | env_file: 28 | - .env 29 | environment: 30 | - NODE_ENV=production 31 | depends_on: 32 | - redis 33 | - database 34 | networks: 35 | - immich-network 36 | restart: always 37 | 38 | immich-machine-learning: 39 | image: altran1502/immich-machine-learning:latest 40 | entrypoint: [ "/bin/sh", "./entrypoint.sh" ] 41 | expose: 42 | - "3001" 43 | volumes: 44 | - ${UPLOAD_LOCATION}:/usr/src/app/upload 45 | env_file: 46 | - .env 47 | environment: 48 | - NODE_ENV=production 49 | depends_on: 50 | - database 51 | networks: 52 | - immich-network 53 | restart: always 54 | 55 | immich-web: 56 | image: altran1502/immich-web:latest 57 | entrypoint: [ "/bin/sh", "./entrypoint.sh" ] 58 | env_file: 59 | - .env 60 | ports: 61 | - 2385:3000 62 | networks: 63 | - immich-network 64 | restart: always 65 | 66 | redis: 67 | container_name: immich_redis 68 | image: redis:6.2 69 | networks: 70 | - immich-network 71 | restart: always 72 | 73 | database: 74 | container_name: immich_postgres 75 | image: postgres:14 76 | env_file: 77 | - .env 78 | environment: 79 | POSTGRES_PASSWORD: ${DB_PASSWORD} 80 | POSTGRES_USER: ${DB_USERNAME} 81 | POSTGRES_DB: ${DB_DATABASE_NAME} 82 | PG_DATA: /var/lib/postgresql/data 83 | volumes: 84 | - ${DB_LOCATION}:/var/lib/postgresql/data 85 | ports: 86 | - 5440:5432 87 | networks: 88 | - immich-network 89 | restart: always 90 | 91 | nginx: 92 | container_name: proxy_nginx 93 | image: nginx:latest 94 | volumes: 95 | - ./settings/nginx-conf:/etc/nginx/conf.d 96 | ports: 97 | - 2383:80 98 | - 2384:443 99 | logging: 100 | driver: none 101 | networks: 102 | - immich-network 103 | depends_on: 104 | - immich-server 105 | restart: always 106 | 107 | networks: 108 | immich-network: 109 | -------------------------------------------------------------------------------- /immich/immich.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/immich/immich.zip -------------------------------------------------------------------------------- /immich/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 Immich 相关的设置 2 | 3 | 4 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 5 | 6 | 7 | 欢迎关注公众号: 8 | 9 | 10 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 11 | -------------------------------------------------------------------------------- /immich/settings/nginx-conf/nginx.conf: -------------------------------------------------------------------------------- 1 | map $http_upgrade $connection_upgrade { 2 | default upgrade; 3 | '' close; 4 | } 5 | 6 | # events { 7 | # worker_connections 1000; 8 | # } 9 | 10 | server { 11 | 12 | gzip on; 13 | gzip_min_length 1000; 14 | gunzip on; 15 | 16 | client_max_body_size 50000M; 17 | 18 | listen 80; 19 | access_log off; 20 | 21 | location / { 22 | 23 | # Compression 24 | gzip_static on; 25 | gzip_min_length 1000; 26 | gzip_comp_level 2; 27 | 28 | proxy_buffering off; 29 | proxy_buffer_size 16k; 30 | proxy_busy_buffers_size 24k; 31 | proxy_buffers 64 4k; 32 | proxy_force_ranges on; 33 | 34 | proxy_http_version 1.1; 35 | proxy_set_header Host $host; 36 | proxy_set_header X-Real-IP $remote_addr; 37 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 38 | proxy_set_header X-Forwarded-Proto $scheme; 39 | proxy_set_header Upgrade $http_upgrade; 40 | proxy_set_header Connection "upgrade"; 41 | proxy_set_header Host $host; 42 | 43 | proxy_pass http://immich-server:3000; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /outline(OIDC)/configuration.yml: -------------------------------------------------------------------------------- 1 | # yamllint disable rule:comments-indentation 2 | --- 3 | ############################################################################### 4 | # Authelia Configuration # 5 | ############################################################################### 6 | 7 | theme: light #light/dark 8 | jwt_secret: 7tiqSgZY8kb8JthmoVoHWja2 #any text or number you want to add here to create jwt Token 9 | 10 | default_redirection_url: https://auth.laosu.ml:444 # where to redirect for a non-existent URL,一般填 authelia 的完整域名,有端口也要带上 11 | 12 | server: 13 | host: 0.0.0.0 14 | port: 9091 15 | path: "" 16 | read_buffer_size: 4096 17 | write_buffer_size: 4096 18 | enable_pprof: false 19 | enable_expvars: false 20 | disable_healthcheck: false 21 | tls: 22 | key: "" 23 | certificate: "" 24 | 25 | log: 26 | level: debug 27 | 28 | totp: 29 | issuer: laosu.ml #your authelia top-level domain,这里不要带端口 30 | period: 30 31 | skew: 1 32 | 33 | authentication_backend: 34 | disable_reset_password: false 35 | refresh_interval: 5m 36 | file: 37 | path: /config/users_database.yml #this is where your authorized users are stored 38 | password: 39 | algorithm: argon2id 40 | iterations: 1 41 | key_length: 32 42 | salt_length: 16 43 | memory: 1024 44 | parallelism: 8 45 | 46 | access_control: 47 | default_policy: deny 48 | rules: 49 | ## bypass rule 50 | - domain: "auth.laosu.ml" #This should be your authentication URL,这里不要带端口 51 | policy: bypass 52 | - domain: 53 | - "ad.laosu.ml" #example domain to protect,这里不要带端口 54 | - "sp1.laosu.ml" #example domain to protect,这里不要带端口 55 | policy: one_factor 56 | - domain: 57 | - "nas.laosu.ml" #example subdomain to protect,这里不要带端口 58 | - "n8n.laosu.ml" #example subdomain to protect,这里不要带端口 59 | policy: two_factor 60 | 61 | session: 62 | name: authelia_session 63 | secret: unsecure_session_secret #any text or number you want to add here to create jwt Token 64 | expiration: 3600 # 1 hour 65 | inactivity: 300 # 5 minutes 66 | domain: laosu.ml # Should match whatever your root protected domain is,这里不要带端口 67 | 68 | regulation: 69 | max_retries: 3 70 | find_time: 10m 71 | ban_time: 12h 72 | 73 | storage: 74 | local: 75 | path: /config/db.sqlite3 #数据库,也可以使用 MySQL. 76 | encryption_key: tujXiHx2ety6HRErqquML35m #用于加密数据库的随机值,大于12位 77 | 78 | 79 | notifier: 80 | disable_startup_check: true 81 | smtp: 82 | host: smtp.88.com # 邮件 SMTP 服务器地址 83 | port: 465 # 邮件 SMTP 服务器端口 84 | timeout: 5s # 超时 85 | username: youremail@88.com # 用户名 86 | password: <你的邮件密码> # 密码 87 | sender: "laosu " 88 | identifier: localhost 89 | subject: "[Authelia] {title}" 90 | startup_check_address: youremail@88.com 91 | disable_require_tls: false 92 | disable_html_emails: false 93 | 94 | tls: 95 | skip_verify: false 96 | minimum_version: TLS1.2 97 | 98 | identity_providers: 99 | oidc: 100 | hmac_secret: 5j3eDiVN3loXd4DRb4qdRH3HP1tTULH5VyRbKBxVedFunY9Wlgh0G7DyAORG4N5v 101 | issuer_private_key: | 102 | -----BEGIN RSA PRIVATE KEY----- 103 | MIIEpAIBAAKC... 104 | -----END RSA PRIVATE KEY----- 105 | access_token_lifespan: 1h 106 | authorize_code_lifespan: 1m 107 | id_token_lifespan: 1h 108 | refresh_token_lifespan: 90m 109 | enable_client_debug_messages: false 110 | clients: 111 | - id: outline 112 | description: Outline Wiki 113 | secret: 856d53b8eb53c6d4e30194a2 114 | public: false 115 | authorization_policy: two_factor 116 | audience: [] 117 | scopes: 118 | - openid 119 | - groups 120 | - email 121 | - profile 122 | redirect_uris: 123 | - https://ot.laosu.ml:444/auth/oidc.callback 124 | grant_types: 125 | - refresh_token 126 | - authorization_code 127 | response_types: 128 | - code 129 | response_modes: 130 | - form_post 131 | - query 132 | - fragment 133 | userinfo_signing_algorithm: none -------------------------------------------------------------------------------- /outline(OIDC)/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | 4 | outline: 5 | image: outlinewiki/outline 6 | container_name: ${OUTLINE_HOST} 7 | ports: 8 | - "6070:3000" 9 | depends_on: 10 | - postgres 11 | - redis 12 | - storage 13 | command: sh -c "yarn sequelize:migrate --env production-ssl-disabled && yarn start" 14 | environment: 15 | - SECRET_KEY=${SECRET_KEY} 16 | - UTILS_SECRET=${UTILS_SECRET} 17 | - URL=${URL} 18 | - PORT=${PORT} 19 | - DATABASE_URL=${DATABASE_URL} 20 | - PGSSLMODE=${PGSSLMODE} 21 | - REDIS_URL=${REDIS_URL} 22 | - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} 23 | - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} 24 | - AWS_REGION=${AWS_REGION} 25 | - AWS_S3_UPLOAD_BUCKET_URL=${AWS_S3_UPLOAD_BUCKET_URL} 26 | - AWS_S3_UPLOAD_BUCKET_NAME=${AWS_S3_UPLOAD_BUCKET_NAME} 27 | - AWS_S3_UPLOAD_MAX_SIZE=${AWS_S3_UPLOAD_MAX_SIZE} 28 | - AWS_S3_FORCE_PATH_STYLE=${AWS_S3_FORCE_PATH_STYLE} 29 | - AWS_S3_ACL=${AWS_S3_ACL} 30 | - FORCE_HTTPS=${FORCE_HTTPS} 31 | - DEBUG=${DEBUG} 32 | - DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE} 33 | # - SLACK_KEY=${SLACK_KEY} 34 | # - SLACK_SECRET=${SLACK_SECRET} 35 | # - AZURE_CLIENT_ID=${AZURE_CLIENT_ID} 36 | # - AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} 37 | # - AZURE_RESOURCE_APP_ID=${AZURE_RESOURCE_APP_ID} 38 | - OIDC_CLIENT_ID=${OIDC_CLIENT_ID} 39 | - OIDC_CLIENT_SECRET=${OIDC_CLIENT_SECRET} 40 | - OIDC_AUTH_URI=${OIDC_AUTH_URI} 41 | - OIDC_TOKEN_URI=${OIDC_TOKEN_URI} 42 | - OIDC_USERINFO_URI=${OIDC_USERINFO_URI} 43 | - OIDC_USERNAME_CLAIM=${OIDC_USERNAME_CLAIM} 44 | - OIDC_DISPLAY_NAME=${OIDC_DISPLAY_NAME} 45 | - OIDC_SCOPES=${OIDC_SCOPES} 46 | 47 | redis: 48 | image: redis 49 | container_name: ${REDIS_HOST} 50 | ports: 51 | - "6479:6379" 52 | healthcheck: 53 | test: ["CMD", "redis-cli", "ping"] 54 | interval: 10s 55 | timeout: 30s 56 | retries: 3 57 | 58 | postgres: 59 | image: postgres 60 | container_name: ${POSTGRES_HOST} 61 | ports: 62 | - "5532:5432" 63 | volumes: 64 | - /volume2/docker/outline/data:/var/lib/postgresql/data 65 | environment: 66 | POSTGRES_USER: ${POSTGRES_USER} 67 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 68 | POSTGRES_DB: ${POSTGRES_DB} 69 | healthcheck: 70 | test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"] 71 | interval: 30s 72 | timeout: 20s 73 | retries: 3 74 | 75 | storage: 76 | image: minio/minio 77 | container_name: ${MINIO_HOST} 78 | ports: 79 | - "9100:9000" 80 | - "9101:9001" 81 | entrypoint: sh 82 | command: -c 'minio server /data --console-address ":9001"' 83 | deploy: 84 | restart_policy: 85 | condition: on-failure 86 | volumes: 87 | - /volume2/docker/outline/fakes3:/data 88 | # - /volume2/docker/outline/config:/root/.minio 89 | environment: 90 | MINIO_ROOT_USER: ${MINIO_ROOT_USER} 91 | MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD} 92 | MINIO_SERVER_URL: http://${SYNOLOGY_IP}:9100 93 | MINIO_BROWSER_REDIRECT_URL: http://${SYNOLOGY_IP}:9101 94 | healthcheck: 95 | test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] 96 | interval: 30s 97 | timeout: 20s 98 | retries: 3 99 | -------------------------------------------------------------------------------- /outline(OIDC)/docker.env.txt: -------------------------------------------------------------------------------- 1 | # –––––––––––––––– 通用参数 –––––––––––––––– 2 | SYNOLOGY_IP=192.168.0.197 3 | OUTLINE_URL=https://ot.laosu.ml:444 4 | MINIO_URL=https://s3.laosu.ml:444 5 | YOUR_SLACK_KEY=填入在 Slack 获取的 Client ID 6 | YOUR_SLACK_SECRET=填入在 Slack 获取的 Client Secret 7 | 8 | YOUR_OIDC_CLIENT_ID=outline 9 | YOUR_OIDC_CLIENT_SECRET=856d53b8eb53c6d4e30194a2 10 | AUTHELIA_URL=https://auth.laosu.ml:444 11 | 12 | # –––––––––––––––– POSTGRES相关参数 –––––––––––––––– 13 | POSTGRES_HOST=ol-postgres 14 | POSTGRES_USER=outline 15 | POSTGRES_PASSWORD=ec25cee20b82 16 | POSTGRES_DB=outline 17 | 18 | # –––––––––––––––– REDIS相关参数 –––––––––––––––– 19 | REDIS_HOST=ol-redis 20 | REDIS_URL=redis://${REDIS_HOST}:6379 21 | 22 | # –––––––––––––––– MINIO相关参数 –––––––––––––––– 23 | MINIO_HOST=ol-minio 24 | MINIO_ROOT_USER=laosu 25 | MINIO_ROOT_PASSWORD=N8L53ddpZjCt 26 | 27 | # –––––––––––––––– OUTLINE相关参数 –––––––––––––––– 28 | OUTLINE_HOST=ol-outline 29 | SECRET_KEY=c344e03be80679185357463d8e4b6e7c8395bb96efd16cc864647ac59cd6388c 30 | UTILS_SECRET=500435ac8059e8ecf4ba3ec25cee20b01e4849ff469b8225eaf216115757121c 31 | URL=${OUTLINE_URL} 32 | PORT=3000 33 | 34 | DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB} 35 | PGSSLMODE=disable 36 | 37 | AWS_REGION=us-east-2 38 | AWS_S3_FORCE_PATH_STYLE=true 39 | AWS_S3_UPLOAD_BUCKET_NAME=outline 40 | #AWS_S3_UPLOAD_BUCKET_URL=http://${MINIO_HOST}:9000 41 | AWS_S3_UPLOAD_BUCKET_URL=${MINIO_URL} 42 | AWS_S3_UPLOAD_MAX_SIZE=26214400 43 | AWS_ACCESS_KEY_ID=${MINIO_ROOT_USER} 44 | AWS_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD} 45 | AWS_S3_ACL=private 46 | 47 | # –––––––––––––– AUTHENTICATION –––––––––––––– 48 | 49 | # Third party signin credentials, at least ONE OF EITHER Google, Slack, 50 | # or Microsoft is required for a working installation or you'll have no sign-in 51 | # options. 52 | 53 | # To configure Slack auth, you'll need to create an Application at 54 | # => https://api.slack.com/apps 55 | # 56 | # When configuring the Client ID, add a redirect URL under "OAuth & Permissions": 57 | # https:///auth/slack.callback 58 | SLACK_KEY=${YOUR_SLACK_KEY} 59 | SLACK_SECRET=${YOUR_SLACK_SECRET} 60 | 61 | # To configure Google auth, you'll need to create an OAuth Client ID at 62 | # => https://console.cloud.google.com/apis/credentials 63 | # 64 | # When configuring the Client ID, add an Authorized redirect URI: 65 | # https:///auth/google.callback 66 | GOOGLE_CLIENT_ID= 67 | GOOGLE_CLIENT_SECRET= 68 | 69 | # To configure Microsoft/Azure auth, you'll need to create an OAuth Client. See 70 | # the guide for details on setting up your Azure App: 71 | # => https://wiki.generaloutline.com/share/dfa77e56-d4d2-4b51-8ff8-84ea6608faa4 72 | AZURE_CLIENT_ID= 73 | AZURE_CLIENT_SECRET= 74 | AZURE_RESOURCE_APP_ID= 75 | 76 | # To configure generic OIDC auth, you'll need some kind of identity provider. 77 | # See documentation for whichever IdP you use to acquire the following info: 78 | # Redirect URI is https:///auth/oidc.callback 79 | OIDC_CLIENT_ID=${YOUR_OIDC_CLIENT_ID} 80 | OIDC_CLIENT_SECRET=${YOUR_OIDC_CLIENT_SECRET} 81 | OIDC_AUTH_URI=${AUTHELIA_URL}/api/oidc/authorize 82 | OIDC_TOKEN_URI=${AUTHELIA_URL}/api/oidc/token 83 | OIDC_USERINFO_URI=${AUTHELIA_URL}/api/oidc/userinfo 84 | 85 | # Specify which claims to derive user information from 86 | # Supports any valid JSON path with the JWT payload 87 | OIDC_USERNAME_CLAIM=preferred_username 88 | 89 | # Display name for OIDC authentication 90 | OIDC_DISPLAY_NAME=Authelia 91 | 92 | # Space separated auth scopes. 93 | OIDC_SCOPES="openid profile email" 94 | 95 | 96 | # –––––––––––––––– OPTIONAL –––––––––––––––– 97 | 98 | # Base64 encoded private key and certificate for HTTPS termination. This is only 99 | # required if you do not use an external reverse proxy. See documentation: 100 | # https://wiki.generaloutline.com/share/1c922644-40d8-41fe-98f9-df2b67239d45 101 | SSL_KEY= 102 | SSL_CERT= 103 | 104 | # If using a Cloudfront/Cloudflare distribution or similar it can be set below. 105 | # This will cause paths to javascript, stylesheets, and images to be updated to 106 | # the hostname defined in CDN_URL. In your CDN configuration the origin server 107 | # should be set to the same as URL. 108 | CDN_URL= 109 | 110 | # Auto-redirect to https in production. The default is true but you may set to 111 | # false if you can be sure that SSL is terminated at an external loadbalancer. 112 | FORCE_HTTPS=true 113 | 114 | # Have the installation check for updates by sending anonymized statistics to 115 | # the maintainers 116 | ENABLE_UPDATES=true 117 | 118 | # How many processes should be spawned. As a reasonable rule divide your servers 119 | # available memory by 512 for a rough estimate 120 | WEB_CONCURRENCY=1 121 | 122 | # Override the maxium size of document imports, could be required if you have 123 | # especially large Word documents with embedded imagery 124 | MAXIMUM_IMPORT_SIZE=5120000 125 | 126 | # You can remove this line if your reverse proxy already logs incoming http 127 | # requests and this ends up being duplicative 128 | DEBUG=http 129 | 130 | # Comma separated list of domains to be allowed to signin to the wiki. If not 131 | # set, all domains are allowed by default when using Google OAuth to signin 132 | ALLOWED_DOMAINS= 133 | 134 | # For a complete Slack integration with search and posting to channels the 135 | # following configs are also needed, some more details 136 | # => https://wiki.generaloutline.com/share/be25efd1-b3ef-4450-b8e5-c4a4fc11e02a 137 | # 138 | SLACK_VERIFICATION_TOKEN=your_token 139 | SLACK_APP_ID=A0XXXXXXX 140 | SLACK_MESSAGE_ACTIONS=true 141 | 142 | # Optionally enable google analytics to track pageviews in the knowledge base 143 | GOOGLE_ANALYTICS_ID= 144 | 145 | # Optionally enable Sentry (sentry.io) to track errors and performance 146 | SENTRY_DSN= 147 | 148 | # To support sending outgoing transactional emails such as "document updated" or 149 | # "you've been invited" you'll need to provide authentication for an SMTP server 150 | SMTP_HOST= 151 | SMTP_PORT= 152 | SMTP_USERNAME= 153 | SMTP_PASSWORD= 154 | SMTP_FROM_EMAIL= 155 | SMTP_REPLY_EMAIL= 156 | SMTP_TLS_CIPHERS= 157 | SMTP_SECURE=true 158 | 159 | # Custom logo that displays on the authentication screen, scaled to height: 60px 160 | # TEAM_LOGO=https://example.com/images/logo.png 161 | 162 | # The default interface language. See translate.getoutline.com for a list of 163 | # available language codes and their rough percentage translated. 164 | DEFAULT_LANGUAGE=zh_CN -------------------------------------------------------------------------------- /outline(OIDC)/readme.md: -------------------------------------------------------------------------------- 1 | `Outline` 采用 `Authelia` 的 `OIDC` 认证的相关设置文件 2 | 3 | - `configuration.yml` 是 `Authelia` 的设置文件 4 | - `docker.env.txt` 是 `Outline` 的环境变量文件 5 | - `docker-compose.yml` 是 `Outline` 的一键启动文件 6 | -------------------------------------------------------------------------------- /outline/docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | services: 3 | 4 | outline: 5 | image: outlinewiki/outline 6 | container_name: ${OUTLINE_HOST} 7 | ports: 8 | - "6070:3000" 9 | depends_on: 10 | - postgres 11 | - redis 12 | - storage 13 | command: sh -c "yarn sequelize:migrate --env production-ssl-disabled && yarn start" 14 | environment: 15 | - SECRET_KEY=${SECRET_KEY} 16 | - UTILS_SECRET=${UTILS_SECRET} 17 | - URL=${URL} 18 | - PORT=${PORT} 19 | - DATABASE_URL=${DATABASE_URL} 20 | - PGSSLMODE=${PGSSLMODE} 21 | - REDIS_URL=${REDIS_URL} 22 | - AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID} 23 | - AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY} 24 | - AWS_REGION=${AWS_REGION} 25 | - AWS_S3_UPLOAD_BUCKET_URL=${AWS_S3_UPLOAD_BUCKET_URL} 26 | - AWS_S3_UPLOAD_BUCKET_NAME=${AWS_S3_UPLOAD_BUCKET_NAME} 27 | - AWS_S3_UPLOAD_MAX_SIZE=${AWS_S3_UPLOAD_MAX_SIZE} 28 | - AWS_S3_FORCE_PATH_STYLE=${AWS_S3_FORCE_PATH_STYLE} 29 | - AWS_S3_ACL=${AWS_S3_ACL} 30 | - FORCE_HTTPS=${FORCE_HTTPS} 31 | - DEBUG=${DEBUG} 32 | - DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE} 33 | - SLACK_KEY=${SLACK_KEY} 34 | - SLACK_SECRET=${SLACK_SECRET} 35 | # - AZURE_CLIENT_ID=${AZURE_CLIENT_ID} 36 | # - AZURE_CLIENT_SECRET=${AZURE_CLIENT_SECRET} 37 | # - AZURE_RESOURCE_APP_ID=${AZURE_RESOURCE_APP_ID} 38 | 39 | redis: 40 | image: redis 41 | container_name: ${REDIS_HOST} 42 | ports: 43 | - "6479:6379" 44 | healthcheck: 45 | test: ["CMD", "redis-cli", "ping"] 46 | interval: 10s 47 | timeout: 30s 48 | retries: 3 49 | 50 | postgres: 51 | image: postgres 52 | container_name: ${POSTGRES_HOST} 53 | ports: 54 | - "5532:5432" 55 | volumes: 56 | - /volume2/docker/outline/data:/var/lib/postgresql/data 57 | environment: 58 | POSTGRES_USER: ${POSTGRES_USER} 59 | POSTGRES_PASSWORD: ${POSTGRES_PASSWORD} 60 | POSTGRES_DB: ${POSTGRES_DB} 61 | healthcheck: 62 | test: ["CMD", "pg_isready", "-U", "${POSTGRES_USER}"] 63 | interval: 30s 64 | timeout: 20s 65 | retries: 3 66 | 67 | storage: 68 | image: minio/minio 69 | container_name: ${MINIO_HOST} 70 | ports: 71 | - "9100:9000" 72 | - "9101:9001" 73 | entrypoint: sh 74 | command: -c 'minio server /data --console-address ":9001"' 75 | deploy: 76 | restart_policy: 77 | condition: on-failure 78 | volumes: 79 | - /volume2/docker/outline/fakes3:/data 80 | # - /volume2/docker/outline/config:/root/.minio 81 | environment: 82 | MINIO_ROOT_USER: ${MINIO_ROOT_USER} 83 | MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD} 84 | MINIO_SERVER_URL: http://${SYNOLOGY_IP}:9100 85 | MINIO_BROWSER_REDIRECT_URL: http://${SYNOLOGY_IP}:9101 86 | healthcheck: 87 | test: ["CMD", "curl", "-f", "http://localhost:9000/minio/health/live"] 88 | interval: 30s 89 | timeout: 20s 90 | retries: 3 91 | -------------------------------------------------------------------------------- /outline/docker/docker.env.txt: -------------------------------------------------------------------------------- 1 | # –––––––––––––––– 通用参数 –––––––––––––––– 2 | SYNOLOGY_IP=192.168.0.197 3 | OUTLINE_URL=https://ot.laosu.ml:444 4 | MINIO_URL=https://s3.laosu.ml:444 5 | YOUR_SLACK_KEY=填入在 Slack 获取的 Client ID 6 | YOUR_SLACK_SECRET=填入在 Slack 获取的 Client Secret 7 | 8 | # –––––––––––––––– POSTGRES相关参数 –––––––––––––––– 9 | POSTGRES_HOST=ol-postgres 10 | POSTGRES_USER=outline 11 | POSTGRES_PASSWORD=ec25cee20b82 12 | POSTGRES_DB=outline 13 | 14 | # –––––––––––––––– REDIS相关参数 –––––––––––––––– 15 | REDIS_HOST=ol-redis 16 | REDIS_URL=redis://${REDIS_HOST}:6379 17 | 18 | # –––––––––––––––– MINIO相关参数 –––––––––––––––– 19 | MINIO_HOST=ol-minio 20 | MINIO_ROOT_USER=laosu 21 | MINIO_ROOT_PASSWORD=N8L53ddpZjCt 22 | 23 | # –––––––––––––––– OUTLINE相关参数 –––––––––––––––– 24 | OUTLINE_HOST=ol-outline 25 | SECRET_KEY=c344e03be80679185357463d8e4b6e7c8395bb96efd16cc864647ac59cd6388c 26 | UTILS_SECRET=500435ac8059e8ecf4ba3ec25cee20b01e4849ff469b8225eaf216115757121c 27 | URL=${OUTLINE_URL} 28 | PORT=3000 29 | 30 | DATABASE_URL=postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:5432/${POSTGRES_DB} 31 | PGSSLMODE=disable 32 | 33 | AWS_REGION=us-east-2 34 | AWS_S3_FORCE_PATH_STYLE=true 35 | AWS_S3_UPLOAD_BUCKET_NAME=outline 36 | #AWS_S3_UPLOAD_BUCKET_URL=http://${MINIO_HOST}:9000 37 | AWS_S3_UPLOAD_BUCKET_URL=${MINIO_URL} 38 | AWS_S3_UPLOAD_MAX_SIZE=26214400 39 | AWS_ACCESS_KEY_ID=${MINIO_ROOT_USER} 40 | AWS_SECRET_ACCESS_KEY=${MINIO_ROOT_PASSWORD} 41 | AWS_S3_ACL=private 42 | 43 | # –––––––––––––– AUTHENTICATION –––––––––––––– 44 | 45 | # Third party signin credentials, at least ONE OF EITHER Google, Slack, 46 | # or Microsoft is required for a working installation or you'll have no sign-in 47 | # options. 48 | 49 | # To configure Slack auth, you'll need to create an Application at 50 | # => https://api.slack.com/apps 51 | # 52 | # When configuring the Client ID, add a redirect URL under "OAuth & Permissions": 53 | # https:///auth/slack.callback 54 | SLACK_KEY=${YOUR_SLACK_KEY} 55 | SLACK_SECRET=${YOUR_SLACK_SECRET} 56 | 57 | # To configure Google auth, you'll need to create an OAuth Client ID at 58 | # => https://console.cloud.google.com/apis/credentials 59 | # 60 | # When configuring the Client ID, add an Authorized redirect URI: 61 | # https:///auth/google.callback 62 | GOOGLE_CLIENT_ID= 63 | GOOGLE_CLIENT_SECRET= 64 | 65 | # To configure Microsoft/Azure auth, you'll need to create an OAuth Client. See 66 | # the guide for details on setting up your Azure App: 67 | # => https://wiki.generaloutline.com/share/dfa77e56-d4d2-4b51-8ff8-84ea6608faa4 68 | AZURE_CLIENT_ID= 69 | AZURE_CLIENT_SECRET= 70 | AZURE_RESOURCE_APP_ID= 71 | 72 | # To configure generic OIDC auth, you'll need some kind of identity provider. 73 | # See documentation for whichever IdP you use to acquire the following info: 74 | # Redirect URI is https:///auth/oidc.callback 75 | OIDC_CLIENT_ID= 76 | OIDC_CLIENT_SECRET= 77 | OIDC_AUTH_URI= 78 | OIDC_TOKEN_URI= 79 | OIDC_USERINFO_URI= 80 | 81 | # Specify which claims to derive user information from 82 | # Supports any valid JSON path with the JWT payload 83 | OIDC_USERNAME_CLAIM=preferred_username 84 | 85 | # Display name for OIDC authentication 86 | OIDC_DISPLAY_NAME=OpenID 87 | 88 | # Space separated auth scopes. 89 | OIDC_SCOPES="openid profile email" 90 | 91 | 92 | # –––––––––––––––– OPTIONAL –––––––––––––––– 93 | 94 | # Base64 encoded private key and certificate for HTTPS termination. This is only 95 | # required if you do not use an external reverse proxy. See documentation: 96 | # https://wiki.generaloutline.com/share/1c922644-40d8-41fe-98f9-df2b67239d45 97 | SSL_KEY= 98 | SSL_CERT= 99 | 100 | # If using a Cloudfront/Cloudflare distribution or similar it can be set below. 101 | # This will cause paths to javascript, stylesheets, and images to be updated to 102 | # the hostname defined in CDN_URL. In your CDN configuration the origin server 103 | # should be set to the same as URL. 104 | CDN_URL= 105 | 106 | # Auto-redirect to https in production. The default is true but you may set to 107 | # false if you can be sure that SSL is terminated at an external loadbalancer. 108 | FORCE_HTTPS=true 109 | 110 | # Have the installation check for updates by sending anonymized statistics to 111 | # the maintainers 112 | ENABLE_UPDATES=true 113 | 114 | # How many processes should be spawned. As a reasonable rule divide your servers 115 | # available memory by 512 for a rough estimate 116 | WEB_CONCURRENCY=1 117 | 118 | # Override the maxium size of document imports, could be required if you have 119 | # especially large Word documents with embedded imagery 120 | MAXIMUM_IMPORT_SIZE=5120000 121 | 122 | # You can remove this line if your reverse proxy already logs incoming http 123 | # requests and this ends up being duplicative 124 | DEBUG=http 125 | 126 | # Comma separated list of domains to be allowed to signin to the wiki. If not 127 | # set, all domains are allowed by default when using Google OAuth to signin 128 | ALLOWED_DOMAINS= 129 | 130 | # For a complete Slack integration with search and posting to channels the 131 | # following configs are also needed, some more details 132 | # => https://wiki.generaloutline.com/share/be25efd1-b3ef-4450-b8e5-c4a4fc11e02a 133 | # 134 | SLACK_VERIFICATION_TOKEN=your_token 135 | SLACK_APP_ID=A0XXXXXXX 136 | SLACK_MESSAGE_ACTIONS=true 137 | 138 | # Optionally enable google analytics to track pageviews in the knowledge base 139 | GOOGLE_ANALYTICS_ID= 140 | 141 | # Optionally enable Sentry (sentry.io) to track errors and performance 142 | SENTRY_DSN= 143 | 144 | # To support sending outgoing transactional emails such as "document updated" or 145 | # "you've been invited" you'll need to provide authentication for an SMTP server 146 | SMTP_HOST= 147 | SMTP_PORT= 148 | SMTP_USERNAME= 149 | SMTP_PASSWORD= 150 | SMTP_FROM_EMAIL= 151 | SMTP_REPLY_EMAIL= 152 | SMTP_TLS_CIPHERS= 153 | SMTP_SECURE=true 154 | 155 | # Custom logo that displays on the authentication screen, scaled to height: 60px 156 | # TEAM_LOGO=https://example.com/images/logo.png 157 | 158 | # The default interface language. See translate.getoutline.com for a list of 159 | # available language codes and their rough percentage translated. 160 | DEFAULT_LANGUAGE=zh_CN 161 | -------------------------------------------------------------------------------- /outline/docker/readme.md: -------------------------------------------------------------------------------- 1 | 安装 outline 用到的环境变量文件 `docker.env.txt` 和 `docker-compose.yml` 文件 2 | 3 | > 之所以不是用的默认的 `.env` 而用 `docker.env.txt` 是为了在群晖上方便编辑; 4 | 5 | 6 | ```bash 7 | # 进入目录 8 | cd /volume2/docker/outline/ 9 | 10 | # 将 docker.env.txt 下载到 outline 目录 11 | curl -sSL https://raw.githubusercontent.com/wbsu2003/synology/main/outline/docker/docker.env.txt -o docker.env.txt 12 | 13 | # 国内用户如果下不动的话试试加代理这个 14 | curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/wbsu2003/synology/main/outline/docker/docker.env.txt -o docker.env.txt 15 | 16 | # 将 docker-compose.yml 下载到 outline 目录 17 | curl -sSL https://raw.githubusercontent.com/wbsu2003/synology/main/outline/docker/docker-compose.yml -o docker-compose.yml 18 | 19 | # 国内用户如果下不动的话试试加代理这个 20 | curl -sSL https://ghproxy.com/https://raw.githubusercontent.com/wbsu2003/synology/main/outline/docker/docker-compose.yml -o docker-compose.yml 21 | ``` 22 | 23 | 使用方法可以在 [老苏的blog:https://laosu.ml](https://laosu.ml) 找找,如果找不到,那说明还在折腾中~~ 24 | 25 | 欢迎关注公众号: 26 | 27 | ![各种折腾](https://laosu.ml/uploads/wechat-qcode.jpg) 28 | -------------------------------------------------------------------------------- /sqlite_backup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | export LC_ALL=C 3 | 4 | now=$(date +"%Y%m%d-%H%M%S") 5 | # parent_dir 请根据你自己的安装目录修改 6 | parent_dir="/volume1/docker/bitwarden" 7 | backups_dir="${parent_dir}/backups" 8 | log_file="${backups_dir}/backup-progress.log.${now}" 9 | tmp_sqlite_backup="backups/db.sqlite3.${now}" 10 | archive="backups/backup.tar.gz.${now}" 11 | 12 | error () { 13 | printf "%s: %s\n" "$(basename "${BASH_SOURCE}")" "${1}" >&2 14 | exit 1 15 | } 16 | 17 | trap 'error "An unexpected error occurred."' ERR 18 | 19 | take_backup () { 20 | cd "${parent_dir}" 21 | 22 | sqlite3 db.sqlite3 ".backup '${tmp_sqlite_backup}'" 23 | /bin/tar czf "${archive}" "${tmp_sqlite_backup}" attachments 24 | 25 | rm "${tmp_sqlite_backup}" 26 | 27 | find "${backups_dir}/" -type f -mtime +30 -exec rm {} \; 28 | } 29 | 30 | printf "\n=======================================================================" 31 | printf "\nBitwarden Backup" 32 | printf "\n=======================================================================" 33 | printf "\nBackup in progress..." 34 | 35 | take_backup 2> "${log_file}" 36 | 37 | if [[ -s "${log_file}" ]] 38 | then 39 | printf "\nBackup failure! Check ${log_file} for more information." 40 | printf "\n=======================================================================\n\n" 41 | else 42 | rm "${log_file}" 43 | printf "...SUCCESS!\n" 44 | printf "Backup created at ${backups_dir}/backup.tar.gz.${now}" 45 | printf "\n=======================================================================\n\n" 46 | fi 47 | -------------------------------------------------------------------------------- /synology-alertover.php: -------------------------------------------------------------------------------- 1 | isset($_GET['source']) ? $_GET['source'] : false, 24 | 'receiver' => isset($_GET['receiver']) ? $_GET['receiver'] : false, 25 | 'content' => isset($_GET['content']) ? $_GET['content'] : false, 26 | 'title' => isset($_GET['title']) ? $_GET['title'] : false 27 | ); 28 | // Remove empty values 29 | $options = array_filter($options); 30 | 31 | 32 | // Quit if not exactly 4 get values were found 33 | if (count($options) != 4) { 34 | echo 'invalid options'; 35 | die; 36 | } 37 | 38 | // Do Alertovover curl 39 | curl_setopt_array($ch = curl_init(), array( 40 | CURLOPT_URL => "https://api.alertover.com/v1/alert", 41 | CURLOPT_POSTFIELDS => $options, 42 | CURLOPT_SAFE_UPLOAD => true, 43 | )); 44 | curl_exec($ch); 45 | curl_close($ch); 46 | ?> 47 | -------------------------------------------------------------------------------- /synology-monitoring/readme.md: -------------------------------------------------------------------------------- 1 | 2 | 原项目地址:[https://github.com/kernelkaribou/synology-monitoring](https://github.com/kernelkaribou/synology-monitoring) 3 | 4 | 项目总共就 `2` 个文件 5 | 6 | ![](https://cdn.jsdelivr.net/gh/wbsu2003/images2022@main/picgo/2022/02/202202042050686.png) 7 | 8 | 其中 9 | 10 | - `Synology_dashboard.json` 用于 `Grafana` 的 `Dashboard` 界面显示 11 | - `synology_snmp.sh` 用于捕获群晖的 `SNMP` 信息并写入 `InfluxDB` 12 | 13 | # 设置参数 14 | 15 | `synology_snmp.sh` 原始代码运行会返回 `HTTP/1.1 401 Unauthorized`,老苏研究了一下,发现原代码中用的写入 `InfluxDB` 的方式似乎已经不支持了,所以老苏查了官方文档做了修改,在 `InfluxDB 2.1.1` 上测试通过 16 | 17 | ![](https://cdn.jsdelivr.net/gh/wbsu2003/images2022@main/picgo/2022/02/202202051841660.png) 18 | 19 | ## InfluxDB 设置 20 | 21 | 在 `InfluxDB` 设置部分屏蔽了 `3` 个参数,分别是 22 | 23 | - `influxdb_name` 24 | - `influxdb_user` 25 | - `influxdb_pass` 26 | 27 | ![](https://cdn.jsdelivr.net/gh/wbsu2003/images2022@main/picgo/2022/02/202202042116324.png) 28 | 29 | 然后新增了 `3` 个参数,分别是 30 | 31 | - `influxdb_token` 32 | - `influxdb_organization` 33 | - `influxdb_bucket` 34 | 35 | ![](https://cdn.jsdelivr.net/gh/wbsu2003/images2022@main/picgo/2022/02/202202051830421.png) 36 | 37 | ## 写入 InfluxDB 38 | 39 | 因为方式改了,所以原来写入 `InfluxDB` 的代码就不能用了,老苏注释了原来的代码 40 | 41 | ![](https://cdn.jsdelivr.net/gh/wbsu2003/images2022@main/picgo/2022/02/202202051835497.png) 42 | 43 | 新增加了下面这段来实现 `InfluxDB` 数据库的写入 44 | 45 | ```bash 46 | curl --request POST \ 47 | "$http_method://$influxdb_host:$influxdb_port/api/v2/write?org=$influxdb_organization&bucket=$influxdb_bucket&precision=ns" \ 48 | --header "Authorization: Token $influxdb_token" \ 49 | --header "Content-Type: text/plain; charset=utf-8" \ 50 | --header "Accept: application/json" \ 51 | --data-binary "$post_url" 52 | ``` 53 | -------------------------------------------------------------------------------- /typecho/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: '3.7' 2 | 3 | services: 4 | app: 5 | image: joyqi/typecho:nightly-php7.4-fpm 6 | container_name: typecho-server 7 | restart: always 8 | volumes: 9 | - ./www:/app 10 | environment: 11 | - TIMEZONE=Asia/Shanghai 12 | depends_on: 13 | - db 14 | 15 | db: 16 | image: mariadb:10.6 17 | container_name: typecho-mariadb 18 | restart: always 19 | volumes: 20 | - ./data:/var/lib/mysql 21 | environment: 22 | - TZ=Asia/Shanghai 23 | - MYSQL_ROOT_PASSWORD=LHFeR2vSfiTR 24 | - MYSQL_DATABASE=typecho 25 | - MYSQL_USER=typecho 26 | - MYSQL_PASSWORD=Ls59JAqRiymL 27 | 28 | web: 29 | image: nginx 30 | container_name: typecho-nginx 31 | restart: always 32 | ports: 33 | - 8812:80 34 | links: 35 | - app 36 | volumes: 37 | - ./nginx.conf:/etc/nginx/nginx.conf:ro 38 | volumes_from: 39 | - app 40 | depends_on: 41 | - app 42 | -------------------------------------------------------------------------------- /typecho/nginx.conf: -------------------------------------------------------------------------------- 1 | worker_processes auto; 2 | 3 | error_log /var/log/nginx/error.log warn; 4 | pid /var/run/nginx.pid; 5 | 6 | 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | 12 | http { 13 | include /etc/nginx/mime.types; 14 | default_type application/octet-stream; 15 | 16 | log_format main '$remote_addr - $remote_user [$time_local] "$request" ' 17 | '$status $body_bytes_sent "$http_referer" ' 18 | '"$http_user_agent" "$http_x_forwarded_for"'; 19 | 20 | access_log /var/log/nginx/access.log main; 21 | 22 | sendfile on; 23 | #tcp_nopush on; 24 | 25 | # Prevent nginx HTTP Server Detection 26 | server_tokens off; 27 | 28 | keepalive_timeout 65; 29 | 30 | #gzip on; 31 | 32 | #upstream php-handler { 33 | # server app:9000; 34 | #} 35 | 36 | server { 37 | listen 80 default_server; 38 | root /app; 39 | index index.php; 40 | 41 | access_log /var/log/nginx/typecho_access.log main; 42 | if (!-e $request_filename) { 43 | rewrite ^(.*)$ /index.php$1 last; 44 | } 45 | 46 | location / { 47 | index index.html index.htm index.php; 48 | 49 | if (!-e $request_filename) { 50 | rewrite . /index.php last; 51 | } 52 | } 53 | 54 | location ~\.php(.*)$ { 55 | fastcgi_pass app:9000; 56 | fastcgi_index index.php; 57 | fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info; 58 | fastcgi_split_path_info ^((?U).+\.php)(/?.+)$; 59 | fastcgi_param PATH_INFO $fastcgi_path_info; 60 | fastcgi_param SCRIPT_NAME $fastcgi_script_name; 61 | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; 62 | include fastcgi_params; 63 | } 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /typecho/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 typecho 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.cf](https://laosu.cf) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.cf/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /yal/readme.md: -------------------------------------------------------------------------------- 1 | 老苏整理的跟 yal 相关的设置 2 | 3 | 使用方法可以在 [老苏的blog:https://laosu.tech](https://laosu.tech) 找找,如果找不到,那说明还在折腾中~~ 4 | 5 | 欢迎关注公众号: 6 | 7 | ![各种折腾](https://laosu.tech/uploads/wechat-qcode.jpg) 8 | -------------------------------------------------------------------------------- /yal/yal.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wbsu2003/synology/dc7032f50a47773ffc59b2ead2445567c7b1398d/yal/yal.zip --------------------------------------------------------------------------------