add dockerfile for production deployment
This commit is contained in:
parent
8ed183cc49
commit
aeeaa0eb46
19
Dockerfile
Normal file
19
Dockerfile
Normal 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
9
docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
version: '3'
|
||||||
|
|
||||||
|
services:
|
||||||
|
uiowa-atr:
|
||||||
|
build: .
|
||||||
|
ports:
|
||||||
|
- "1234:3000"
|
||||||
|
environment:
|
||||||
|
NODE_ENV: production
|
Loading…
x
Reference in New Issue
Block a user