Skip to content

Commit

Permalink
Docker Build & Start
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtuGit committed Dec 29, 2022
1 parent 5be00f9 commit 37678b1
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
npm-debug*
.nuxt
22 changes: 22 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Dockerfile
FROM node:14.15.1-alpine

# create destination directory
RUN mkdir -p /usr/src/nuxt-app
WORKDIR /usr/src/nuxt-app

# update and install dependency
RUN apk update && apk upgrade
RUN apk add git

# copy the app, note .dockerignore
COPY . /usr/src/nuxt-app/
RUN npm install
RUN npm run build

EXPOSE 5000

ENV NUXT_HOST=0.0.0.0
ENV NUXT_PORT=5000

CMD [ "npm", "start" ]
12 changes: 11 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@ https://my-word-cards.itcross.org
- Firebase Authentication
- Firebase Storage

## Node version:
## Local development:

### Node version:
```
node@itcross:~$ node -v
v14.15.1
node@itcross:~$ npm -v
6.14.8
```

## Docker Build & Start/Stop:
```
docker build -t my-word-cards .
docker run -it -p 5000:5000 my-word-cards
docker ps -a
docker stop <container_id?
```

0 comments on commit 37678b1

Please sign in to comment.