Skip to content
This repository has been archived by the owner on Nov 28, 2021. It is now read-only.

feat: dockerise and package to gh registry (#69) #70

Merged
merged 9 commits into from
Mar 10, 2021
Merged

Conversation

eddiejaoude
Copy link
Owner

@eddiejaoude eddiejaoude commented Mar 8, 2021

Fixes #69

Proposed Changes

Build container

docker build -t eddiejaoude/stargate .
Sending build context to Docker daemon    746kB
Step 1/10 : FROM node:15
 ---> 135b0832eaab
Step 2/10 : LABEL org.opencontainers.image.source https://github.com/eddiejaoude/stargate
 ---> Running in 80b383517056
Removing intermediate container 80b383517056
 ---> 798ec7882198
Step 3/10 : ARG NODE_ENV=production
 ---> Running in 948fda4a5d76
Removing intermediate container 948fda4a5d76
 ---> 30a59811ef31
Step 4/10 : ENV NODE_ENV=${NODE_ENV}
 ---> Running in 2350597510b1
Removing intermediate container 2350597510b1
 ---> 40b51866b243
Step 5/10 : ENV HUSKY=0
 ---> Running in b08517de2e01
Removing intermediate container b08517de2e01
 ---> 0780e9d0798c
Step 6/10 : WORKDIR /usr/src/app
 ---> Running in 0afc12c5369e
Removing intermediate container 0afc12c5369e
 ---> 6e1e9c464600
Step 7/10 : COPY package*.json ./
 ---> 123dc62492e4
Step 8/10 : RUN npm install --only=production
 ---> Running in 35f0cf37cc5b

> stargate@0.0.0 prepare
> if test "$HUSKY" != "0" ; then husky install ; fi


up to date, audited 1 package in 1s

found 0 vulnerabilities
npm notice 
npm notice New patch version of npm available! 7.6.0 -> 7.6.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v7.6.1>
npm notice Run `npm install -g npm@7.6.1` to update!
npm notice 
Removing intermediate container 35f0cf37cc5b
 ---> 19c4f5724eed
Step 9/10 : COPY . .
 ---> bd15040a9d5d
Step 10/10 : CMD ["npm", "start"]
 ---> Running in 0447edbaf207
Removing intermediate container 0447edbaf207
 ---> 21d06d505414
Successfully built 21d06d505414
Successfully tagged eddiejaoude/stargate:latest

Running container

docker run -p 3000:3000 -d eddiejaoude/stargate
af9eb370e221921db4cce8b4d4a277b2f46a6beb84ba6d1e135a5595b6fdf6fd

Docker logs

docker logs af9eb370e221

> stargate@0.0.0 start
> node ./prod/index.js

It's aliiiiiiive!

Screenshot 2021-03-08 at 16 40 11

Screenshot 2021-03-08 at 16 46 08

Copy link

@rsrinath14 rsrinath14 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Amazing!

.dockerignore Show resolved Hide resolved
docs/docker.md Outdated Show resolved Hide resolved
docs/docker.md Outdated Show resolved Hide resolved
@eddiejaoude
Copy link
Owner Author

Thanks all for reviewing 👍

@eddiejaoude eddiejaoude merged commit 8990ab3 into main Mar 10, 2021
@eddiejaoude eddiejaoude deleted the issue-69 branch March 10, 2021 23:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dockerise app
3 participants