Skip to content
Snippets Groups Projects
Commit 552ae0a9 authored by Alexander Tim Hobelsberger's avatar Alexander Tim Hobelsberger
Browse files

Dockerfile, docker-compose

parent 40c13d17
No related branches found
No related tags found
No related merge requests found
node_modules
npm-debug.log
\ No newline at end of file
#Get Node Image
FROM node:16
#Create app directory - this will be the working directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
COPY ["package.json", "package-lock.json*", "./"]
RUN npm install
# Bundle app source code inside the Docker Image
COPY . .
EXPOSE 3000
CMD [ "npm", "start" ]
\ No newline at end of file
version: '3'
services:
mongo:
image: mongo
ports:
- 27017:27017
volumes:
- mongodb:/data/db
node:
restart: always
build: .
ports:
- 3000:3000
volumes:
- ./:/code
volumes:
mongodb:
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment