Skip to content

Commit d92cd68

Browse files
committed
feat(docker): docker
1 parent 49a1f76 commit d92cd68

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

.dockerignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
*.md

Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Base image
2+
FROM node:23-alpine
3+
4+
# Setting work directory
5+
WORKDIR /usr/src/app
6+
7+
# We do this as a separate step as it optimizes the build of the image. Docker runs in stages and caches each stage.
8+
COPY package*.json ./
9+
RUN npm install
10+
11+
# Copy source files
12+
COPY . .
13+
14+
# Expose port 3000
15+
EXPOSE 3000
16+
17+
# Start the server
18+
CMD [ "npm", "start" ]

docker-compose.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '3'
2+
services:
3+
app:
4+
container_name: go.resonite.com
5+
build: .
6+
ports:
7+
- "3000:3000"
8+
volumes:
9+
- .:/usr/src/app
10+
- /usr/src/app/node_modules

0 commit comments

Comments
 (0)