Skip to content

Commit

Permalink
feat: create docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
becem-gharbi committed May 18, 2023
1 parent f8f3dcf commit 946c701
Show file tree
Hide file tree
Showing 6 changed files with 789 additions and 1,537 deletions.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
.env
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ node_modules/
.env
dist/
app.yaml
.gcloudignore
.gcloudignore
stats.md
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM node:18-alpine

# Create app directory
WORKDIR /usr/src/app

# Copy package.json & package-lock.json to app directory
COPY package*.json ./

# Install dependencies
RUN npm ci

# Bundle app source
COPY . .

# Build app
RUN npm run build

# Expose listening port
EXPOSE 8080

# Run app
CMD [ "npm", "start" ]
9 changes: 9 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: "0.1.1"

services:
nodered:
build: .
ports:
- "80:8080"
env_file:
- ./.env
Loading

0 comments on commit 946c701

Please sign in to comment.