This commit is contained in:
Florian Hoss 2023-07-04 11:51:13 +02:00
commit f90fdc0598
99 changed files with 15260 additions and 0 deletions

51
docker/Dockerfile Normal file
View file

@ -0,0 +1,51 @@
ARG GOLANG_VERSION
ARG NODE_VERSION
ARG ALPINE_VERSION
FROM golang:${GOLANG_VERSION}-alpine AS goBuilder
RUN apk add cmake g++ gcc
WORKDIR /app
COPY ./swagger.sh .
RUN ./swagger.sh install
COPY ./go.mod .
COPY ./go.sum .
RUN go mod download
COPY . .
RUN ./swagger.sh init
RUN go build -ldflags="-s -w"
FROM node:${NODE_VERSION}-alpine AS nodeBuilder
WORKDIR /app
COPY ./frontend/package.json .
COPY ./frontend/yarn.lock .
RUN yarn install --frozen-lockfile
COPY --from=goBuilder /app/docs/swagger.json ../docs/swagger.json
COPY ./frontend/ .
RUN yarn run types:openapi
RUN yarn run build
FROM alpine:${ALPINE_VERSION} AS logo
RUN apk add figlet
RUN figlet Cafe > logo.txt
FROM alpine:${ALPINE_VERSION} AS final
RUN apk add tzdata
WORKDIR /app
COPY ./scripts/entrypoint.sh .
COPY --from=logo /logo.txt .
COPY --from=nodeBuilder /app/dist/ ./templates/
COPY --from=goBuilder /app/cafe .
COPY config.toml .
ARG VERSION
ENV VERSION=$VERSION
ARG BUILD_TIME
ENV BUILD_TIME=$BUILD_TIME
ENTRYPOINT ["/app/entrypoint.sh"]

15
docker/Dockerfile.dev Normal file
View file

@ -0,0 +1,15 @@
ARG GOLANG_VERSION
FROM golang:${GOLANG_VERSION}-alpine
RUN apk add cmake g++ gcc
WORKDIR /app
COPY ./go.mod .
COPY ./go.sum .
RUN go mod download
RUN go install github.com/cosmtrek/air@latest
ENV VERSION=v0.0.0-DEV
ENV BUILD_TIME=2023-06-01T08:07:43.454Z
CMD ["air"]

View file

@ -0,0 +1,50 @@
default_redirection_url: http://cafe.test
server:
host: authelia
path: auth
port: 9091
buffers:
read: 8192
write: 8192
log:
level: error
theme: auto
authentication_backend:
password_reset:
disable: true
file:
path: /config/users_database.yml
access_control:
default_policy: deny
rules:
- domain_regex: 'cafe.test'
policy: one_factor
totp:
disable: true
webauthn:
disable: true
session:
name: auth_cafe_plaetschwiesle
domain: cafe.test
regulation:
max_retries: 3
find_time: 2m
ban_time: 5m
storage:
local:
path: /config/db.sqlite3
notifier:
disable_startup_check: false
filesystem:
filename: /config/notification.txt

View file

@ -0,0 +1,14 @@
users:
besitzer:
displayname: 'Besitzer'
password: '$argon2id$v=19$m=65536,t=3,p=4$Qno2VXJTVVNNNERjVkVXbQ$rEUoGFLekVIVXm76ahP8hcqLHjstRpM1pMLf0tUTBJM'
email: mail@example.com
groups:
- account
- serve
bedienung:
displayname: 'Bedienung'
password: '$argon2id$v=19$m=65536,t=3,p=4$WjlhejJVSXc5TVNLQVprUw$i6DzQukeTsXh3VL36KtCyt+rAdbJSG5AMe3c8Xiw34Q'
email: mail@example.com
groups:
- serve

View file

@ -0,0 +1 @@
this_is_not_a_secure_password