1、MySQL安装
https://blog.csdn.net/a120608yby/article/details/140627056
2、Docker、Docker-Compose安装
https://blog.csdn.net/a120608yby/article/details/140534599
https://blog.csdn.net/a120608yby/article/details/140578670
3、基于Docker-Compose部署Gogs
# vim docker-compose.yml
version: "3.9"
services:
gogs:
container_name: gogs
image: gogs/gogs
ports:
- "10022:22"
- "10880:3000"
restart: always
networks:
- ops_default
volumes:
- ./gogs-data:/data
environment:
- TZ=Asia/Shanghai
networks:
ops_default:
external: true
4、启动服务
docker compose up -d
5、查看服务启动状态
docker-compose ps
6、访问
访问地址:http://部署主机IP:10880/
参考:
https://github.com/gogs/gogs