From 775ba2596abaaee8ea9eb3c5c0d16d8a7967cde5 Mon Sep 17 00:00:00 2001 From: qingfengfenga Date: Tue, 16 May 2023 14:34:35 +0800 Subject: [PATCH] Add docker-compose launch --- .env.template | 4 ++++ .gitignore | 5 ++++- docker-compose.yml | 22 ++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 .env.template create mode 100644 docker-compose.yml diff --git a/.env.template b/.env.template new file mode 100644 index 00000000..2cc13029 --- /dev/null +++ b/.env.template @@ -0,0 +1,4 @@ +OPENAI_API_KEY=sk-xxxx +CODE=your-password + +PROXY_URL=http://localhost:7890 \ No newline at end of file diff --git a/.gitignore b/.gitignore index 37f6b902..3c55f8c7 100644 --- a/.gitignore +++ b/.gitignore @@ -39,4 +39,7 @@ dev public/prompts.json .vscode -.idea \ No newline at end of file +.idea + +# docker-compose env files +.env \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..c250d0d9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,22 @@ +version: '3.9' +services: + chatgpt-next-web: + profiles: ["no-proxy"] + container_name: chatgpt-next-web + image: yidadaa/chatgpt-next-web + ports: + - 3000:3000 + environment: + - OPENAI_API_KEY=$OPENAI_API_KEY + - CODE=$CODE + + chatgpt-next-web-proxy: + profiles: ["proxy"] + container_name: chatgpt-next-web-proxy + image: yidadaa/chatgpt-next-web + ports: + - 3000:3000 + environment: + - OPENAI_API_KEY=$OPENAI_API_KEY + - CODE=$CODE + - PROXY_URL=$PROXY_URL