build: improve docker image and binary sizes
							parent
							
								
									14b0dfec34
								
							
						
					
					
						commit
						35ca24adb8
					
				|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
|  | @ -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 && \ | ||||
|  |  | |||
|  | @ -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 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	 jagadam97
						jagadam97