build: improve docker image and binary sizes

This commit is contained in:
jagadam97 2025-07-12 11:38:30 +05:30 committed by Henrique Dias
parent 14b0dfec34
commit 35ca24adb8
5 changed files with 16 additions and 3 deletions

View File

@ -85,6 +85,8 @@ jobs:
node-version: "22.x"
cache: "pnpm"
cache-dependency-path: "frontend/pnpm-lock.yaml"
- name: Install upx
run: sudo apt-get install -y upx
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx

View File

@ -40,6 +40,17 @@ archives:
- goos: windows
formats: ["zip"]
upx:
- enabled: true
goos:
- linux
- darwin
goarch:
- amd64
- arm64
compress: "best"
lzma: true
dockers:
# Alpine docker images
- dockerfile: Dockerfile

View File

@ -1,7 +1,7 @@
FROM alpine:3.22
RUN apk update && \
apk --no-cache add ca-certificates mailcap curl jq tini
apk --no-cache add ca-certificates mailcap jq tini
# Make user and create necessary directories
ENV UID=1000

View File

@ -1,7 +1,7 @@
FROM ghcr.io/linuxserver/baseimage-alpine:3.22
RUN apk update && \
apk --no-cache add ca-certificates mailcap curl jq
apk --no-cache add ca-certificates mailcap jq
# Make user and create necessary directories
RUN mkdir -p /config /database /srv && \

View File

@ -6,4 +6,4 @@ PORT=${FB_PORT:-$(jq -r .port /config/settings.json)}
ADDRESS=${FB_ADDRESS:-$(jq -r .address /config/settings.json)}
ADDRESS=${ADDRESS:-localhost}
curl -f http://$ADDRESS:$PORT/health || exit 1
wget -q --spider http://$ADDRESS:$PORT/health || exit 1