Forráskód Böngészése

Added docker build and documentation

t0n3 8 éve
szülő
commit
5a2dfb9efc
3 módosított fájl, 37 hozzáadás és 0 törlés
  1. 14 0
      Dockerfile
  2. 23 0
      README.md
  3. 0 0
      bin/.empty

+ 14 - 0
Dockerfile

@@ -0,0 +1,14 @@
+FROM scratch
+
+LABEL maintainer "[email protected]"
+
+COPY bin/sakuin /app/
+COPY assets/ /app/assets/
+
+EXPOSE 3000
+VOLUME ["/data"]
+
+WORKDIR /app
+
+ENTRYPOINT ["/app/sakuin"]
+CMD ["-dir","/data"]

+ 23 - 0
README.md

@@ -1,3 +1,26 @@
 # Sakuin (索引)
 Sakuin is an http file indexer written in Go. 
 It to expose your files from a given directory, simply and nicely.
+
+## Building
+
+```
+go build --o bin/sakuin
+```
+
+## Usage
+
+```
+Usage of sakuin:
+  -dir string
+        Path to data dir you want to expose (default ".")
+  -port int
+        Port binded by Sakuin (default 3000)
+```
+
+## Building Docker image
+
+```
+GOOS=linux go build --o bin/sakuin
+docker build .
+```

+ 0 - 0
bin/.empty