Skip to content

Instantly share code, notes, and snippets.

@bylatt
Forked from mgreau/Gogs-Docker.adoc
Created May 13, 2016 16:24

Revisions

  1. @mgreau mgreau renamed this gist Sep 1, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. @mgreau mgreau created this gist Sep 1, 2015.
    17 changes: 17 additions & 0 deletions curl-install.adoc
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    Replace *192.168.99.100* by your DOCKER_HOST IP

    [source, bash]
    --
    # Configure the server
    curl 'http://192.168.99.100:3000/install' \
    -H 'Origin: null' -H 'Accept-Encoding: gzip, deflate' \
    -H 'Accept-Language: fr-FR,fr;q=0.8,en-US;q=0.6,en;q=0.4' \
    -H 'Upgrade-Insecure-Requests: 1' \
    -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.157 Safari/537.36' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' \
    -H 'Cache-Control: max-age=0' \
    -H 'Cookie: _ga=GA1.1.221947403.1432575239; lang=fr-FR; i_like_gogits=4e8b96e2a97347e0; _csrf=0NHae8OjPYKJ6xiplpZcsUhkwu86MTQ0MTExMTA2MDEyMzQ4ODk0Ng%3D%3D' \
    -H 'Connection: keep-alive' \
    --data 'db_type=MySQL&db_host=mysql%3A3306&db_user=mgreau&db_passwd=mgreaudocker&db_name=gogs&ssl_mode=disable&db_path=data%2Fgogs.db&app_name=Gogs%3A+Go+Git+Service&repo_root_path=%2Fhome%2Fgit%2Fgogs-repositories&run_user=git&domain=192.168.99.100&ssh_port=22&http_port=3000&app_url=http%3A%2F%2F192.168.99.100%3A3000%2F&smtp_host=&smtp_from=&smtp_email=&smtp_passwd=&admin_name=&admin_passwd=&admin_confirm_passwd=&admin_email=' --compressed
    --
    37 changes: 37 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,37 @@
    git_server:
    image: gogs/gogs
    container_name: git_server
    ports:
    - "3000:3000"
    - "10022:22"
    volumes_from:
    - git_serverdata
    links:
    - git_db:mysql

    git_serverdata:
    image: busybox
    container_name: git_serverdata
    command: /bin/sh
    volumes:
    - /data
    #Doesn't work with the latest version due to problem for filesystem
    # - ./data/gogs/conf/app.ini:/data/gogs/conf/app.ini

    git_db:
    image: mysql:5.6
    volumes_from:
    - git_dbdata
    ports:
    - "3306:3306"
    environment:
    - MYSQL_ROOT_PASSWORD=mgreaudocker
    - MYSQL_DATABASE=gogs
    - MYSQL_USER=mgreau
    - MYSQL_PASSWORD=mgreaudocker

    git_dbdata:
    image: busybox
    command: /bin/sh
    volumes:
    - /var/lib/mysql