Browse Source

Add docker-compose launch

qingfengfenga 1 year ago
parent
commit
775ba2596a
3 changed files with 30 additions and 1 deletions
  1. 4 0
      .env.template
  2. 4 1
      .gitignore
  3. 22 0
      docker-compose.yml

+ 4 - 0
.env.template

@@ -0,0 +1,4 @@
+OPENAI_API_KEY=sk-xxxx
+CODE=your-password
+
+PROXY_URL=http://localhost:7890

+ 4 - 1
.gitignore

@@ -39,4 +39,7 @@ dev
 public/prompts.json
 
 .vscode
-.idea
+.idea
+
+# docker-compose env files
+.env

+ 22 - 0
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