Local OpenAI-compatible endpoint backed by a ChatGPT account's Codex OAuth login (wraps EvanZhouDev/openai-oauth + @openai/codex on node:alpine). Upstream has no client auth, so a Node entrypoint binds it to loopback and enforces a Bearer/x-api-key check on the published port; the key is auto-generated into addon_config on first start and printed in the log. Options map to upstream controls: api_key, models (--models), log_level/log_requests (CODEX_OPENAI_SERVER_LOG_REQUESTS). auth.json is read via --oauth-file /share/auth.json so token refreshes persist across restarts.
17 lines
453 B
Docker
17 lines
453 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM node:alpine
|
|
|
|
RUN npm install -g openai-oauth @openai/codex
|
|
|
|
COPY rootfs /
|
|
|
|
LABEL \
|
|
io.hass.name="OpenAI Codex Proxy" \
|
|
io.hass.description="Local reverse proxy for ChatGPT Plus Codex OAuth" \
|
|
io.hass.type="addon" \
|
|
io.hass.version="1.0.2" \
|
|
org.opencontainers.image.title="openai-codex-proxy" \
|
|
org.opencontainers.image.source="https://git.i3omb.com/gronod/ha-gronod-addons"
|
|
|
|
CMD ["node", "/entrypoint.js"]
|