Adds needed docker-support to enable automatic deployment via teamcity

This commit is contained in:
Lucas Hinderberger 2020-06-16 15:03:57 +02:00
parent 65219907f8
commit 157090d382
3 changed files with 27 additions and 0 deletions

2
.dockerignore Normal file
View File

@ -0,0 +1,2 @@
node_modules
npm-debug.log

18
Dockerfile Normal file
View File

@ -0,0 +1,18 @@
FROM node:12
# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY backend/package*.json ./
RUN npm install
# Bundle app source
COPY backend .
EXPOSE 3000
CMD [ "node", "server.js" ]

7
docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
version: '3'
services:
web:
build: .
command: npm start
ports:
- 1234:3000