Skip to content

Commit

Permalink
docs: add webui info
Browse files Browse the repository at this point in the history
  • Loading branch information
silv3rr committed Aug 21, 2024
1 parent 0a05318 commit d341543
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 34 deletions.
19 changes: 6 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@

Dockerized [glftpd](https://glftpd.io) for all

Optionally adds [pzs-ng](https://pzs-ng.eu) and included [Web UI](#WebUI)
Optionally adds [pzs-ng](https://pzs-ng.eu) and [Web UI](#WebUI)

GitHub container registry: [docker-glftpd](https://github.com/users/silv3rr/packages/container/package/docker-glftpd)

## Quick Start

Usage: `docker run ghcr.io/silv3rr/docker-glftpd`
Usage: `./docker-run.sh` or `docker run ghcr.io/silv3rr/docker-glftpd`

Without changing anything, this gets a (temp) ftp up and running. Good for testing.

Expand Down Expand Up @@ -82,24 +82,17 @@ GLFTPD_CONF=1 GLFTPD_PERM_UDB=1 GLFTPD_SITE=1 ./docker-run.sh

Wrapper script to (re)build images that can be used for local images besides the prebuild images from github registry.

**Example**:

```
# build with web interface, pzs-ng and bot:
INSTALL_WEBUI=1 INSTALL_ZS=1 INSTALL_BOT=1 ./docker-build.sh; ./docker-run.sh
```

To update glftpd when there's a new glftpd version out (come December), change `GLFTPD_URL` and `GLFTPD_SHA` in docker-build.sh and rerun script.
See [docs/Build.md](docs/Build.md)

## Compose

What about docker compose you ask? Sure, just run `docker compose up --detach`. Details: [docs/Compose.md](docs/Compose.md).

## WebUI

A web interface can optionally be installed as a bonus. Can be used to manage glftpd and bot etc from the comfort of your browser.. it's quite the prize.
A web interface can optionally be installed as a bonus. This container an be used to manage glftpd and bot etc from the comfort of your browser.. it's quite the prize.

Start: `docker run ghcr.io/silv3rr/docker-glftpd-web`
Start: `WEBUI=1 ./docker-run.sh` or `docker run ghcr.io/silv3rr/docker-glftpd-web`

Open url: https://your.ip:4444 and login: `shit/EatSh1t` (basic web auth).

Expand All @@ -113,7 +106,7 @@ See [docs/Files.md](docs/Files.md) for directory structure.

- why would you use this? uhh i dunno, cuz ur too stupid to setup gl urself?! :P
- why does the web interface suck? .. it was originally named SHIT...
- will it run on windows/macos/k8s? no idea, probably.. try it. podman? probably not
- will it run on windows, macos or k8s? no idea, probably.. try it. podman? probably not
- hashgen doesnt work? try recompiling: `gcc -o hashgen hashgen.c -lcrypto -lcrypt`
- the bot doesnt start? check owner/perms of sitebot files
- why bind mounts? if you want volumes instead .. change `type` in docker-run.sh / docker-compose.yml
Expand Down
19 changes: 16 additions & 3 deletions docs/Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,23 @@

`docker-build.sh` (re)builds images

After starting the script, Docker downloads glftpd and (if enabled) zs/bot component. It puts them into image with init & startup script and then builds it: `docker build ./docker-run.sh --cache-from docker-glftpd:2.13 --tag docker-glftpd:<VERSION> --tag docker-glftpd:latest` (plus any build-args).
After starting the script, Docker downloads glftpd and (if enabled) zs/bot component. It will built an image with init and startup script like this:

The image name will be tagged `glftpd:latest`. If you enabled the web interface, a `docker-glftpd-web:latest` image is also build.
`docker build --cache-from docker-glftpd:2.13 --tag docker-glftpd:<VERSION> --tag docker-glftpd:latest` (plus any build-args)

Options work the same as docker-run script.
The image name will be tagged `glftpd:latest`. If you enabled the web interface, a `docker-glftpd-web:latest` image is also build from it's src repo.

Options can be set with env variables.

**Example**:

```
# build with web interface, pzs-ng and bot:
INSTALL_WEBUI=1 INSTALL_ZS=1 INSTALL_BOT=1 ./docker-build.sh
```

After build, `docker-run.sh` should auto detect the new local image.

To update glftpd when there's a new glftpd version out (come December), change `GLFTPD_URL` and `GLFTPD_SHA` in docker-build.sh and rerun script.

For all available build args, see comments inside [/docker-build.sh](/docker-build.sh).
6 changes: 4 additions & 2 deletions docs/Compose.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
# Docker Compose

Includes `docker-compose.yml` (V3)
Includes `docker-compose.yml` which replaces docker-build.sh and docker-run.sh scripts.

To build local images:
`docker compose --profile local up --build local-glftpd local-web --detach`

Edit docker-compose.yml to set build `args` and options under `environment`. Also you'll have to manage `volumes` (bind mounts) yourself, instead of having docker-run.sh doing it for you. The customizer script can be used to modify gl/bot config files.
Edit docker-compose.yml to set build `args` and options under `environment`. Also you'll have to manage `volumes` (bind mounts) yourself, instead of having docker-run.sh doing it for you.

The customizer script can be run to modify gl/bot config files.

**Example**:

Expand Down
33 changes: 18 additions & 15 deletions docs/Customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,42 +14,47 @@ To build your own local images, check [docs/Build.md](docs/Build.md)

## glftpd

Glftpd image comes in two flavors: a basic ftpd only setup or a 'full' install. The 'full' image adds zs and bot components (build with `INSTALL_ZS=1` `INSTALL_BOT=1`)
The image comes in two flavors: a basic ftpd only setup or a 'full' install. The 'full' image adds zs and bot components (build with `INSTALL_ZS=1` `INSTALL_BOT=1`)

- base: debian 12, x64 only
- size: ~125mb (multi stage with conditionals)
- size: ~125mb or ~200mb for 'full' (multi stage with conditionals)
- init: xinetd starts glftpd
- logs: xinetd, syslog and bot's partyline goto stdout
- view logs with `docker logs glftpd`

## webui

Shitty web interface :)
_aka shitty web interface :)_

Runs in 'docker mode' to manage glftpd container, see [glftpd-webui](https://github.com/silv3rr/glftpd-webui)
Connects to glftpd container to manage it, gl userdb and show online users. Runs in a separate container. Building with `INSTALL_WEBUI=1` sets label to auto start on `./docker-run.sh` (`WEBUI=1`).

## Customizer
For more info, see [glftpd-webui](https://github.com/silv3rr/glftpd-webui)

A script called `customizer.sh` is called by `docker-run.sh` which sets up mounts, glftpd.conf, userdb and sitebot.
# Customizer script

## Components
A shell script called `customizer.sh` is called by `docker-run.sh` which sets up mounts, glftpd.conf, userdb and sitebot.

Addons/plugins
# Components

Check labels to see if zs or bot are enabled
_aka addons/plugins_

Check labels to see if zs, bot webui or are enabled:

`docker image inspect --format='{{ index .Config.Labels "gl.sitebot.setup" }}' docker-glftpd`

`docker image inspect --format='{{ index .Config.Labels "gl.zipscript.setup" }}' docker-glftpd`

### ZS
`docker image inspect --format='{{ index .Config.Labels "gl.web.setup" }}' docker-glftpd`

## ZS

Adds pzs-ng. Configured by editing 'etc/pzs-ng/zsconfig.h' as usual (needs image rebuild to recompile after changing). Requires an image that's build with `INSTALL_ZS=1`.

### Bot
## Bot

Adds optional sitebot which will listen on port 3333. Login to partyline using telnet and default user/pass `shit/EatSh1t`. Needs irc server set in 'glftpd/sitebot/eggdrop.conf' (use docker-run.sh) and `.+chan #yourchan` from partyline. ngBot can be changed in 'glftpd/sitebot/pzs-ng/ngBot.conf'. Requires image build with `INSTALL_BOT=1`.

### Third-party scripts
## Third-party scripts

Executable \*.sh scripts in 'entrypoint.d' dir will run on container start.

Expand All @@ -61,9 +66,7 @@ These can be combined to put for example a custom ngBot zs theme in 'custom' dir

**Examples:**

Copy bot themes: `entrypoint.d/bot_theme.sh`

(cp silver.zst to ./custom dir)
Copy bot themes: `entrypoint.d/bot_theme.sh` (_silver.zst to ./custom dir_)

```
#!/bin/sh
Expand Down
2 changes: 1 addition & 1 deletion docs/Files.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
| etc/glftpd/glftpd.conf.gz | glftpd/glftpd.conf | |
| etc/glftpd/udb-skel.tar.gz | glftpd/etc/passwd | |
| | glftpd/etc/ftp-data/{users,groups} | |
| etc/eggdrop.conf | glftpd/eggdrop.conf | 999, 660 |
| etc/eggdrop.conf.gz | glftpd/eggdrop.conf | 999, 660 |
| etc/pzs-ng/ngBot-skel.tar.gz | glftpd/sitebot/pzs-ng/ | |
| etc/pzs-ng/ngBot.conf.gz | glftpd/sitebot/pzs-ng/ngBot.conf | 999, XXX |
|||
Expand Down

0 comments on commit d341543

Please sign in to comment.