Skip to content

Commit

Permalink
dev dockerizing
Browse files Browse the repository at this point in the history
  • Loading branch information
wakidurrahman committed Nov 29, 2023
1 parent 94b13a5 commit 7868182
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 14 deletions.
1 change: 0 additions & 1 deletion client/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
package-lock.json
node_modules
24 changes: 20 additions & 4 deletions client/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
FROM node:18-alpine
# syntax=docker/dockerfile:1.4

WORKDIR '/app'
ARG NODE_VERSION=18.10.0

COPY ./package.json ./
# Create image based on the official Node image from dockerhub
FROM node:${NODE_VERSION}-alpine

# Create app directory
WORKDIR /app

# Copy dependency definitions
COPY ./package.json /app
COPY ./package-lock.json /app

# Install dependecies
RUN npm install
COPY ./ ./

# Get all the code needed to run the app
COPY ./ /app

# Expose the port the app runs in
EXPOSE 3000

# Serve the app
CMD ["npm", "run", "start"]
1 change: 0 additions & 1 deletion server/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
package-lock.json
node_modules
20 changes: 16 additions & 4 deletions server/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
FROM node:18-alpine
# syntax=docker/dockerfile:1.4

WORKDIR '/app'
ARG NODE_VERSION=18.10.0

COPY ./package.json ./
# Create image based on the official Node image from dockerhub
FROM node:${NODE_VERSION}-alpine

# Create app directory
WORKDIR /app

# Copy dependency definitions
COPY ./package.json /app
COPY ./package-lock.json /app

# Install dependecies
RUN npm install
COPY ./ ./

# Get all the code needed to run the app
COPY ./ /app

CMD ["npm", "run", "dev"]
20 changes: 16 additions & 4 deletions worker/Dockerfile.dev
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
FROM node:18-alpine
# syntax=docker/dockerfile:1.4

WORKDIR '/app'
ARG NODE_VERSION=18.10.0

COPY ./package.json ./
# Create image based on the official Node image from dockerhub
FROM node:${NODE_VERSION}-alpine

# Create app directory
WORKDIR /app

# Copy dependency definitions
COPY ./package.json /app
COPY ./package-lock.json /app

# Install dependecies
RUN npm install
COPY ./ ./

# Get all the code needed to run the app
COPY ./ /app

CMD ["npm", "run", "dev"]

0 comments on commit 7868182

Please sign in to comment.