diff --git a/gopher-server/README.md b/gopher-server/README.md index 6f3ad6e..2c0eca6 100644 --- a/gopher-server/README.md +++ b/gopher-server/README.md @@ -1,8 +1,20 @@ # Gopher Server This is a dockerized version of a Gopher server. +This container and its documentation was made by [tiyn](https://github.com/tiyn). -## Environment-variables +## Setup + +Navigate into the `src` directory and build the image using the following command. + +```sh +docker build . -t gopher-server +``` + +Then create a `rebuild.sh` file. +Change the settings accoding to your needs and run `./rebuild.sh` afterward. + +### Environment-variables Set the following variables with the -e tag. @@ -10,15 +22,15 @@ Set the following variables with the -e tag. | ------------- | --------------------------------------------------- | ----------- | | `SERVER_NAME` | set this to your IP/Domain (no "gopher://" needed!) | `localhost` | -## Volumes +### Volumes Set the following volumes with the -v tag. -| Volume-Name | Container mount | Description | -| -------------- | --------------- | ----------------------------- | -| `gopherwebdir` | `/var/gopher` | directory for the gopher page | +| Outside mount/volume name | Container mount | Description | +| ------------------------- | --------------- | ----------------------------- | +| `gopherwebdir` | `/var/gopher` | directory for the gopher page | -## Ports +### Ports Set the following ports with the -p tag. @@ -28,6 +40,14 @@ Set the following ports with the -p tag. ## Example run-command -Run `docker build . -t gopher-server` in the top directory of this repository. +Run `docker build . -t gopher-server` in the `src` directory of this repository to build the image. -`docker run --name gopher-server -v gopherwebdir:/var/gopher -p 70:70 --restart unless-stopped -e SERVER_NAME= -d gopher-server` +A container can be started with the following command. + +### rebuild.sh + +```sh +docker stop gopher-server +docker rm gopher-server +docker run --name gopher-server -v gopherwebdir:/var/gopher -p 70:70 --restart unless-stopped -e SERVER_NAME=localhost -d gopher-server +``` diff --git a/gopher-server/src/Dockerfile b/gopher-server/src/Dockerfile index 95fc6f4..9c0ed20 100644 --- a/gopher-server/src/Dockerfile +++ b/gopher-server/src/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:18.04 -MAINTAINER mail@martenkante.de +LABEL maintainer="Marten B. Kante " ENV SERVER_NAME localhost