1
0
mirror of https://github.com/tiyn/dockerfiles.git synced 2025-12-31 05:39:46 +01:00

gopher-server: updated README

This commit is contained in:
2025-12-24 01:22:41 +01:00
parent 491a961e0a
commit 8735e28748
2 changed files with 29 additions and 9 deletions

View File

@@ -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=<domain/ip_here> -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
```