Skip to content

Commit

Permalink
chore: Rework docker-compose setup to don't use host-networking
Browse files Browse the repository at this point in the history
  • Loading branch information
sbernauer committed May 15, 2024
1 parent e356974 commit c380e5a
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 15,054 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,21 @@ If the SIMD or nightly part causes any problems on your setup please reach out b

# Run in docker container
This command will start the Pixelflut server in a docker container

```bash
docker run --rm --init -t -p 1234:1234 -p 5900:5900 -p 9100:9100 sbernauer/breakwater # --help
```

If you want to permanently save statistics (to keep them between restarts) you can use the following command:

```bash
mkdir -p pixelflut && docker run --rm -u 1000:1000 --init -t -p 1234:1234 -p 5900:5900 -p 9100:9100 -v "$(pwd)/pixelflut:/pixelflut" sbernauer/breakwater --statistics-save-file /pixelflut/statistics.json
```

# Ready to use Docker compose setup
The ready to use Docker compose setup contains the Pixelflut server, a prometheus server and a Grafana for monitoring.
The ready to use Docker compose setup contains the Pixelflut server, a Prometheus server and a Grafana for monitoring.
Use the following command to start the whole setup

```bash
docker-compose up
```
Expand All @@ -134,9 +137,10 @@ You should now have access to the following services
| 5900 | VNC server |
| 9100 | Prometheus metrics exporter |
| 9090 | Prometheus server |
| 80 | Grafana |
| 3000 | Grafana |

If you visit the Grafana server (user=admin, password=admin) you will have access to dashboards like the dashboard below.

![Grafana screenshot](docs/images/Screenshot_20220210_215752.png)

# Performance
Expand Down
File renamed without changes.
22 changes: 11 additions & 11 deletions docker-compose.yml → docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ services:
restart: unless-stopped
image: sbernauer/breakwater
# build: .
network_mode: host # Used ports are 1234, 5900 and 9100. Choosing host mode here for best performance
ports:
- 1234:1234
- 5900:5900
- 9100:9100

node_exporter:
node-exporter:
restart: unless-stopped
image: quay.io/prometheus/node-exporter:latest
network_mode: host # Used ports are 9101
image: prom/node-exporter:v1.8.0
ports:
- 9101:9101
pid: host
volumes:
- "/:/host:ro,rslave"
Expand All @@ -19,25 +23,21 @@ services:

prometheus:
restart: unless-stopped
image: prom/prometheus:v2.44.0
image: prom/prometheus:v2.52.0
volumes:
- "./prometheus/prometheus.yml:/etc/prometheus/prometheus.yml"
- "prometheus-data:/prometheus"
ports:
- 9090:9090
extra_hosts:
- "pixelflut:172.17.0.1"

grafana:
restart: unless-stopped
image: grafana/grafana:9.5.3
image: grafana/grafana:10.1.10
volumes:
- "./grafana/provisioning:/etc/grafana/provisioning/"
- "grafana-data:/var/lib/grafana"
ports:
- 80:3000
extra_hosts:
- "pixelflut:172.17.0.1"
- 3000:3000

volumes:
grafana-data:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ datasources:
- name: Pixelflut
type: prometheus
access: proxy # <string, required> access mode. direct or proxy. Required
url: http://pixelflut:9090
url: http://prometheus:9090
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ global:
scrape_configs:
- job_name: 'breakwater'
static_configs:
- targets: ['pixelflut:9100', 'pixelflut:9101']
- targets: ['pixelflut:9100', 'node-exporter:9101']
Loading

0 comments on commit c380e5a

Please sign in to comment.