0
0
mirror of https://github.com/rls-moe/nyx synced 2024-11-22 22:12:24 +00:00

Merge pull request #6 from bryanpedini/master

implemented Docker, added default configuration
This commit is contained in:
Tim Schuster 2020-04-22 07:28:18 +02:00 committed by GitHub
commit 0ab4ed8d2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 45 additions and 0 deletions

33
Dockerfile Normal file
View File

@ -0,0 +1,33 @@
FROM golang:1.14-buster AS build-env
COPY . ${GOPATH}/src/github.com/rls-moe/nyx
WORKDIR ${GOPATH}/src/github.com/rls-moe/nyx
RUN go build -o $GOPATH/bin/nyx
FROM debian:bullseye
LABEL maintainer="b.pedini@bjphoster.com"
EXPOSE 8080
RUN groupadd \
--gid 1000 \
nyx && \
useradd \
--home-dir /opt/nyx \
--comment "Nyx Board" \
--gid nyx \
--create-home \
--no-user-group \
--uid 1000 \
--shell /bin/bash \
nyx
COPY --from=build-env /go/bin/nyx /opt/nyx/nyx
COPY --from=build-env /go/src/github.com/rls-moe/nyx/config.example.yml /opt/nyx/config.yml
RUN chown -R \
nyx:nyx /opt/nyx
WORKDIR /opt/nyx
USER nyx
CMD [ "/opt/nyx/nyx" ]

12
config.example.yml Normal file
View File

@ -0,0 +1,12 @@
site:
title: "NyxChan"
description: "NyxChan Default Configuration"
db:
file: ":memory:"
mastersecret: "changeme"
listen_on: ":8080"
captcha:
mode: "internal"