snowballtools-base-api-stack/stack-orchestrator/container-build/cerc-snowballtools-base-backend/Dockerfile-base
nabarun 22f4ab36de Use gitea repo for snowballtools-base (#2)
Part of [Service provider auctions for web deployments](https://www.notion.so/Service-provider-auctions-for-web-deployments-104a6b22d47280dbad51d28aa3a91d75)
- Update repository to `cerc-io/snowballtools-base` in `stack.yml`
- Update command to build backend package

Co-authored-by: Adw8 <adwaitgharpure@gmail.com>
Reviewed-on: #2
Co-authored-by: nabarun <nabarun@noreply.git.vdb.to>
Co-committed-by: nabarun <nabarun@noreply.git.vdb.to>
2024-10-24 14:15:39 +00:00

27 lines
853 B
Plaintext

FROM ubuntu:22.04 as builder
RUN apt update && \
apt install -y --no-install-recommends --no-install-suggests \
ca-certificates curl gnupg
# Node
ARG NODE_MAJOR=20
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list && \
apt update && apt install -y nodejs
# npm setup
RUN npm config set @cerc-io:registry https://git.vdb.to/api/packages/cerc-io/npm/ && npm install -g yarn
COPY . /app/
WORKDIR /app/
RUN find . -name 'node_modules' | xargs -n1 rm -rf
RUN yarn && yarn workspace backend build
FROM cerc/webapp-base:local
COPY --from=builder /app /app
WORKDIR /app/packages/backend