1、MySQL安装

https://www.cnblogs.com/a120608yby/p/17164694.html

2、Docker、Docker-Compose安装

https://www.cnblogs.com/a120608yby/p/9883175.html
https://www.cnblogs.com/a120608yby/p/14582853.html

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

  

posted on 2022-11-11 15:34  a120608yby  阅读(75)  评论(0编辑  收藏  举报