QQ-GitHub-Bot/docker-compose.yml

44 lines
1017 B
YAML
Raw Normal View History

version: "2"
2020-09-17 14:42:41 +00:00
services:
2021-03-14 04:58:50 +00:00
redis:
image: redis:6.2
container_name: bot_redis
command: redis-server --appendonly yes
volumes:
- bot_redis_data:/data
networks:
- bot_net
restart: always
2020-09-17 14:42:41 +00:00
nonebot:
image: cscs181/qq-github-bot:latest # docker hub
# image: ghcr.io/cscs181/qq-github-bot:latest # github image mirror
# build: . # use "build" instead of "image" if you want to build the image yourself
2021-03-14 04:58:50 +00:00
container_name: bot
2021-05-16 03:11:02 +00:00
# volumes:
2021-06-19 16:09:19 +00:00
# - "/etc/timezone:/etc/timezone:ro"
# - "/etc/localtime:/etc/localtime:ro"
2020-09-17 14:42:41 +00:00
ports:
2021-03-09 10:39:46 +00:00
- "$PORT:$PORT"
# you can load config file by "env_file"
env_file:
- "./.env"
2020-09-17 14:42:41 +00:00
environment:
- ENVIRONMENT=prod
2021-03-09 10:39:46 +00:00
- HOST=$HOST
- PORT=$PORT
2021-03-15 12:13:55 +00:00
- REDIS_HOST=bot_redis
- REDIS_PORT=6379
2021-03-14 04:58:50 +00:00
networks:
- bot_net
links:
- redis
depends_on:
- redis
2021-03-25 08:44:11 +00:00
restart: always
mem_limit: 1024M
mem_reservation: 512M
2021-03-14 04:58:50 +00:00
networks:
bot_net: {}
volumes:
bot_redis_data: {}