Skip to content

Commit

Permalink
update Dockerfile and documentation to work with vite build update
Browse files Browse the repository at this point in the history
  • Loading branch information
SkalskiP committed Oct 26, 2022
1 parent 8a7dadf commit de3ea63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,15 @@ To ensure proper functionality of the application locally, npm `8.x.x` and node.

```bash
# Build Docker Image
docker build -t make-sense docker/
docker build -t make-sense -f docker/Dockerfile .

# Run Docker Image as Service
docker run -dit -p 3000:3000 --restart=always --name=make-sense make-sense

# Get Docker Container IP
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' make-sense
# Go to `<DOCKER_CONTAINER_IP>:3000`

# Get Docker Container Logs
docker logs make-sense

# Access make-sense: http:https://localhost:3000/
```

## ⌨️ Keyboard Shortcuts
Expand Down
11 changes: 5 additions & 6 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@ FROM node:16.16.0

RUN apt-get update && apt-get -y install git && rm -rf /var/lib/apt/lists/*

RUN mkdir /workspace && \
cd /workspace && \
git clone https://github.com/SkalskiP/make-sense.git && \
cd make-sense && \
COPY ./ /make-sense

RUN cd /make-sense && \
npm install

WORKDIR /workspace/make-sense
WORKDIR /make-sense

ENTRYPOINT ["npm", "start"]
ENTRYPOINT ["npm", "run", "dev"]
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@
"yolov5js": "^1.0.0"
},
"scripts": {
"dev": "vite --port 3000",
"dev": "vite --host --port 3000",
"start": "vite --port 3000",
"build": "vite build",
"preview": "vite preview --port 3000",
"preview": "vite preview --host --port 3000",
"test": "jest",
"test:coverage": "jest --coverage",
"lint": "eslint src/**/*.ts src/**.tsx"
Expand Down

0 comments on commit de3ea63

Please sign in to comment.