Skip to content

Commit

Permalink
Support using with docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
Sixzeroo committed Mar 18, 2023
1 parent fcb8772 commit 787f780
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 1 deletion.
8 changes: 8 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
FROM node:18

ADD . /work
WORKDIR /work

RUN npm ci

CMD ["bash"]
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ npm ci
npm run dev # or: npm run build
```

## Use with docker compose

```bash
docker compose up -d
```

## Contributors

<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
Expand All @@ -43,4 +49,4 @@ npm run dev # or: npm run build
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->

<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
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:
chatgpt_web:
container_name: chatgpt_web
command: npm run deploy
restart: always
ports:
- 5173:5173
build:
context: "."
dockerfile: Dockerfile
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"deploy": "vite --host 0.0.0.0",
"build": "vite build",
"build:github": "vite build --base=/chatgpt-web/",
"preview": "vite preview",
Expand Down

0 comments on commit 787f780

Please sign in to comment.