-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathdocker-compose.template.yml
More file actions
152 lines (143 loc) · 4.2 KB
/
docker-compose.template.yml
File metadata and controls
152 lines (143 loc) · 4.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
services:
api:
image: ghcr.io/aturret/fastfetchbot-api:latest
# build:
# context: .
# dockerfile: apps/api/Dockerfile
container_name: fastfetchbot-api
# restart: always
volumes:
- ./conf:/app/conf
- shared_files:/tmp
env_file:
- .env
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/1
ports:
- 10450:10450
depends_on:
- telegram-bot-api
- redis
# - mongodb # Uncomment when using MongoDB for scraped content caching
telegram-bot:
image: ghcr.io/aturret/fastfetchbot-telegram-bot:latest
# build:
# context: .
# dockerfile: apps/telegram-bot/Dockerfile
container_name: fastfetchbot-telegram-bot
# restart: always
volumes:
- telegram_bot_data:/app/apps/telegram-bot/data
env_file:
- .env
environment:
- API_SERVER_URL=http://api:10450
- SCRAPE_MODE=queue
- ARQ_REDIS_URL=redis://redis:6379/2
- OUTBOX_REDIS_URL=redis://redis:6379/3
ports:
- 10451:10451
depends_on:
- api
- telegram-bot-api
- redis
# - postgres # Uncomment when using PostgreSQL for user settings
telegram-bot-api:
image: aiogram/telegram-bot-api:latest
container_name: telegrambotapi
restart: always
volumes:
- telegram-bot-api-data-cache:/var/lib/telegram-bot-api
ports:
- 8081:8081
- 8082:8082
environment:
- TELEGRAM_API_ID=
- TELEGRAM_API_HASH=
- TELEGRAM_LOCAL=TRUE
- TELEGRAM_LOG_FILE=tglog.log
- TELEGRAM_STAT=1
- TELEBOT_API_SERVER_PORT=8081
# Uncomment to use PostgreSQL for user settings instead of SQLite.
# Set SETTINGS_DATABASE_URL=postgresql+asyncpg://fastfetchbot:fastfetchbot@postgres:5432/fastfetchbot
# in your .env file, and uncomment the depends_on entry in the telegram-bot service.
# postgres:
# image: postgres:16-alpine
# container_name: fastfetchbot-postgres
# restart: always
# volumes:
# - postgres_data:/var/lib/postgresql/data
# environment:
# - POSTGRES_USER=fastfetchbot
# - POSTGRES_PASSWORD=fastfetchbot
# - POSTGRES_DB=fastfetchbot
# ports:
# - 5432:5432
redis:
image: redis:7-alpine
container_name: fastfetchbot-redis
restart: always
volumes:
- redis_data:/data
ports:
- 6379:6379
# Uncomment to enable MongoDB for scraped content caching.
# Set DATABASE_ON=true in your .env file to activate the cache system.
# Also set MONGODB_URL=mongodb://fastfetchbot:fastfetchbot@mongodb:27017
# or set MONGODB_HOST=mongodb, MONGODB_USERNAME=fastfetchbot, MONGODB_PASSWORD=fastfetchbot.
# mongodb:
# image: mongo:7-jammy
# container_name: fastfetchbot-mongodb
# restart: always
# volumes:
# - mongodb_data:/data/db
# environment:
# - MONGO_INITDB_ROOT_USERNAME=fastfetchbot
# - MONGO_INITDB_ROOT_PASSWORD=fastfetchbot
# ports:
# - 27017:27017
async-worker:
image: ghcr.io/aturret/fastfetchbot-async-worker:latest
# build:
# context: .
# dockerfile: apps/async-worker/Dockerfile
container_name: fastfetchbot-async-worker
restart: always
env_file:
- .env
environment:
- ARQ_REDIS_URL=redis://redis:6379/2
- OUTBOX_REDIS_URL=redis://redis:6379/3
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/1
volumes:
- ./conf:/app/conf
depends_on:
- redis
# - mongodb # Uncomment when using MongoDB for scraped content caching
worker:
image: ghcr.io/aturret/fastfetchbot-worker:latest
# build:
# context: .
# dockerfile: apps/worker/Dockerfile
container_name: fastfetchbot-worker
restart: always
env_file:
- .env
environment:
- CELERY_BROKER_URL=redis://redis:6379/0
- CELERY_RESULT_BACKEND=redis://redis:6379/1
- CONF_DIR=/app/conf
volumes:
- ./conf:/app/conf
- shared_files:/tmp
depends_on:
- redis
volumes:
telegram-bot-api-data-cache:
telegram_bot_data:
# postgres_data: # Uncomment when using PostgreSQL
# mongodb_data: # Uncomment when using MongoDB
redis_data:
shared_files: