about summary refs log tree commit diff
path: root/README.md
blob: 6078a1943654af431f6d0936bb4019fce5a52e7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# circus-register

Register a new companion

## 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.