XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet
公开
关注 0 Fork 0 Star 1
返回提交历史

XFEstudio/gpt4free

Change docker-compose.yml to run api and gui services simultaneously

3b5ea904
Niapoll <Kolya21082001@gmail.com>
提交于

代码差异

2 个文件 +13 -8
Modified Dockerfile +3 -3
@@ -26,8 +26,8 @@ RUN pip install --upgrade pip && pip install -r requirements.txt
26 26 # This may include all code, assets, and configuration files required to run the application.
27 27 COPY . /app/
28 28
29 # Expose port 1337
30 EXPOSE 1337
29 # Expose port 80 and 1337
30 EXPOSE 80 1337
31 31
32 32 # Define the default command to run the app using Python's module mode.
33 CMD ["python", "-m", "g4f.api.run"]
33 ENTRYPOINT ["python", "-m", "g4f.cli"]
Modified docker-compose.yml +10 -5
@@ -1,13 +1,18 @@
1 1 version: '3'
2 2
3 3 services:
4 gpt4free:
4 gpt4free-api: &gpt4free
5 image: gpt4free:latest
5 6 build:
6 7 context: .
7 8 dockerfile: Dockerfile
8 volumes:
9 - .:/app
9 cache_from:
10 - gpt4free:latest
10 11 ports:
11 12 - '1337:1337'
12 environment:
13 - PYTHONUNBUFFERED=1
13 command: api
14 gpt4free-gui:
15 <<: *gpt4free
16 ports:
17 - '8080:80'
18 command: gui