Blob


1 # contributed files
3 This directory is for additional contributed files which may be useful.
5 ## Dockerfile
7 => TREE/contrib/Dockerfile contrib/Dockerfile
9 A sample Dockerfile. The resulting image is a classic alpine linux image with a statically linked gmid installed as /bin/gmid. Build the image with:
11 ```instructions to build the image
12 # docker build -f contrib/Dockerfile -t gmid .
13 ```
15 and then run it with something along the lines of:
17 ```instruction to run the image
18 # docker run --rm -it -p 1965:1965 \
19 -v gmid.conf:/etc/gmid.conf:ro \
20 -v path/to/keys:/tls:ro \
21 -v /var/gemini:/var/gemini:ro \
22 gmid -c /etc/gmid.conf
23 ```
25 ## gencert
27 => TREE/contrib/gencert contrib/gencert
29 contrib/gencert is a simple script to generate self-signed certificates.
31 ## OpenBSD rc file
33 => TREE/contrib/gmid contrib/gmid
35 contrib/gmid is a sample service file for OpenBSD rc(8). To install it:
37 ```command to install the rc file
38 # cp contrib/gmid /etc/rc.d
39 ```
41 then the usual ‘rcctl [start|stop|enable|restart] gmid’ are available.
43 ## systemd unit file
45 => TREE/contrib/gmid.service contrib/gmid.service
46 => TREE/contrib/gmid.sysusers contrib/gmid.sysusers
48 A simple service file for systemd. To install it
50 ```instructions to install the system file
51 # cp contrib/gmid.service /lib/systemd/system/gmid.service
52 ```
54 then the usual ‘systemctl [status|start|enable|stop] gmid’ commands can be used to manage the server.
56 Some things to keep in mind:
57 * the ExecStart path may depend on the installation
58 * a ‘gmid’ user needs to be created with systemd-sysusers or useradd:
60 ```how to create a dedicated user
61 # systemd-sysusers contrib/gmid.sysusers
62 or
63 # useradd --system --no-create-home -s /bin/nologin -c "gmid Gemini server" gmid
64 ```
66 * logs can be inspected with journalctl(1)
68 ```reads gmid logs with journalctl
69 # journalctl -t gmid
70 ```
72 ## renew certificates automatically
74 => TREE/contrib/renew-certs contrib/renew-certs
76 NB: this script requires features that are currently available only in the master branch.
78 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.
80 Read the documentation with: perldoc renew-certs
82 ## vim syntax files
84 => TREE/contrib/vim contrib/vim
86 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.:
88 ```install the vim syntax highlight in your home
89 $ mkdir -p ~/.vim
90 $ cp -R contrib/vim/* ~/.vim/
91 ```
93 To enable Syntastic checker, add to your vimrc:
95 ```
96 let g:syntastic_gmid_checkers = ['gmid']
97 ```
99 => vim-screenshot.png Screenshot of vim editing gmid.conf