Files
explorer/apps/Dockerfile
ntampakas a44f2b46b7 Automated deployment on AWS Fargate (#13)
* Create Dockerfile for app

* Add deployment workflow

* Add aux scripts needed to build/deploy
2024-04-16 06:56:13 -04:00

27 lines
549 B
Docker

# Build app
FROM node:latest as builder
ENV PATH="${PATH}:/root/.cargo/bin"
WORKDIR /builder
COPY . .
RUN curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh -s -- -y
RUN npm i
RUN npm i --prefix rs/verifier/
RUN npm run build
# Create image for the app by copying build artifacts from builder
FROM node:latest as runner
RUN apt-get update; apt-get install netcat-openbsd -y
USER node
ARG PORT=3000
WORKDIR /home/node/explorer
COPY --from=builder /builder/build ./build
EXPOSE ${PORT}
CMD ["node", "build/server/index.bundle.js"]