Exmapnd docs

master
Micke Nordin 4 years ago
parent 0864bc97fc
commit 815804b948

@ -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 This is the example config, supplied with the server
``` ```
--- ---
allow_dir_list: true # Uncomment below line to allow automtic directory indexing
listen_addr: '0.0.0.0' #allow_dir_list: true
logg_level: 'DEBUG' # Below is default bas path for your content
cgi_registry: base_path: /var/gemini/gemtext
/envtest.*: # To allow connectiond from the outside, set listen address below
- ./cgi-bin/envtest.sh #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.*. 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: A full list of options are here:
``` ```
allow_dir_list = true/false, default false (global option for now!) allow_dir_list = true/false, default false (global option for now!)

@ -1,5 +1,6 @@
# gMNd Documentation # 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/running.gmi How to run gMNd
=> gemini://mic.ke/gmnd/docs/configure.gmi How to configure gMNd => gemini://mic.ke/gmnd/docs/configure.gmi How to configure gMNd
=> gemini://mic.ke/gmnd/docs/contributing.gmi How to contribute to gMNd => gemini://mic.ke/gmnd/docs/contributing.gmi How to contribute to gMNd

@ -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
```
docker build -t gmnd:latest . The simplest thing is to install using the deb or rpm:
``` => gemnini://mic.ke/gmnd/docs/installing.gmi
By just running it, it will create self signed certs and serve example content from this repo:
``` After that you can run it like this:
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/ => gemini://mic.ke/gmnd/docs/index.gmi back to gmnd/docs/

Loading…
Cancel
Save