自建服务
名称 | 描述 | 开源协议 |
---|---|---|
Caddy | 反向代理 | Apache-2.0 |
Bitwarden (社区 (Rust)/官方 (C#)) | 密码管理器 | AGPL-3.0 |
Synapse | Matrix 服务器 | AGPL-3.0 |
Gitea | Git 托管平台, 功能类似 GitHub | MIT |
Wakapi | 编码统计 | MIT |
Ente Photos | 端对端加密照片/视频云盘 | AGPL-3.0 |
CryptPad | 端对端云盘 | AGPL-3.0 |
Bitwarden
services:
vaultwarden:
image: vaultwarden/server:latest
container_name: vaultwarden
restart: unless-stopped
environment:
DOMAIN: "https://vault.shenmian.org"
DATABASE_URL: "postgresql://postgres:postgres_password@vaultwarden-postgresql"
expose:
- 80
volumes:
- ./vaultwarden/:/data/
depends_on:
- vaultwarden-postgresql
vaultwarden-postgresql:
image: postgres:alpine
container_name: vaultwarden-postgresql
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres_password
POSTGRES_DB: vaultwarden
expose:
- 5432
volumes:
- ./vaultwarden-postgres:/var/lib/postgresql/data
Synapse
services:
synapse:
image: matrixdotorg/synapse:latest
container_name: synapse
restart: always
ports:
- 8008:8008
volumes:
- ./synapse:/data
生成初始配置文件:
docker run -it --rm -v ./synapse:/data -e SYNAPSE_SERVER_NAME=shenmian.org -e SYNAPSE_REPORT_STATS=yes matrixdotorg/synapse:latest generate
创建管理员用户:
docker exec -it synapse register_new_matrix_user -u <USERNAME> -p <PASSWORD> -a -c /data/homeserver.yaml http://localhost:8008
验证:
Gitea
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
restart: always
environment:
- GITEA__database__DB_TYPE=postgres
- GITEA__database__HOST=gitea-postgresql:5432
- GITEA__database__NAME=gitea
- GITEA__database__USER=postgres
- GITEA__database__PASSWD=postgres_password
expose:
- 3000
volumes:
- ./gitea:/data
depends_on:
- gitea-postgresql
gitea-act-runner:
image: vegardit/gitea-act-runner:latest
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:rw
- ./gitea-runner:/data:rw
environment:
TZ: "Europe/London"
GITEA_INSTANCE_URL: 'https://git.shenmian.org'
GITEA_RUNNER_REGISTRATION_TOKEN: '' # 从 Gitea 中获取: 管理后台 | Actions | Runners | 注册 Runner
gitea-postgresql:
image: postgres:alpine
container_name: gitea-postgresql
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres_password
POSTGRES_DB: gitea
expose:
- 5432
volumes:
- ./gitea-postgres:/var/lib/postgresql/data
Wakapi
services:
wakapi:
image: ghcr.io/muety/wakapi:latest
container_name: wakapi
expose:
- 3000
restart: unless-stopped
environment:
WAKAPI_DB_TYPE: "postgres"
WAKAPI_DB_NAME: "wakapi"
WAKAPI_DB_USER: "postgres"
WAKAPI_DB_HOST: "wakapi-postgresql"
WAKAPI_DB_PORT: "5432"
WAKAPI_DB_PASSWORD: "postgres_password"
WAKAPI_PASSWORD_SALT: ""
# WAKAPI_MAIL_SMTP_PASS: ""
depends_on:
- wakapi-postgresql
wakapi-postgresql:
image: postgres:alpine
container_name: wakapi-postgresql
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres_password
POSTGRES_DB: wakapi
expose:
- 5432
volumes:
- ./wakapi-postgres:/var/lib/postgresql/data
Ente Photos
官方 APP 在登录界面连续点击 7 次即可修改服务器, 默认注册时不会发送邮件, 可以在服务端日志里查看一次性密码 (OTP).