mirror of
https://github.com/PaiGramTeam/FixMiYouShe.git
synced 2024-11-21 15:08:19 +00:00
ci: add docker-compose example yml
This commit is contained in:
parent
3de12c1de7
commit
d3246af110
@ -7,6 +7,10 @@ on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'Dockerfile'
|
||||
- '.gitea/workflows/**'
|
||||
- '**.py'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -162,3 +162,4 @@ cython_debug/
|
||||
# cache
|
||||
cache/
|
||||
data/
|
||||
docker-compose.yml
|
||||
|
24
docker-compose.example.yml
Normal file
24
docker-compose.example.yml
Normal file
@ -0,0 +1,24 @@
|
||||
version: '3'
|
||||
services:
|
||||
fixmiyoushe:
|
||||
image: paigramteam/fixmiyoushe:latest
|
||||
container_name: fixmiyoushe
|
||||
restart: always
|
||||
ports:
|
||||
- 127.0.0.1:${PORT}:${PORT}
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- DEBUG=${DEBUG}
|
||||
- DOMAIN=${DOMAIN}
|
||||
- PORT=${PORT}
|
||||
- MIYOUSHE=${MIYOUSHE}
|
||||
- HOYOLAB=${HOYOLAB}
|
||||
- BOT=${BOT}
|
||||
- BOT_API_ID=${BOT_API_ID}
|
||||
- BOT_API_HASH=${BOT_API_HASH}
|
||||
- BOT_TOKEN=${BOT_TOKEN}
|
||||
- MIYOUSHE_HOST=${MIYOUSHE_HOST}
|
||||
- HOYOLAB_HOST=${HOYOLAB_HOST}
|
||||
- USER_AGENT=${USER_AGENT}
|
||||
volumes:
|
||||
- ./data:/usr/app/data
|
@ -35,7 +35,7 @@ class Web:
|
||||
async def start(self):
|
||||
self.init_web()
|
||||
self.web_server = uvicorn.Server(
|
||||
config=uvicorn.Config(app, host="127.0.0.1", port=PORT)
|
||||
config=uvicorn.Config(app, host="0.0.0.0", port=PORT)
|
||||
)
|
||||
server_config = self.web_server.config
|
||||
server_config.setup_event_loop()
|
||||
|
Loading…
Reference in New Issue
Block a user