diff --git a/.gitea/workflows/docker.yml b/.gitea/workflows/docker.yml index 3c7bf8d..a7648cb 100644 --- a/.gitea/workflows/docker.yml +++ b/.gitea/workflows/docker.yml @@ -7,6 +7,10 @@ on: push: branches: - main + paths: + - 'Dockerfile' + - '.gitea/workflows/**' + - '**.py' jobs: build: diff --git a/.gitignore b/.gitignore index 35373a8..aaab54b 100644 --- a/.gitignore +++ b/.gitignore @@ -162,3 +162,4 @@ cython_debug/ # cache cache/ data/ +docker-compose.yml diff --git a/docker-compose.example.yml b/docker-compose.example.yml new file mode 100644 index 0000000..6f44c1e --- /dev/null +++ b/docker-compose.example.yml @@ -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 diff --git a/src/app.py b/src/app.py index 240df8c..67064fa 100644 --- a/src/app.py +++ b/src/app.py @@ -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()