···16161717# Storage driver type (s3, filesystem)
1818# Default: s3
1919+#
2020+# S3 Presigned URLs:
2121+# When using S3 storage, presigned URLs are automatically enabled for direct
2222+# client ↔ S3 transfers. This eliminates the hold service as a bandwidth
2323+# bottleneck, reducing hold bandwidth by ~99% for push/pull operations.
2424+# Falls back to proxy mode automatically for non-S3 drivers.
1925STORAGE_DRIVER=filesystem
20262127# For S3/Storj/Minio:
+10-31
Dockerfile.appview
···11-# ==========================================
22-# Stage 1: Build stage with Debian (glibc)
33-# ==========================================
41FROM golang:1.25.2-trixie AS builder
5266-# Install SQLite development libraries (for CGO compilation)
73RUN apt-get update && \
84 apt-get install -y --no-install-recommends sqlite3 libsqlite3-dev && \
95 rm -rf /var/lib/apt/lists/*
1061111-# Set working directory
127WORKDIR /build
1381414-# Copy go mod files and download dependencies (cached layer)
159COPY go.mod go.sum ./
1610RUN go mod download
17111818-# Copy source code
1912COPY . .
20132121-# Build optimized binary:
2222-# - CGO_ENABLED=1: Required for SQLite (mattn/go-sqlite3)
2323-# - -ldflags="-s -w": Strip debug symbols (~30% size reduction)
2424-# - -tags sqlite_omit_load_extension: Remove SQLite extension loading (~100KB savings)
2525-# - -trimpath: Remove build paths (reproducible builds)
2626-# SQLite is statically embedded in the binary (no runtime .so needed)
2714RUN CGO_ENABLED=1 go build \
2815 -ldflags="-s -w" \
2916 -tags sqlite_omit_load_extension \
3017 -trimpath \
3118 -o atcr-appview ./cmd/appview
32193333-# Collect minimal runtime dependencies based on ldd output
3434-RUN mkdir -p /runtime-deps/lib/x86_64-linux-gnu /runtime-deps/lib64 && \
3535- # Core glibc library (only one the binary links to)
3636- cp -L /lib/x86_64-linux-gnu/libc.so.6 /runtime-deps/lib/x86_64-linux-gnu/ && \
3737- # Dynamic linker
3838- cp -L /lib64/ld-linux-x86-64.so.2 /runtime-deps/lib64/ && \
3939- # NSS modules for DNS resolution (loaded via dlopen at runtime, not shown in ldd)
4040- cp -L /lib/x86_64-linux-gnu/libnss_dns.so.2 /runtime-deps/lib/x86_64-linux-gnu/ && \
4141- cp -L /lib/x86_64-linux-gnu/libnss_files.so.2 /runtime-deps/lib/x86_64-linux-gnu/ && \
4242- # NSS modules depend on libresolv
4343- cp -L /lib/x86_64-linux-gnu/libresolv.so.2 /runtime-deps/lib/x86_64-linux-gnu/ && \
2020+# Collect minimal runtime dependencies
2121+RUN mkdir -p /runtime-deps/lib64 /runtime-deps/lib/x86_64-linux-gnu && \
2222+ # Core glibc libraries (from ldd output)
2323+ cp /lib/x86_64-linux-gnu/libc.so.6 /runtime-deps/lib64/ && \
2424+ cp /lib/x86_64-linux-gnu/libresolv.so.2 /runtime-deps/lib64/ && \
2525+ cp /lib64/ld-linux-x86-64.so.2 /runtime-deps/lib64/ && \
2626+ # NSS (Name Service Switch) modules for DNS resolution
2727+ cp /lib/x86_64-linux-gnu/libnss_dns.so.2 /runtime-deps/lib/x86_64-linux-gnu/ && \
2828+ cp /lib/x86_64-linux-gnu/libnss_files.so.2 /runtime-deps/lib/x86_64-linux-gnu/ && \
4429 # Create NSS config (tells glibc to check /etc/hosts then DNS)
4530 echo "hosts: files dns" > /tmp/nsswitch.conf
4631···51365237# Copy minimal glibc runtime dependencies
5338COPY --from=builder /runtime-deps /
5454-5539# Copy NSS configuration for DNS resolution
5640COPY --from=builder /tmp/nsswitch.conf /etc/nsswitch.conf
5757-5841# Copy CA certificates for HTTPS (PDS, Jetstream, relay connections)
5942COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
6060-6143# Copy timezone data for timestamp formatting
6244COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
6363-6445# Copy optimized binary (SQLite embedded)
6546COPY --from=builder /build/atcr-appview /atcr-appview
66476767-# Expose port (main HTTP server)
4848+# Expose ports
6849EXPOSE 5000
69507051# OCI image annotations
···7758 org.opencontainers.image.version="0.1.0" \
7859 io.atcr.icon="https://imgs.blue/evan.jarrett.net/1TpTNrRelfloN2emuWZDrWmPT0o93bAjEnozjD6UPgoVV9m4"
79608080-# Run the AppView (no config file - uses environment variables)
8181-# Creates /var/lib/atcr directories on first run via Go code
8261ENTRYPOINT ["/atcr-appview"]
8362CMD ["serve"]