Blame


1 ae6870fa 2021-10-04 op => / Home
2 ae6870fa 2021-10-04 op => /gmid.1.txt docs
3 ae6870fa 2021-10-04 op
4 ae6870fa 2021-10-04 op # Contrib
5 ae6870fa 2021-10-04 op
6 ae6870fa 2021-10-04 op This directory is for additional contributed files which may be useful.
7 ae6870fa 2021-10-04 op
8 ae6870fa 2021-10-04 op ## Dockerfile
9 ae6870fa 2021-10-04 op
10 ae6870fa 2021-10-04 op => https://git.omarpolo.com/gmid/tree/contrib/Dockerfile contrib/Dockerfile
11 ae6870fa 2021-10-04 op
12 ae6870fa 2021-10-04 op A sample Dockerfile. The resulting image is a classic alpine linux image with a statically linked gmid installed as /bin/gmid.
13 ae6870fa 2021-10-04 op To build the image:
14 ae6870fa 2021-10-04 op
15 ae6870fa 2021-10-04 op ```instructions to build the image
16 ae6870fa 2021-10-04 op # docker build -f contrib/Dockerfile -t gmid .
17 ae6870fa 2021-10-04 op ```
18 9212cf1b 2021-10-04 op
19 ae6870fa 2021-10-04 op and then run it with something along the lines of:
20 9212cf1b 2021-10-04 op
21 ae6870fa 2021-10-04 op ```instruction to run the image
22 ae6870fa 2021-10-04 op # docker run --rm -it -p 1965:1965 \
23 ae6870fa 2021-10-04 op -v gmid.conf:/etc/gmid.conf:ro \
24 ae6870fa 2021-10-04 op -v path/to/keys:/tls:ro \
25 ae6870fa 2021-10-04 op -v /var/gemini:/var/gemini:ro \
26 ae6870fa 2021-10-04 op gmid -c /etc/gmid.conf
27 ae6870fa 2021-10-04 op ```
28 ae6870fa 2021-10-04 op
29 a83ba844 2021-10-09 op ## gencert
30 a83ba844 2021-10-09 op
31 a83ba844 2021-10-09 op => https://git.omarpolo.com/gmid/tree/contrib/gencert contrib/gencert
32 a83ba844 2021-10-09 op
33 a83ba844 2021-10-09 op contrib/gencert is a simple script to generate self-signed certificates.
34 a83ba844 2021-10-09 op
35 ae6870fa 2021-10-04 op ## OpenBSD rc file
36 ae6870fa 2021-10-04 op
37 ae6870fa 2021-10-04 op => https://git.omarpolo.com/gmid/tree/contrib/gmid contrib/gmid
38 ae6870fa 2021-10-04 op
39 ae6870fa 2021-10-04 op contrib/gmid is a sample service file for OpenBSD rc(8). To install it:
40 9212cf1b 2021-10-04 op
41 ae6870fa 2021-10-04 op ```command to install the rc file
42 ae6870fa 2021-10-04 op # cp contrib/gmid /etc/rc.d
43 ae6870fa 2021-10-04 op ```
44 9212cf1b 2021-10-04 op
45 ae6870fa 2021-10-04 op then the usual ‘rcctl [start|stop|enable|restart] gmid’ are available.
46 ae6870fa 2021-10-04 op
47 ae6870fa 2021-10-04 op ## Systemd unit file
48 ae6870fa 2021-10-04 op
49 ae6870fa 2021-10-04 op => https://git.omarpolo.com/gmid/tree/contrib/gmid.service gmid.service
50 ae6870fa 2021-10-04 op
51 ae6870fa 2021-10-04 op A simple service file for systemd. To install it
52 9212cf1b 2021-10-04 op
53 ae6870fa 2021-10-04 op ```instructions to install the system file
54 ae6870fa 2021-10-04 op # cp contrib/gmid.service /lib/systemd/system/gmid.service
55 ae6870fa 2021-10-04 op ```
56 9212cf1b 2021-10-04 op
57 ae6870fa 2021-10-04 op then the usual ‘systemctl [status|start|enable|stop] gmid’ commands can be used to manage the server.
58 ae6870fa 2021-10-04 op
59 ae6870fa 2021-10-04 op Some things to keep in mind:
60 eb82dcfb 2021-10-04 op * the ExecStart path may depend on the installation
61 eb82dcfb 2021-10-04 op * a ‘gmid’ user needs to be create for e.g. with
62 ae6870fa 2021-10-04 op
63 eb82dcfb 2021-10-04 op ```how to create a dedicated user
64 eb82dcfb 2021-10-04 op # useradd --system --no-create-home -s /bin/nologin -c "gmid Gemini server" gmid
65 eb82dcfb 2021-10-04 op ```
66 eb82dcfb 2021-10-04 op
67 eb82dcfb 2021-10-04 op * logs can be inspected with journalctl(1)
68 eb82dcfb 2021-10-04 op
69 eb82dcfb 2021-10-04 op ```reads gmid logs with journalctl
70 eb82dcfb 2021-10-04 op # journalctl -t gmid
71 eb82dcfb 2021-10-04 op ```
72 eb82dcfb 2021-10-04 op
73 ae6870fa 2021-10-04 op ## Vim syntax files
74 ae6870fa 2021-10-04 op
75 ae6870fa 2021-10-04 op => https://git.omarpolo.com/gmid/tree/contrib/vim contrib/vim
76 ae6870fa 2021-10-04 op
77 ae6870fa 2021-10-04 op 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.:
78 9212cf1b 2021-10-04 op
79 ae6870fa 2021-10-04 op ```install the vim syntax highlight in your home
80 ae6870fa 2021-10-04 op $ mkdir -p ~/.vim
81 ae6870fa 2021-10-04 op $ cp -R contrib/vim/* ~/.vim/
82 ae6870fa 2021-10-04 op ```
83 ae6870fa 2021-10-04 op
84 ae6870fa 2021-10-04 op To enable Syntastic checker, add to your vimrc:
85 9212cf1b 2021-10-04 op
86 ae6870fa 2021-10-04 op ```
87 ae6870fa 2021-10-04 op let g:syntastic_gmid_checkers = ['gmid']
88 ae6870fa 2021-10-04 op ```
89 ae6870fa 2021-10-04 op
90 ae6870fa 2021-10-04 op => vim-screenshot.png Screenshot of vim editing gmid.conf