diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..8c79dae --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM node:18.16.0-alpine + +RUN mkdir -p /usr/src/app + +WORKDIR /usr/src/app + +COPY package.json /usr/src/app/ + +# RUN npm i --registry=https://registry.npm.taobao.org + +COPY . /usr/src/app + +EXPOSE 3000 + +CMD npm start diff --git a/README.md b/README.md index f9438ac..992820e 100644 --- a/README.md +++ b/README.md @@ -42,3 +42,17 @@ By using this repository or any code related to it, you agree to these terms. Th Just API's from some language model sites. + + +## Run local + +```shell +yarn +yarn start +``` + +## Deploy with docker-compose + +``` +docker-compose up --build -d +``` diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 0000000..3293f17 --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,16 @@ +version: "3.9" + +services: + gpt4free-ts: + build: + context: . + dockerfile: Dockerfile + container_name: gpt4free-ts + image: gpt4free-ts:latest + ports: + - "3000:3000" + restart: always + environment: + # - TZ=Asia/Shanghai + - http_proxy=http://192.168.0.155:10811 + - https_proxy=http://192.168.0.155:10811