Skip to content
This repository was archived by the owner on Apr 24, 2024. It is now read-only.

Commit d2cf655

Browse files
committed
feat: docker deploy
1 parent d4fe600 commit d2cf655

File tree

3 files changed

+35
-1
lines changed

3 files changed

+35
-1
lines changed

Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM node:18
2+
RUN apt-get update && \
3+
apt-get install -yq gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 \
4+
libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 \
5+
libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 \
6+
libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 \
7+
ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils wget \
8+
xvfb x11vnc x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps
9+
WORKDIR /src
10+
COPY package.json /src
11+
RUN npm install
12+
COPY . /src
13+
EXPOSE 8081
14+
CMD xvfb-run --server-args="-screen 0 1024x768x24" npm start

docker-compose.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
version: '3.3'
2+
3+
services:
4+
chatgpt:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
ports:
9+
- "5000:5000"
10+
image: chatgpt:001
11+
environment:
12+
- NODE_ENV=Production
13+
stdin_open: true
14+
tty: true
15+
restart: always

package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
"type": "module",
77
"scripts": {
88
"start": "node .",
9-
"dev": "nodemon ."
9+
"dev": "nodemon .",
10+
"git": "git fetch && git pull",
11+
"docker:build": "docker build . -t chatgpt:001",
12+
"docker:reload": "docker-compose stop && docker-compose up -d chatgpt",
13+
"docker:start": "docker-compose up -d chatgpt",
14+
"docker:logs": "docker-compose logs -f --tail=0"
1015
},
1116
"keywords": [],
1217
"author": "MrlolDev",

0 commit comments

Comments
 (0)