Fix dockerfile and lint config.example.yaml

This commit is contained in:
Evan Fiordeliso 2023-08-14 23:11:10 -04:00
parent f0bf42dcbe
commit 8e6a2b40db
5 changed files with 10 additions and 40 deletions

7
.trunk/.gitignore vendored
View File

@ -1,7 +0,0 @@
*out
*logs
*actions
*notifications
plugins
user_trunk.yaml
user.yaml

View File

@ -1,4 +0,0 @@
# Following source doesn't work in most setups
ignored:
- SC1090
- SC1091

View File

@ -1,23 +0,0 @@
---
version: 0.1
cli:
version: 1.7.0
plugins:
sources:
- id: trunk
ref: v0.0.15
uri: https://github.com/trunk-io/plugins
lint:
enabled:
- git-diff-check
- gitleaks@8.16.2
- gofmt@1.19.3
- golangci-lint@1.52.2
- hadolint@2.12.0
- prettier@2.8.7
- taplo@0.7.0
runtimes:
enabled:
- go@1.19.5
- node@18.12.1
- python@3.10.8

View File

@ -3,6 +3,7 @@ ARG ALPINE_VERSION="3.18"
FROM golang:${GOLANG_VERSION}-alpine${ALPINE_VERSION} AS build
ENV VERSION_PKG="go.fifitido.net/ytdl-web/version"
ARG VERSION=latest
ARG BUILD="unknown"
ARG BUILD_DATE="unknown"
@ -17,10 +18,10 @@ RUN go mod download
COPY . .
RUN go build \
-ldflags="-X $VERSION_PKG.Version=${VERSION}" \
-ldflags="-X $VERSION_PKG.Build=${BUILD}" \
-ldflags="-X $VERSION_PKG.BuildDate=${BUILD_DATE}" \
-ldflags="-X $VERSION_PKG.BuiltBy=${BUILT_BY}" \
-ldflags="-X $VERSION_PKG.Version=$VERSION" \
-ldflags="-X $VERSION_PKG.Build=$BUILD" \
-ldflags="-X $VERSION_PKG.BuildDate=$BUILD_DATE" \
-ldflags="-X \"$VERSION_PKG.BuiltBy=$BUILT_BY\"" \
-o /ytdl-web .
FROM alpine:${ALPINE_VERSION}

View File

@ -1,9 +1,11 @@
---
# The server environment
# For dev environments use Development
# For prod environments use Production
# For staging envronments use Staging
env: Production
# The path to the yt-dlp binary, if it is already in your $PATH just yt-dlp will work.
# The path to the yt-dlp binary
# If it is already in your $PATH just yt-dlp will work.
binaryPath: yt-dlp
http:
# The port to listen on
@ -29,7 +31,8 @@ cookies:
# Settings for using cookies from a browser's cookies store
fromBrowser:
# The name of the browser to load cookies from.
# Currently supported browsers are: brave, chrome, chromium, edge, firefox, opera, safari, vivaldi.
# Currently supported browsers are: brave, chrome, chromium, edge,
# firefox, opera, safari, vivaldi.
browser: firefox
# The keyring used for decrypting Chromium cookies on Linux