# The relay as a container (ADR 0176), for when a Worker can't reach APNs over HTTP/2. Same code, Node's http2.
# Run with APNS_KEY, APNS_KEY_ID, APNS_TEAM_ID as secrets, APNS_TOPIC=team.heinzel.apple, a volume at /data, and
# TLS in front (TRUST_PROXY=1 when that proxy sets X-Forwarded-For). No request is logged.
FROM node:22-alpine
WORKDIR /relay
COPY package.json ./
COPY src ./src
USER node
ENV NODE_ENV=production PORT=8080 RELAY_STATE=/data/relay.json
EXPOSE 8080
CMD ["node", "src/node.js"]
