Gitea docker-compose

Source: Internet
Author: User

Docker-compose.yml

version: ‘2‘services:  web:    image: gitea/gitea:1.6    container_name: gitea_web    hostname: gitea.trio.ai    environment:      - USER_UID=1000      - USER_GID=1000      - DB_TYPE=mysql      - DB_HOST=db:3306      - DB_NAME=gitea      - DB_USER=gitea      - DB_PASSWD=xZsN7BADLWEv      - RUN_MODE=prod      - LANGS=zh-CN    networks:      - gitea    volumes:      - data:/data      - /etc/localtime:/etc/localtime    ports:      - "3000:3000"      - "3022:22"    depends_on:      - db    restart: always  db:    image: mysql:5.7    container_name: gitea_db    restart: always    environment:      - MYSQL_ROOT_PASSWORD=GFqNl3W10e9q      - MYSQL_USER=gitea      - MYSQL_PASSWORD=xZsN7BADLWEv      - MYSQL_DATABASE=gitea    networks:      - gitea    volumes:      - db:/var/lib/mysql      - conf:/etc/mysql      - /etc/localtime:/etc/localtimevolumes:  data:  db:  conf:networks:  gitea:    external: false

 

Gitea configuration file:

CAT/data/gitea/CONF/APP. ini

 

App_name = title run_mode = prodrun_user = git # default attribute [repository] root =/data/git/repositories # default attribute default_private = private # default attribute disable_http_git = true # HTTP Disabled = true # Add SSH to git SSH: // [repository. local] local_copy_path =/data/gitea/tmp/Local-repo # default attribute [repository. upload] temp_path =/data/gitea/uploads # default attribute [server] app_data_path =/data/gitea # default attribute ssh_domain = gitea.example.com # enter the domain name used for access http_port = 3000 # default port root_url = http://gitea.example.com/# enter the domain name used to access disable_ssh = false # default attribute ssh_port = 3022 # Here write docker external port rather than internal 22 port, the port 22 in docker does not change here. You need to change the/etc/ssh/sshd_config file, internal port changes lfs_content_path =/data/git/LFS # default attribute domain = gitea.example.com # external display domain name lfs_start_server = true # default attribute lfs_effect_secret = # default attribute offline_mode = false # default attribute attribute [database] Path =/data/gitea. DB # default attribute db_type = MySQL # mysqlhost = DB: 3306 # When docker-Compose is started, start two containers. By default, the two containers can access each other and use the DB name at creation, the container will automatically find the corresponding dB container name = gitea # Database User = gitea # user passwd = PASSWORD # password ssl_mode = Disable # Whether to enable SSL [indexer] issue_indexer_path =/data/gitea/indexers /issues. BLEVE # default [session] provider_config =/data/gitea/sessions # default provider = file # default [Picture] avatar_upload_path =/data/gitea/avatars # default disable_gravatar = false # default response = true # default [Attachment] Path =/data/gitea/attachments # default [log] root_path =/data/gitea/log # default mode = file # default level = info # default [security] install_lock = true # default secret_key = # default internal_token = # default [SERVICE] disable_registration = true # default require_signin_view = true # default token = true # default enable_policy_mail = true # default token = false # default enable_captcha = false # default default_keep_email_private = false # default default_allow_create_organization = true # default region = true # default no_reply_address = # default [Mailer] enabled = true # default host = SMTP. gitea. IO: 465 # port 25,465,587 from = [email protected] user = [email protected] passwd = PASSWORD [openid] enable_openid_signin = true # default enable_openid_signup = false # default

 

 

Note:

When creating MySQL, pay attention to modifying the character set utf8; otherwise, Chinese input is not recognized. After modifying the configuration file, delete the database and run docker-Compose again.

Gitea docker-compose

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.