美文网首页
gitea容器内访问阿里云RDS

gitea容器内访问阿里云RDS

作者: EasyNetCN | 来源:发表于2023-11-29 16:29 被阅读0次

    基于docker搭建gitea,数据库直接使用阿里云的RDS,需要修改docker-compose.yml文件,增加dns设置

    version: "3"
    
    networks:
      gitea:
        external: false
    
    services:
      server:
        dns:
          - 100.100.2.136
          - 100.100.2.138
        image: gitea/gitea:1.21.1
        container_name: gitea
        restart: always
        networks:
          - gitea
        volumes:
          - /home/dev/docker/gitea:/data
          - /etc/timezone:/etc/timezone:ro
          - /etc/localtime:/etc/localtime:ro
        ports:
          - "3000:3000"
          - "3022:22"
        environment:
          - DISABLE_REGISTRATION=true
          - SHOW_REGISTRATION_BUTTON=false
          - ALLOW_ONLY_INTERNAL_REGISTRATION=true
    
    

    相关文章

      网友评论

          本文标题:gitea容器内访问阿里云RDS

          本文链接:https://www.haomeiwen.com/subject/fsjfgdtx.html