about summary refs log tree commit diff
path: root/README.md
diff options
context:
space:
mode:
authorEmile <hanemile@protonmail.com>2019-10-20 16:53:28 +0200
committerEmile <hanemile@protonmail.com>2019-10-20 16:53:28 +0200
commitc856c7e66e3ad29ea0491f1f4951b31deb8279ea (patch)
treee32daefbeec30e667f261eca2c5a3409e783453d /README.md
parent22e3029cbf5fa7fd64bfaea2e4dcd011c40a4236 (diff)
functional
Diffstat (limited to 'README.md')
-rw-r--r--README.md59
1 files changed, 57 insertions, 2 deletions
diff --git a/README.md b/README.md
index f85c49e..e5d7d28 100644
--- a/README.md
+++ b/README.md
@@ -1,3 +1,58 @@
-# landingpage
+# circus-register
 
-circus landingpage routing the user to the registration page, the scoreboard and to possible communication channels with the organizators
\ No newline at end of file
+Register a new companion
+
+## Setup
+
+First, build an image:
+
+```
+$ docker build . -t circus-register
+```
+
+Then run the container:
+
+```
+$ docker run --rm -v /var/run/docker.sock:/var/run/docker.sock --net circus -p 8081:8081 circus-register:latest
+```
+
+## Function
+
+This container should only show a small registration form for the user.  The user
+inputs a name and recieves an access token and a link to a companion container.
+
+All this contains does is run this command with a few custom values:
+
+```
+$ docker run \
+    --net circus \
+    -v /var/run/docker.sock:/var/run/docker.sock \
+    -v $(pwd)/companion.json:/etc/companion.json \
+    -p 8086:8080 \
+    -d circus-companion:latest \
+    -username "Player 1" \
+    -accessCode theoneandonlyplayeroneisready \
+    -sessionSalt salty \
+    -vpnRemoteAddress 127.0.0.1 \
+    -vpnRemotePort 1193
+```
+
+What this command does:
+
+- starts a circus companion
+- inserts the companion into the circus network
+- mounts the docker socket
+- mounts the companion.json seeding the challenges
+- exposes port 8080 to the outside world 
+- defines the name of the player
+- defines the access-token the player can use to login
+- defines a salt for the session
+- defines where the remote vpn is running
+- defines behind which port the vpn can be found
+
+That's a lot, but all we need to do is to get a name for the user, generate a
+random access code, start the container and return the access code to the user.
+
+## Overall procedure:
+
+![](https://git.darknebu.la/circus/circus-register/raw/branch/master/imgs/Procedure.png)