picobook/Dockerfile

42 lines
966 B
Docker
Raw Normal View History

2023-10-29 19:28:07 +00:00
# Installs Node image
2024-03-29 00:00:51 -07:00
FROM node:18-alpine 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-29 20:23:39 -07:00
# RUN apt update
# RUN apt -y install python3
2024-03-29 20:23:14 -07:00
2024-03-29 00:00:51 -07:00
# RUN apt-get update
# RUN apt-get -y install libsdl2-dev
# RUN apt-get -y install xorg-dev
2024-03-27 21:15:29 -07:00
2024-03-29 00:00:51 -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"]