changes in readme to make docker cfg upgrade-safe
small addition in readme for port binding
This commit is contained in:
14
README.md
14
README.md
@ -39,10 +39,10 @@ In order to execute code submissions using Docker, source code files are written
|
||||
|
||||
### Optional Steps
|
||||
|
||||
- use Docker Machine or vagrant if there is no native support for docker on your OS
|
||||
- if you want to use the app without docker (and hence without code execution) comment the validation `validate :working_docker_image?` in `models/execution_environments.rb` otherwise the seed will fail (because of missing docker connection)
|
||||
- create seed data by executing `rake db:seed`
|
||||
- if you already created a configuration for your local installation and want to use vagrant, too, be sure to log into the vagrant instance via ssh and add your database user manually to the database. Afterwards, create, migrate and seed.
|
||||
- Use Docker Machine or vagrant if there is no native support for docker on your OS
|
||||
- If you want to use the app without docker (and hence without code execution) comment the validation `validate :working_docker_image?` in `models/execution_environments.rb` otherwise the seed will fail (because of missing docker connection)
|
||||
- Create seed data by executing `rake db:seed`
|
||||
- If you already created a configuration for your local installation and want to use vagrant, too, be sure to log into the vagrant instance via ssh and add your database user manually to the database. Afterwards, create, migrate and seed.
|
||||
|
||||
## Production Setup
|
||||
|
||||
@ -53,4 +53,8 @@ In order to execute code submissions using Docker, source code files are written
|
||||
- We use a [Prometheus Exporter](https://github.com/discourse/prometheus_exporter) and a [Telegraf Client](https://github.com/jgraichen/telegraf-ruby)
|
||||
- The Telegraf client collects the data from the Prometheus endpoint, adds its own datasets and forwards them to an InfluxDB
|
||||
- The Prometheus Exporter must be started separately **before** running the Rails server via `bundle exec prometheus_exporter`
|
||||
- The InfluxDB data can be visualized using Grafana, for example. There is also an adapted [dashboard](docs/grafana/prometheus_exporter_grafana_dashboard.json) for this purpose
|
||||
- The InfluxDB data can be visualized using Grafana, for example. There is also an adapted [dashboard](docs/grafana/prometheus_exporter_grafana_dashboard.json) for this purpose
|
||||
|
||||
|
||||
## Additional Note
|
||||
- As the underlying rails server uses port 3000 as the default seeting, you can use [authbind] (https://www.mwells.org/coding/2016/authbind-port-80-443/) to bind it to the regular 80/443 port.
|
@ -142,8 +142,14 @@ sudo add-apt-repository \
|
||||
sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io
|
||||
```
|
||||
|
||||
- Get the path to the systemd service file `docker.service` using `systemctl status docker` (normally it is located at `/lib/systemd/system/docker.service`)
|
||||
- Add `-H tcp://127.0.0.1:2376` after `-H fd://` in this file
|
||||
- Add the following lines to the docker configuration to make the Docker daemon listen on incoming connections on port 2376. Use `sudo systemctl edit docker.service` to add or edit an overwrite file to make the changes [upgrade-safe](https://serverfault.com/questions/840996/modify-systemd-unit-file-without-altering-upstream-unit-file):
|
||||
|
||||
```text
|
||||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/usr/bin/dockerd -H fd:// -H tcp://127.0.0.1:2376
|
||||
```
|
||||
|
||||
- Add the following option to `/etc/docker/daemon.json` (or create the file if it does not exist yet):
|
||||
|
||||
```text
|
||||
@ -159,6 +165,7 @@ sudo apt update && sudo apt install docker-ce docker-ce-cli containerd.io
|
||||
- Execute: `sudo usermod -aG docker ${USER}`
|
||||
- Logout and login again
|
||||
- Check the docker installation with `docker run hello-world` (without root privileges)
|
||||
- Get the lateste version of the execution environment you want to use with `docker pull`
|
||||
|
||||
### RVM and Ruby
|
||||
|
||||
|
Reference in New Issue
Block a user