Blob


1 => / Home
2 => /quickstart.gmi Quickstart
3 => /gmid.1.txt docs
5 # Contrib
7 This directory is for additional contributed files which may be useful.
9 ## Dockerfile
11 => https://git.omarpolo.com/gmid/tree/contrib/Dockerfile contrib/Dockerfile
13 A sample Dockerfile. The resulting image is a classic alpine linux image with a statically linked gmid installed as /bin/gmid.
14 To build the image:
16 ```instructions to build the image
17 # docker build -f contrib/Dockerfile -t gmid .
18 ```
20 and then run it with something along the lines of:
22 ```instruction to run the image
23 # docker run --rm -it -p 1965:1965 \
24 -v gmid.conf:/etc/gmid.conf:ro \
25 -v path/to/keys:/tls:ro \
26 -v /var/gemini:/var/gemini:ro \
27 gmid -c /etc/gmid.conf
28 ```
30 ## gencert
32 => https://git.omarpolo.com/gmid/tree/contrib/gencert contrib/gencert
34 contrib/gencert is a simple script to generate self-signed certificates.
36 ## OpenBSD rc file
38 => https://git.omarpolo.com/gmid/tree/contrib/gmid contrib/gmid
40 contrib/gmid is a sample service file for OpenBSD rc(8). To install it:
42 ```command to install the rc file
43 # cp contrib/gmid /etc/rc.d
44 ```
46 then the usual ‘rcctl [start|stop|enable|restart] gmid’ are available.
48 ## Systemd unit file
50 => https://git.omarpolo.com/gmid/tree/contrib/gmid.service gmid.service
52 A simple service file for systemd. To install it
54 ```instructions to install the system file
55 # cp contrib/gmid.service /lib/systemd/system/gmid.service
56 ```
58 then the usual ‘systemctl [status|start|enable|stop] gmid’ commands can be used to manage the server.
60 Some things to keep in mind:
61 * the ExecStart path may depend on the installation
62 * a ‘gmid’ user needs to be create for e.g. with
64 ```how to create a dedicated user
65 # useradd --system --no-create-home -s /bin/nologin -c "gmid Gemini server" gmid
66 ```
68 * logs can be inspected with journalctl(1)
70 ```reads gmid logs with journalctl
71 # journalctl -t gmid
72 ```
74 ## renew certificates automatically
76 => https://git.omarpolo.com/gmid/tree/contrib/renew-certs contrib/renew-certs
78 NB: this script requires features that are currently available only in the master branch.
80 contrib/renew-certs is a script meant to be run in a crontab that watch for certificate expiration. It can optionally renew the certs and restart gmid too.
82 Read the documentation with: perldoc renew-certs
84 ## Vim syntax files
86 => https://git.omarpolo.com/gmid/tree/contrib/vim contrib/vim
88 contrib/vim contains a syntax highlighting for vim. To install it, just copy the files to ~/.vim or to /usr/share/vim/vimfiles, e.g.:
90 ```install the vim syntax highlight in your home
91 $ mkdir -p ~/.vim
92 $ cp -R contrib/vim/* ~/.vim/
93 ```
95 To enable Syntastic checker, add to your vimrc:
97 ```
98 let g:syntastic_gmid_checkers = ['gmid']
99 ```
101 => vim-screenshot.png Screenshot of vim editing gmid.conf