Skip to content
This repository has been archived by the owner on Dec 18, 2023. It is now read-only.

Commit

Permalink
add docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ngxson committed Apr 2, 2023
1 parent 9e00db0 commit 356c9a5
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.git
.data
.next
node_modules
bin
19 changes: 19 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM node:18.15.0-alpine3.17

RUN apk add gcompat

ENV NODE_ENV=production
WORKDIR /app

COPY package.json .
COPY package-lock.json .

RUN npm i

COPY . .

# volumes need to be mounted bind mount
VOLUME [ "/app/.data" ]
VOLUME [ "/app/bin" ]

CMD npm start
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Screenshot:
## How to use

Pre-requirements:
- You have nodejs v18+ installed on your machine
- You have nodejs v18+ installed on your machine (or if you have Docker, you don't need to install nodejs)
- You are using Linux (Windows should also work, but I have not tested yet)

🔶 **Step 1**: Clone this repository to your local machine
Expand All @@ -54,11 +54,13 @@ npm i
npm start
```

Alternatively, you can just use `docker compose up` if you have Docker installed.

Then, open [http://localhost:13000/](http://localhost:13000/) on your browser

## TODO

- [ ] Test on Windows
- [x] Proxy ws via nextjs
- [ ] Add Dockerfile
- [x] Add Dockerfile / docker-compose
- [ ] UI: add avatar
12 changes: 12 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: '3'

services:
alpaca_webui:
build: .
container_name: alpaca_webui
hostname: alpaca_webui
ports:
- 13000:13000
volumes:
- ./.data:/app/.data
- ./bin:/app/bin
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,7 @@
"sqlite3": "^5.1.6",
"underscore": "^1.13.6",
"uuid": "^9.0.0",
"uuidv4": "^6.2.13"
},
"devDependencies": {
"uuidv4": "^6.2.13",
"autoprefixer": "^10.4.13",
"concurrently": "^8.0.1",
"postcss": "^8.4.21",
Expand Down

0 comments on commit 356c9a5

Please sign in to comment.