about summary refs log tree commit diff
path: root/README.md
blob: 47b6728cf5ce4ff8093f691aebaff6b871e2f05e (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# circus-compose

docker-compose that can be used to start a circus (note: a digital one...)

## Setup

Execute the `setup.sh` file, it will ask you to configure some stuff. You can
also setup the circus manually, read on for more infos:

### Docker networking

Create some docker networks:

```
$ docker network create circus
$ docker network create circus_db
```

These will contain the various services and make sure some services can and some
services can't communiate with each other.

### Gerneral configuration

First of all, you should define where the CTF should run and what it should be
called. To do so, fill the `.env` file with the corresponding information:

```
HOSTNAME=docker.localhost
CTFNAME=MyCTF
```

### Service configuration

#### Traefik

Traefik requires the credentials as a `user:pass` combination, the password is
hashed.

To create a traefik basicauth user, execute `$ htpasswd -nb user password` with
your username and password and append the result to the `traefik_users` file.

#### Grafana

Define the grafana location in the `grafana.env` file.

```
GF_SERVER_ROOT_URL=http://grafana.docker.localhost:3000
GF_SECURITY_ADMIN_PASSWORD=secret
```

- When starting grafana, you can login as `admin:secret`
- You can create a prometheus datasource using the URL `http://prometheus:9090`

### Opening the circus

start the stack:

```
$ docker-compose up -d
```

Services:
- [http://traefik.docker.localhost](http://traefik.docker.localhost)
- [http://register.docker.localhost](http://register.docker.localhost)
- [http://manager.docker.localhost](http://manager.docker.localhost)
- [http://scoreboard.docker.localhost](http://scoreboard.docker.localhost)
- [http://prometheus.docker.localhost](http://prometheus.docker.localhost)
- [http://grafana.docker.localhost](http://grafana.docker.localhost)