Somik's Home

Server admins cheat codes

Use the following docker compose file to host your own git repository.

version: "3"

volumes:
  gogs_data:
    name: gogs_data
  gogs_db:
    name: gogs_db

services:
  db:
    image: mariadb
    restart: unless-stopped
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    volumes:
      - gogs_db:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=MySqlSecretRootPassowrd
      - MYSQL_PASSWORD=MySqlPasswordForGogs
      - MYSQL_DATABASE=gogs
      - MYSQL_USER=gogs

  app:
    container_name: gogs
    image: gogs/gogs:latest
    restart: unless-stopped
    ports:
      # These ports are in format <host-port>:<container-port>
      - 2222:2222 # ssh port
      - 8030:3000 # webui port
    volumes:
      - gogs_data:/data
    links:
      # Provide the database access details during initial setup of script
      - db

© Beli. All Rights Reserved.