# dx-maps cloud dev server: one shared Vite dev server with hot reload for a whole team. # This image is only a bootstrap: at start it clones the repo and runs deployment/cloud/entry.sh # FROM THE REPO, so the recipe lives in git and updates with it. Paste this file as-is into a # container host (Coolify "Dockerfile" build pack, Railway, or `docker build`). FROM quay.io/oauth2-proxy/oauth2-proxy:v7.15.3 AS oauth2proxy FROM oven/bun:1-debian RUN apt-get update && apt-get install -y --no-install-recommends git ca-certificates \ && rm -rf /var/lib/apt/lists/* COPY --from=oauth2proxy /bin/oauth2-proxy /usr/local/bin/oauth2-proxy RUN printf '%s\n' \ '#!/bin/bash' \ 'set -u; export GIT_TERMINAL_PROMPT=0' \ 'T="${GIT_TOKEN:-${FORGEJO_TOKEN:-}}"' \ 'if [ -n "$T" ]; then printf "#!/bin/sh\ncase \"\$1\" in *sername*) echo \"\$GIT_TOKEN_EFF\";; *) echo;; esac\n" > /tmp/askpass.sh; chmod 700 /tmp/askpass.sh; export GIT_ASKPASS=/tmp/askpass.sh GIT_TOKEN_EFF="$T"; fi' \ ': "${REPO_URL:?set REPO_URL to the dx-maps git URL}"' \ '[ -d /app/repo/.git ] || git clone -q --depth 1 --branch "${BRANCH:-main}" "$REPO_URL" /app/repo || { echo "clone failed"; sleep 60; exit 1; }' \ 'cp /app/repo/deployment/cloud/entry.sh /tmp/entry.sh && exec bash /tmp/entry.sh' \ > /boot.sh && chmod 755 /boot.sh ENV PORT=5173 BRANCH=main PULL_INTERVAL=15 EXPOSE 5173 CMD ["/boot.sh"]