add dockerfile for production deployment

This commit is contained in:
Brandon Egger 2023-04-13 12:46:31 -05:00
parent 8ed183cc49
commit aeeaa0eb46
2 changed files with 28 additions and 0 deletions

19
Dockerfile Normal file
View File

@ -0,0 +1,19 @@
# Production Environment Dockerfile
# base image
FROM node:alpine
# create & set working directory
RUN mkdir -p /app
WORKDIR /app
# copy source files
COPY . /app
# install dependencies
RUN npm install
# start app
RUN npm run build
EXPOSE 3000
CMD npm run start

9
docker-compose.yml Normal file
View File

@ -0,0 +1,9 @@
version: '3'
services:
uiowa-atr:
build: .
ports:
- "1234:3000"
environment:
NODE_ENV: production