Add dockerfile and docker documentation in README.md

This commit is contained in:
Th1b4ud
2022-08-14 02:16:19 +02:00
parent aee38c91c3
commit 69efe3d534
3 changed files with 51 additions and 0 deletions

30
Dockerfile Normal file
View File

@ -0,0 +1,30 @@
# docker build . -t mokuappio/serverless-invoices
# docker run -p 80:8080 -d mokuappio/serverless-invoices
FROM node:16
RUN npm install -g http-server
# Create app directory
WORKDIR /app
# Copy package.json and package-lock.json
COPY package*.json ./
# Install
RUN npm install
# Bundle app source
COPY . .
# Copy config (grrrr not written in README!! https://github.com/mokuappio/serverless-invoices/issues/9)
COPY src/config/app.config.example.js ./src/config/app.config.js
# Build the app
RUN npm run build
# Choose what port to expose
EXPOSE 8080
# Run the app
CMD ["http-server", "dist"]