加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
docker-compose.yml 2.31 KB
一键复制 编辑 原始数据 按行查看 历史
yichen 提交于 2021-09-03 14:02 . 试图修复 Read-only file system
version: '3'
services:
ctfd:
build: .
user: root
restart: always
ports:
- "80:8000"#前面的80是CTFd平台访问的端口
environment:
- UPLOAD_FOLDER=/var/uploads
- DATABASE_URL=mysql+pymysql://ctfd:ctfd@db/ctfd
- REDIS_URL=redis://cache:6379
- WORKERS=1
- LOG_FOLDER=/var/log/CTFd
- ACCESS_LOG=-
- ERROR_LOG=-
- REVERSE_PROXY=false
volumes:
- .data/CTFd/logs:/var/log/CTFd
- .data/CTFd/uploads:/var/uploads
- .:/opt/CTFd #这里本来有个:ro,诸多不便去掉了,不知道会有啥影响
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
- db
networks:
default:
internal:
frp_connect:
ipv4_address: 172.1.0.5
db:
image: mariadb:10.4.12
restart: always
environment:
- MYSQL_ROOT_PASSWORD=ctfd
- MYSQL_USER=ctfd
- MYSQL_PASSWORD=ctfd
- MYSQL_DATABASE=ctfd
volumes:
- .data/mysql:/var/lib/mysql
networks:
internal:
# This command is required to set important mariadb defaults
command: [mysqld, --character-set-server=utf8mb4, --collation-server=utf8mb4_unicode_ci, --wait_timeout=28800, --log-warnings=0]
cache:
image: redis:4
restart: always
volumes:
- .data/redis:/data
networks:
internal:
frps:
image: glzjin/frp
restart: always
volumes:
- ./conf/frp:/conf
entrypoint:
- /usr/local/bin/frps
- -c
- /conf/frps.ini
ports:
- 9125-9129:9125-9129 # 映射direct类型题目的端口
- 9123:9123 # 映射http类型题目的端口
networks:
default:
frp_connect:
ipv4_address: 172.1.0.3
frpc:
image: glzjin/frp:latest
restart: always
volumes:
- ./conf/frp:/conf/
entrypoint:
- /usr/local/bin/frpc
- -c
- /conf/frpc.ini
depends_on:
- frps
networks:
frp_containers:
frp_connect:
ipv4_address: 172.1.0.4
networks:
default:
internal:
internal: true
frp_connect:
driver: overlay
internal: true
ipam:
config:
- subnet: 172.1.0.0/16
frp_containers:
driver: overlay
internal: true # 如果允许题目容器访问外网,则可以去掉
attachable: true
ipam:
config:
- subnet: 172.2.0.0/16
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化