Add favicon map as compilable target
ci/woodpecker/push/build Pipeline was successful Details

This commit is contained in:
Melon 2023-01-21 16:36:39 +00:00
parent 5d7f23fb29
commit e276b80fac
Signed by: melon
GPG Key ID: 6C9D970C50D26A25
3 changed files with 9 additions and 23 deletions

View File

@ -1,20 +0,0 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="GoUnhandledErrorResult" enabled="true" level="WARNING" enabled_by_default="true">
<methods>
<method importPath="hash" receiver="Hash" name="Write" />
<method importPath="strings" receiver="*Builder" name="Write" />
<method importPath="strings" receiver="*Builder" name="WriteByte" />
<method importPath="bytes" receiver="*Buffer" name="WriteRune" />
<method importPath="bytes" receiver="*Buffer" name="Write" />
<method importPath="bytes" receiver="*Buffer" name="WriteString" />
<method importPath="strings" receiver="*Builder" name="WriteString" />
<method importPath="bytes" receiver="*Buffer" name="WriteByte" />
<method importPath="strings" receiver="*Builder" name="WriteRune" />
<method importPath="math/rand" receiver="*Rand" name="Read" />
<method importPath="github.com/galihrivanto/go-inkscape" receiver="*Proxy" name="Close" />
</methods>
</inspection_tool>
</profile>
</component>

View File

@ -1,4 +1,4 @@
FROM golang:1.19
FROM golang:1.19 AS build
WORKDIR /go/src/app
COPY ../.. .
@ -6,4 +6,10 @@ COPY ../.. .
RUN go get -d -v ./...
RUN ./scripts/build.sh "/bin/azalea" "./cmd/azalea/"
CMD ["/bin/azalea"]
FROM debian:latest
RUN apt-get update && apt-get install -y inkscape \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /root
COPY --from=build /bin/azalea .
CMD ["./azalea"]

View File

@ -91,7 +91,7 @@ func (azalea *Azalea) Init(runner *cli.Runner[config.AzaleaConfig]) {
tableRouter, err := routing.New(runner.Database, azalea.reverseProxy, azalea.accessLog, fourEighteenErrorFunc)
domainCheck := domainChecker.New(runner.Database)
faviconMap := favicons.New(runner.Database, azalea.conf.Inkscape)
compileTargets := api.MultiCompilable{tableRouter, domainCheck}
compileTargets := api.MultiCompilable{tableRouter, domainCheck, faviconMap}
utils.Check("[Azalea.Init()] Failed to load table router:", err)
azalea.httpServer = servers.NewHttpServer(azalea.conf.Listen.Http, addrPort, azalea.runner.Database, domainCheck)