picobook/Dockerfile

35 lines
832 B
Docker
Raw Normal View History

2023-10-29 19:28:07 +00:00
# Installs Node image
FROM node:18-alpine as base
# sets the working directory for any RUN, CMD, COPY command
WORKDIR /app
2024-03-25 00:33:40 -07:00
# ENV PORT=3000
# ENV DB_HOST=postgres
# ENV DB_USER=postgres
# ENV DB_NAME=db_name
# ENV DB_PASSWORD=password
# ENV DB_PORT=5432
# ENV DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@${DB_HOST}:${DB_PORT}/${DB_NAME}
2023-10-29 19:28:07 +00:00
2024-03-26 19:19:01 -07:00
# intentionally here only for temporary cache-busting test
# COPY ./client ./client
2024-03-26 20:31:55 -07:00
COPY ./pico8/pico8 /usr/bin/
# RUN echo "chmoding pico8"
# RUN chmod +x ./usr/bin/pico8
2023-10-29 13:28:00 -07:00
2023-10-29 19:28:07 +00:00
# Copies stuff to cache for install
COPY ./package.json ./package-lock.json tsconfig.json ./
RUN echo "npm install"
RUN npm install
# Copies everything in the src directory to WORKDIR/src
COPY ./src ./src
COPY ./scripts ./scripts
# Run the server
RUN echo "npm run prod-start"
CMD ["npm", "run", "prod-start"]