picobook/Dockerfile

38 lines
876 B
Docker
Raw Normal View History

2023-10-29 19:28:07 +00:00
# Installs Node image
2024-03-27 19:52:43 -07:00
FROM node:18-buster as base
2023-10-29 19:28:07 +00:00
# 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-27 21:17:55 -07:00
RUN apt-get update
2024-03-27 21:16:30 -07:00
RUN apt-get install libsdl2-dev
2024-03-27 21:15:29 -07:00
2024-03-26 20:40:16 -07:00
COPY ./pico8 ./pico8
2024-03-26 20:31:55 -07:00
# 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"]