Custom domain support

This commit is contained in:
MoonDev
2026-02-06 11:19:50 +03:00
parent c377acd0d6
commit 17583a3746
5 changed files with 59 additions and 32 deletions

View File

@@ -1,5 +1,8 @@
FROM eclipse-temurin:21-jdk-jammy AS builder
# Build argument for domain configuration
ARG DOMAIN=attestation.app
WORKDIR /build
RUN apt-get update && apt-get install -y git && rm -rf /var/lib/apt/lists/*
@@ -11,10 +14,9 @@ RUN git clone --depth 1 --recurse-submodules https://github.com/GrapheneOS/Attes
RUN sed -i 's/new InetSocketAddress("::1", 8080)/new InetSocketAddress("0.0.0.0", 8080)/' \
src/main/java/app/attestation/server/AttestationServer.java
# Optional: Patch the domain if you want to use a custom domain
# Uncomment and modify the following line for your domain:
# RUN sed -i 's/attestation.app/your-domain.com/g' \
# src/main/java/app/attestation/server/AttestationServer.java
# Patch the domain using the build argument
RUN sed -i "s/attestation.app/${DOMAIN}/g" \
src/main/java/app/attestation/server/AttestationServer.java
RUN chmod +x gradlew && ./gradlew build -x test --no-daemon