参考: https://www.spug.cc/docs/install-docker
创建 docker-compose.yml
version: '3.9'
services:
spug:
image: openspug/spug-service
container_name: spug
privileged: true
restart: always
volumes:
- ./service:/data/spug
- ./repos:/data/repos
ports:
- 8002:80
environment:
- MYSQL_DATABASE=spug
- MYSQL_USER=spug
- MYSQL_PASSWORD=Passw0rd
- MYSQL_HOST=192.168.1.200
- MYSQL_PORT=3306
启动容器
docker compose up -d
初始化
以下操作会创建一个用户名为 zhuzl 密码为 Passw0rd 的管理员账户,可自行替换管理员账户/密码。
docker exec spug init_spug zhuzl Passw0rd
评论 (0)