Exmapnd docs
This commit is contained in:
parent
0864bc97fc
commit
815804b948
4 changed files with 67 additions and 20 deletions
|
@ -5,15 +5,26 @@ gMNd has a config file in yaml format that you can supply on the command line wi
|
|||
This is the example config, supplied with the server
|
||||
```
|
||||
---
|
||||
allow_dir_list: true
|
||||
listen_addr: '0.0.0.0'
|
||||
logg_level: 'DEBUG'
|
||||
cgi_registry:
|
||||
/envtest.*:
|
||||
- ./cgi-bin/envtest.sh
|
||||
# Uncomment below line to allow automtic directory indexing
|
||||
#allow_dir_list: true
|
||||
# Below is default bas path for your content
|
||||
base_path: /var/gemini/gemtext
|
||||
# To allow connectiond from the outside, set listen address below
|
||||
#listen_addr: '0.0.0.0'
|
||||
# To set debug logging, uncomment below line
|
||||
#logg_level: 'DEBUG'
|
||||
# To enable cgi functionality, configure something like below
|
||||
#cgi_registry:
|
||||
# /envtest.*:
|
||||
# - /var/gemini/cgi-bin/envtest.sh
|
||||
server_cert: /etc/ssl/certs/ssl-cert-snakeoil.pem
|
||||
server_key: /etc/ssl/private/ssl-cert-snakeoil.key
|
||||
```
|
||||
This enables directory indexing, sets the listen address to 0.0.0.0 (all interfaces), the log level to DEBUG and registers the script ./cgi-bin/envtest.sh to serve content for any path that matches the regex /envtest.*.
|
||||
|
||||
Notice that snakeoil certs won't actually work, you should generate your own certificates. This is a guide that should wortkll for you:
|
||||
=> gemini://republic.circumlunar.space/users/andybalaam/blogmirror/2019-05-02_creating_a_self_signed_certificate_for_apache_and_connecting_to_i.gmi
|
||||
|
||||
A full list of options are here:
|
||||
```
|
||||
allow_dir_list = true/false, default false (global option for now!)
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# gMNd Documentation
|
||||
|
||||
=> gemini://mic.ke/gmnd/docs/installing.gmi How to install gMNd
|
||||
=> gemini://mic.ke/gmnd/docs/running.gmi How to run gMNd
|
||||
=> gemini://mic.ke/gmnd/docs/configure.gmi How to configure gMNd
|
||||
=> gemini://mic.ke/gmnd/docs/contributing.gmi How to contribute to gMNd
|
||||
|
|
38
gmnd/docs/installing.gmi
Normal file
38
gmnd/docs/installing.gmi
Normal file
|
@ -0,0 +1,38 @@
|
|||
# Installation
|
||||
Please use supplied debian and rpm repos. Packages are signed with gpg.
|
||||
|
||||
# DEB
|
||||
```
|
||||
curl https://repo.mic.ke/PUBLIC.KEY | sudo apt-key add -
|
||||
curl https://repo.mic.ke/debian/debian-micke-unstable.list | sudo tee /etc/apt/sources.list.d/debian-micke-unstable.list
|
||||
sudo apt update && sudo apt install gmnd
|
||||
```
|
||||
|
||||
# RPM
|
||||
```
|
||||
wget https://repo.mic.ke/PUBLIC.KEY
|
||||
sudo rpm --import PUBLIC.KEY
|
||||
sudo dnf config-manager --add-repo https://repo.mic.ke/rpm/rpm-micke.repo
|
||||
sudo dnf install gmnd
|
||||
```
|
||||
|
||||
# Docker
|
||||
|
||||
You can build and run it from the supplied Dockerfile if you so whish:
|
||||
```
|
||||
docker build -t gmnd:latest .
|
||||
```
|
||||
By just running it, it will create self signed certs and serve example content from this repo:
|
||||
```
|
||||
docker run -p 1965:1965 gmnd
|
||||
```
|
||||
A slightly more interesting thing it can do is serve your own content, in this example from /tmp/content on your host machine and cgi-scripts from /tmp/cgi-bin:
|
||||
```
|
||||
docker run --mount type=bind,source="/tmp/content,target=/app/content" --mount type=bind,source="/tmp/cgi-bin,target=/app/cgi-bin" -p 1965:1965 gmnd
|
||||
```
|
||||
Or even supply your own certificates from the outside, in this example in /usr/local/certs with static content from /tmp/content:
|
||||
```
|
||||
docker run --mount type=bind,source="/tmp/content,target=/app/content" --mount type=bind,source="/usr/local/certs,target=/app/certs" -p 1965:1965 gmnd
|
||||
```
|
||||
..
|
||||
=> gemini://mic.ke/gmnd/docs/index.gmi back to gmnd/docs/
|
|
@ -1,19 +1,16 @@
|
|||
You can build and run it from the supplied Dockerfile if you so whish:
|
||||
# Run gMNd
|
||||
|
||||
The simplest thing is to install using the deb or rpm:
|
||||
=> gemnini://mic.ke/gmnd/docs/installing.gmi
|
||||
|
||||
After that you can run it like this:
|
||||
```
|
||||
docker build -t gmnd:latest .
|
||||
```
|
||||
By just running it, it will create self signed certs and serve example content from this repo:
|
||||
```
|
||||
docker run -p 1965:1965 gmnd
|
||||
```
|
||||
A slightly more interesting thing it can do is serve your own content, in this example from /tmp/content and dynamic content from /tmp/cgi-bin on your host machine:
|
||||
```
|
||||
docker run --mount type=bind,source="/tmp/content,target=/app/content" --mount type=bind,source="/tmp/ccgi-bin,target=/app/cgi-bin"-p 1965:1965 gmnd
|
||||
```
|
||||
Or even supply your own certificates from the outside, in this example in /usr/local/certs with static content from /tmp/content:
|
||||
```
|
||||
docker run --mount type=bind,source="/tmp/content,target=/app/content" --mount type=bind,source="/usr/local/certs,target=/app/certs" -p 1965:1965 gmnd
|
||||
# systemctl start gmnd
|
||||
```
|
||||
Running in docker is covered in the install docs above.
|
||||
|
||||
See information here about configuration options:
|
||||
=> gemini://mic.ke/gmnd/docs/configure.gmi
|
||||
|
||||
..
|
||||
=> gemini://mic.ke/gmnd/docs/index.gmi back to gmnd/docs/
|
||||
|
|
Loading…
Add table
Reference in a new issue