Docker-Compose 应用库

条件

  • 文件名
1
docker-compose.yml
  • 部署命令
1
docker-compose up -d
  • 更新命令: 停止->拉新->部署
1
2
3
docker-compose down
docker-compose pull
docker-compose up -d

参考本站:docker-compose常用命令


Rsshub

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
version: '3'

services:
rsshub:
image: diygod/rsshub:chromium-bundled
restart: always
ports:
- '1200:1200' # 按需修改
environment:
NODE_ENV: production
CACHE_TYPE: redis
REDIS_URL: 'redis://redis:6379/'
PUPPETEER_WS_ENDPOINT: 'ws://browserless:3000'
ALLOW_LOCALHOST: true # 允许所有本地访问
# WHITELIST: 172.70.*.* # 可选。允许的ip
# ACCESS_KEY: wikWJAYTsq # 可选。访问密钥,推荐开启。若要开启,将前面的#号去除即可,并按需定义
depends_on:
- redis

redis:
image: redis:alpine
restart: always
volumes:
- ./redis-data:/data

搭建参考

Miniflux

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
version: '3.4'
services:
miniflux:
image: ${MINIFLUX_IMAGE:-miniflux/miniflux:latest}
container_name: miniflux
restart: always
ports:
- "18080:8080"
depends_on:
- db
environment:
- DATABASE_URL=postgres://miniflux:secret@db/miniflux?sslmode=disable
- BASE_URL=https://域名
- RUN_MIGRATIONS=1
- CREATE_ADMIN=1
- ADMIN_USERNAME=登录用户名
- ADMIN_PASSWORD=登录密码
- DEBUG=1
# Optional health check:
# healthcheck:
# test: ["CMD", "/usr/bin/miniflux", "-healthcheck", "auto"]
db:
image: postgres:latest
container_name: postgres
restart: always
environment:
- POSTGRES_USER=miniflux
- POSTGRES_PASSWORD=secret
volumes:
- miniflux-db:/var/lib/postgresql/data
healthcheck:
test: ["CMD", "pg_isready", "-U", "miniflux"]
interval: 10s
start_period: 30s
volumes:
miniflux-db:

搭建参考

Jopin

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# This is a sample docker-compose file that can be used to run Joplin Server
# along with a PostgreSQL server.
#
# Update the following fields in the stanza below:
#
# POSTGRES_USER
# POSTGRES_PASSWORD
# APP_BASE_URL
#
# APP_BASE_URL: This is the base public URL where the service will be running.
# - If Joplin Server needs to be accessible over the internet, configure APP_BASE_URL as follows: https://example.com/joplin.
# - If Joplin Server does not need to be accessible over the internet, set the the APP_BASE_URL to your server's hostname.
# For Example: http://[hostname]:22300. The base URL can include the port.
# APP_PORT: The local port on which the Docker container will listen.
# - This would typically be mapped to port to 443 (TLS) with a reverse proxy.
# - If Joplin Server does not need to be accessible over the internet, the port can be mapped to 22300.

version: '3'

services:
db:
image: postgres:13
volumes:
- ./data/postgres:/var/lib/postgresql/data
ports:
- "5432:5432" # 左边的端口可以更换,右边不要动!
restart: unless-stopped
environment:
- POSTGRES_PASSWORD= # 改成你自己的密码
- POSTGRES_USER= # 改成你自己的用户名
- POSTGRES_DB=joplin
app:
image: joplin/server:latest
depends_on:
- db
ports:
- "22300:22300" # 左边的端口可以更换,右边不要动!
restart: unless-stopped
environment:
- APP_PORT=22300
- APP_BASE_URL=https:// # 改成反代的域名
- DB_CLIENT=pg
- POSTGRES_PASSWORD= # 与上面的密码对应!
- POSTGRES_DATABASE=joplin
- POSTGRES_USER= # 与上面的用户名对应!
- POSTGRES_PORT= # 与上面右边的对应!
- POSTGRES_HOST=db

待补充

简单图床(easyimage)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
version: '3.3'
services:
easyimage:
image: ddsderek/easyimage:latest
container_name: easyimage
ports:
- '8080:80'
environment:
- TZ=Asia/Shanghai
- PUID=1000
- PGID=1000
volumes:
- '/root/data/docker_data/easyimage/config:/app/web/config'
- '/root/data/docker_data/easyimage/i:/app/web/i'
restart: unless-stopped

待补充