23 lines
877 B
Docker
23 lines
877 B
Docker
FROM node:22
|
|
|
|
ENV PNPM_HOME=/pnpm
|
|
ENV PATH=$PNPM_HOME:$PATH
|
|
|
|
WORKDIR /app
|
|
|
|
RUN corepack enable
|
|
|
|
COPY self-host/scripts/resolve-gateway-tag.mjs self-host/scripts/download-archive.mjs /tmp/scripts/
|
|
|
|
ARG GATEWAY_RELEASE_TAG=
|
|
RUN gateway_tag=$(node /tmp/scripts/resolve-gateway-tag.mjs) \
|
|
&& echo "Downloading Gateway source for tag: ${gateway_tag}" \
|
|
&& node /tmp/scripts/download-archive.mjs "https://github.com/every-app/every-app/archive/refs/tags/${gateway_tag}.tar.gz" /tmp/every-app-source.tar.gz \
|
|
&& mkdir -p /tmp/every-app-source \
|
|
&& tar -xzf /tmp/every-app-source.tar.gz -C /tmp/every-app-source \
|
|
&& source_root=$(find /tmp/every-app-source -mindepth 1 -maxdepth 1 -type d | head -n 1) \
|
|
&& cp -R "$source_root/apps/every-app-gateway/." /app \
|
|
&& rm -rf /tmp/every-app-source /tmp/every-app-source.tar.gz /tmp/scripts
|
|
|
|
RUN pnpm install --frozen-lockfile
|