aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README.md60
-rw-r--r--contrib/Dockerfile25
-rw-r--r--contrib/docker-compose.yml15
-rw-r--r--legitrx.service (renamed from contrib/legit.service)4
-rw-r--r--legitrx.yaml (renamed from config.yaml)0
-rw-r--r--main.go2
6 files changed, 33 insertions, 73 deletions
diff --git a/README.md b/README.md
index 6da7232..b03e858 100644
--- a/README.md
+++ b/README.md
@@ -18,42 +18,42 @@ A git web frontend written in Go.
## INSTALLING
-Clone it, 'go build' it.
+Clone it, `go build` it.
## CONFIG
-Uses yaml for configuration. Looks for a 'config.yaml' in the current
-directory by default; pass the '--config' flag to point it elsewhere.
-
-Example config.yaml:
-
- repo:
- scanPath: /var/www/git
- readme:
- - readme
- - README
- - readme.md
- - README.md
- mainBranch:
- - master
- - main
- ignore:
- - foo
- - bar
- dirs:
- templates: ./templates
- static: ./static
- meta:
- title: git good
- description: i think it's a skill issue
- server:
- name: git.icyphox.sh
- host: 127.0.0.1
- port: 5555
+Looks for a `legitrx.yaml` in the current directory by default; pass the
+`--config` flag to point it elsewhere.
+
+```yaml
+repo:
+ scanPath: /var/www/git
+ readme:
+ - readme
+ - README
+ - readme.md
+ - README.md
+ mainBranch:
+ - master
+ - main
+ ignore:
+ - foo
+ - bar
+dirs:
+ templates: ./templates
+ static: ./static
+meta:
+ title: git good
+ description: i think it's a skill issue
+server:
+ name: git.icyphox.sh
+ host: 127.0.0.1
+ port: 5555
+ ```
These options are fairly self-explanatory, but of note are:
-- repo.scanPath: where all your git repos live (or die). legitrx doesn't
+- repo.scanPath: where all your git repos live. legitrx doesn't
traverse subdirs yet.
- dirs: use this to override the default templates and static assets.
- repo.readme: readme files to look for.
diff --git a/contrib/Dockerfile b/contrib/Dockerfile
deleted file mode 100644
index 753bc6c..0000000
--- a/contrib/Dockerfile
+++ /dev/null
@@ -1,25 +0,0 @@
-FROM golang:1.19-alpine AS builder
-
-WORKDIR /app
-
-COPY . ./
-
-RUN apk add gcc musl-dev libc-dev
-
-RUN go mod download
-RUN go mod verify
-RUN go build -o legit
-
-FROM alpine:latest
-
-WORKDIR /app
-
-COPY static ./static
-COPY templates ./templates
-COPY config.yaml ./
-COPY --from=builder /app/legit ./
-
-EXPOSE 5555
-
-CMD ["./legit"]
-
diff --git a/contrib/docker-compose.yml b/contrib/docker-compose.yml
deleted file mode 100644
index cb636f1..0000000
--- a/contrib/docker-compose.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-version: "3"
-services:
- legit:
- container_name: legit
- build:
- context: ../
- dockerfile: ../contrib/Dockerfile
- restart: unless-stopped
- ports:
- - "5555:5555"
- volumes:
- - /var/www/git:/var/www/git
- - ../config.yaml:/app/config.yaml
- - ../static:/app/static
- - ../templates:/app/templates
diff --git a/contrib/legit.service b/legitrx.service
index e0193ed..3fc8905 100644
--- a/contrib/legit.service
+++ b/legitrx.service
@@ -1,12 +1,12 @@
[Unit]
-Description=legit Server
+Description=legitrx Server
After=network-online.target
Requires=network-online.target
[Service]
User=git
Group=git
-ExecStart=/usr/bin/legit -config /etc/legit/config.yaml
+ExecStart=/usr/bin/legitrx -config /etc/legit/legitrx.yaml
ProtectSystem=strict
ProtectHome=strict
NoNewPrivileges=true
diff --git a/config.yaml b/legitrx.yaml
index 909509f..909509f 100644
--- a/config.yaml
+++ b/legitrx.yaml
diff --git a/main.go b/main.go
index 01b1e5d..cb1d2f0 100644
--- a/main.go
+++ b/main.go
@@ -12,7 +12,7 @@ import (
func main() {
var cfg string
- flag.StringVar(&cfg, "config", "./config.yaml", "path to config file")
+ flag.StringVar(&cfg, "config", "./legitrx.yaml", "path to config file")
flag.Parse()
c, err := config.Read(cfg)