feat: 增加 docker-compose.yaml

This commit is contained in:
Clansty 2022-03-27 20:42:59 +08:00
parent dadd1302c1
commit 5a3f7c544f
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
1 changed files with 31 additions and 0 deletions

31
docker-compose.yaml Normal file
View File

@ -0,0 +1,31 @@
version: "3.8"
services:
# 如果有现成的 Postgresql 实例,可以删除这一小节
postgres:
image: postgres
container_name: postgresql_q2tg
restart: unless-stopped
environment:
POSTGRES_DB: db_name
POSTGRES_USER: user
POSTGRES_PASSWORD: password
volumes:
- ./postgresql:/var/lib/postgresql/data
q2tg:
image: ghcr.io/clansty/q2tg:raincandy
container_name: main_q2tg
restart: unless-stopped
depends_on:
- postgres
volumes:
- ./data:/app/data
environment:
- TG_API_ID=
- TG_API_HASH=
- TG_BOT_TOKEN=
- DATABASE_URL=postgres://user:password@postgres/db_name
- CRV_API=
- CRV_KEY=
# 如果需要通过代理联网,那么设置下面两个变量
#- PROXY_IP=
#- PROXY_PORT=