This repository has been archived on 2022-10-14. You can view files and clone it, but cannot push or open issues or pull requests.
2021-07-28 19:14:12 +00:00
2021-07-28 21:28:32 +00:00
2021-07-28 19:13:08 +00:00
2021-07-28 19:13:08 +00:00
2021-06-17 18:58:01 -07:00

gulag-dockerized

World's sexiest gulag setup using docker-compose, IPv6 and Cloudflare. Host- and distro- agnostic... Docker enables easy deployment in any environment that can run Docker, IPv6 lets you have an isolated web server even if you already have a web server on your single IPv4, and Cloudflare provides IPv4 compatibility for you.

Prerequisites

  • Linux host with publically routable block of IPv6 addresses and Docker installed.
  • A domain name added to Cloudflare. You can get a domain for free at http://dot.tk.

1. Enable IPv6 in Docker

  • See https://docs.docker.com/config/daemon/ipv6/

  • Find your host's global IPv6 + prefix length (i.e. 2605:a140:2045:1635::1/64) under your network interface (i.e. eth0) in ip a.

  • Decide on a subnet to provide to Docker. You can use the reference below. For example, I'm using 2605:a140:2045:1635:69::/80. Put this in your daemon.json and restart docker.

IPv6 Subnet Reference Prefix Lengths:
2402:9400:0000:0000:0000:0000:0000:0001
XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX
      ||| |||| |||| |||| |||| |||| ||||
      ||| |||| |||| |||| |||| |||| |||128
      ||| |||| |||| |||| |||| |||| ||124
      ||| |||| |||| |||| |||| |||| |120
      ||| |||| |||| |||| |||| |||| 116
      ||| |||| |||| |||| |||| |||112
      ||| |||| |||| |||| |||| ||108
      ||| |||| |||| |||| |||| |104
      ||| |||| |||| |||| |||| 100
      ||| |||| |||| |||| |||96
      ||| |||| |||| |||| ||92
      ||| |||| |||| |||| |88
      ||| |||| |||| |||| 84
      ||| |||| |||| |||80
      ||| |||| |||| ||76
      ||| |||| |||| |72
      ||| |||| |||| 68
      ||| |||| |||64
      ||| |||| ||60
      ||| |||| |56
      ||| |||| 52
      ||| |||48
      ||| ||44
      ||| |40
      ||| 36
      ||32
      |28
      24

2. Set up gulag-dockerized

  • cd /opt or wherever you want

  • git clone https://github.com/ledlamp/gulag-dockerized.git --recursive && cd gulag-dockerized

  • Edit all files in config folder as necessary. Replace all instances of example.com with your domain, add your API keys, etc.

  • Run docker-compose up -d

  • Find nginx IPv6 address: docker inspect gulag-dockerized_nginx_1 | grep GlobalIPv6Address. Example: 2605:a140:2045:1635:69:242:ac11:8. Add this to your Cloudflare DNS...

3. Set up Cloudflare

  • Configure your DNS like so:

  • On the SSL/TLS tab, make sure mode is set to Flexible.

4. Use in OSU

  • Find OSU and open file location.

  • Copy the shortcut to your Desktop.

  • Edit the shortcut, and in the Target field, add -devserver <yourdomain>.

  • Use this shortcut to launch OSU with your gulag server!

Building updates

  • My images are built from forks of gulag and gulag-web referenced as git submodules in the source folder. If you want to deploy newer code, you can pull whatever origin has the changes you want, or make changes directly. Then build the images with docker-compose build [gulag or gulag-web]. Then finally, docker-compose down [it] and docker-compose up [it].
Description
gulag osu server + guweb frontend in docker-compose stack
Readme 56 KiB
Languages
Python 92.4%
Dockerfile 7.6%