[root@demo flare]# cat > docker-compose.yml << \EOF
version: "3.7"
services:
flare:
image: soulteary/flare
restart: always
# 默认无需添加任何参数,如有特殊需求
# 可阅读文档 https://github.com/soulteary/docker-flare/blob/main/docs/advanced-startup.md
# 启用账号登陆模式
command: flare --nologin=0
environment:
# 如需开启用户登陆模式,需要先设置 `nologin` 启动参数为 `0`
# 如开启 `nologin`,未设置 FLARE_USER,则默认用户为 `flare`
- FLARE_USER=username
# 指定您自己的账号密码,如未设置 `FLARE_USER`,则会默认生成密码并展示在应用启动日志中
- FLARE_PASS=password
# 是否开启“使用向导”,访问 `/guide`
- FLARE_GUIDE=1
ports:
- 5005:5005
volumes:
- /SSD/Demo/flare/app:/app
networks:
- traefik_net
labels:
- "traefik.enable=true"
- "traefik.docker.network=traefik_net"
- "traefik.http.routers.flare.rule=Host(`home.rockylinux.cn`)"
- "traefik.http.routers.flare.entryPoints=websecure"
- "traefik.http.routers.flare.tls.certresolver=myresolver"
- "traefik.http.routers.flare.service=flare"
- "traefik.http.routers.flare.middlewares=dashboard-auth@docker,SecHeaders@file" # 木子在原有编辑认证的基础上增加了一个打开主页需要基础认证的配置。
- "traefik.http.services.flare.loadbalancer.server.port=5005"
networks:
traefik_net:
external: true
EOF
# 启动服务
[root@demo flare]# docker-compose up -d
# 确认服务启动正常
[root@demo flare]# docker-compose ps
NAME IMAGE COMMAND SERVICE CREATED STATUS PORTS
flare-flare-1 soulteary/flare "flare --nologin=0" flare 15 minutes ago Up 10 minutes 0.0.0.0:5005->5005/tcp, :::5005->5005/tcp
0 评论