Skip to content

Commit 37fab31

Browse files
change workflow
1 parent f745287 commit 37fab31

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

.github/workflows/build.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: RMMT-API Image Build
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths:
7+
- './**'
8+
pull_request:
9+
branches: ["main"]
10+
paths:
11+
- './**'
12+
workflow_dispatch:
13+
14+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
15+
permissions:
16+
contents: read
17+
pages: write
18+
id-token: write
19+
20+
jobs:
21+
build:
22+
name: Build image and Deploy
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- uses: docker/login-action@v3
28+
with:
29+
username: ${{ vars.DOCKER_USERNAME }}
30+
password: ${{ secrets.DOCKER_PAT_TOKEN }}
31+
32+
- name: Build and push api
33+
working-directory: .
34+
run: |
35+
docker build . --file Dockerfile --tag ${{ vars.DOCKER_USERNAME }}/rmmt-api:latest
36+
docker push ${{ vars.DOCKER_USERNAME }}/rmmt-api:latest

gunicorn.config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
workers = 4
77
# 设置工作模式为协程
88
worker_class = "gevent"
9-
bind = "0.0.0.0:5001"
9+
bind = "0.0.0.0:5000"

0 commit comments

Comments
 (0)