Skip to content

Commit

Permalink
[chore] add docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
clettenberg committed Mar 9, 2024
1 parent a5e8176 commit 93420f6
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Specify the base image
FROM node:14

# Set the working directory in the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json
COPY package.json package-lock.json ./

# Install app dependencies
RUN npm install

# Bundle app source
COPY . .

# Your app binds to port 3000, so you'll use the EXPOSE instruction to have it mapped by the docker daemon
EXPOSE 3000

# Define the command to run your app
CMD [ "node", "server.js" ]
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3.8'
services:
web:
build: .
ports:
- "3000:3000"
environment:
NODE_ENV: development
volumes:
- .:/usr/src/app
- /usr/src/app/node_modules

0 comments on commit 93420f6

Please sign in to comment.