www/Dockerfile

27 lines
733 B
Docker
Raw Permalink Normal View History

2023-03-17 21:25:56 -06:00
FROM node:18
ARG SITE_PORT=8080
ARG API_PORT=8081
EXPOSE ${SITE_PORT}
EXPOSE ${API_PORT}
2023-03-04 12:06:37 -07:00
# Create app directory
2023-03-17 21:25:56 -06:00
WORKDIR /app
# Install stripe-cli
2023-12-28 19:43:37 -07:00
RUN apt-get update && apt-get install -y curl gpg
2023-03-17 21:25:56 -06:00
RUN curl -s https://packages.stripe.dev/api/security/keypair/stripe-cli-gpg/public | gpg --dearmor >/usr/share/keyrings/stripe.gpg \
&& echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" >>/etc/apt/sources.list.d/stripe.list \
2023-12-28 19:43:37 -07:00
&& apt-get update && apt-get install -y stripe
2023-03-04 12:06:37 -07:00
# Install app dependencies
COPY package*.json ./
ENV NODE_ENV production
RUN npm install
2023-03-04 16:31:44 -07:00
COPY .eleventyignore ./
2023-03-04 16:01:01 -07:00
COPY *.js ./
COPY .env ./
2023-11-27 20:19:32 -07:00
COPY . .
2023-03-04 12:06:37 -07:00
# Run api
2023-03-04 16:31:44 -07:00
ENTRYPOINT ["npm", "run", "--"]