Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eedaf1c71f | ||
|
|
70e4a84db3 | ||
|
|
443b92dfd3 |
@@ -20,7 +20,4 @@ COPY database_setup database_setup/
|
||||
|
||||
RUN pip install -r requirements.txt
|
||||
|
||||
# Expose to outside of container
|
||||
EXPOSE 5000
|
||||
|
||||
CMD ["python3", "-u", "./main.py"]
|
||||
@@ -33,9 +33,8 @@ class ClanMessages(commands.Cog, name="Clan Messages"):
|
||||
"""
|
||||
Triggers when the bot is in ready state. Adds the webhook listener to FastAPI and serves.
|
||||
"""
|
||||
await self.update_messages()
|
||||
app.add_api_route("/messages/", self.update_messages, methods=["POST"])
|
||||
config = uvicorn.Config(app=app, port=5000, log_level="info")
|
||||
config = uvicorn.Config(app=app, host="0.0.0.0", port=5000, log_level="info")
|
||||
server = uvicorn.Server(config)
|
||||
await server.serve()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user