diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..b91f177e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,8 @@ +FROM node:18 + +ADD . /work +WORKDIR /work + +RUN npm ci + +CMD ["bash"] diff --git a/README.md b/README.md index 47c90779..6e869721 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,12 @@ npm ci npm run dev # or: npm run build ``` +## Use with docker compose + +```bash +docker compose up -d +``` + ## Contributors @@ -43,4 +49,4 @@ npm run dev # or: npm run build - \ No newline at end of file + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..441060de --- /dev/null +++ b/docker-compose.yml @@ -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 diff --git a/package.json b/package.json index 850ddbe3..6b0f74cf 100644 --- a/package.json +++ b/package.json @@ -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",