48
48
# SOLID_QUEUE_IN_PUMA: true
49
49
50
50
# Set number of processes dedicated to Solid Queue (default: 1)
51
- # JOB_CONCURRENCY: 3
51
+ JOB_CONCURRENCY : 3
52
52
53
53
# Set number of cores available to the application on each server (default: 1).
54
- # WEB_CONCURRENCY: 2
54
+ WEB_CONCURRENCY : 2
55
55
56
56
# Match this to any external database server to configure Active Record correctly
57
57
# Use telegram_spam_sniper_bot-db for a db accessory server on same machine via local kamal docker network.
@@ -108,49 +108,19 @@ accessories:
108
108
POSTGRES_USER : rails_user
109
109
POSTGRES_DB : telegram_spam_sniper_bot_production
110
110
secret :
111
+ - RAILS_MASTER_KEY
111
112
- POSTGRES_PASSWORD
112
113
directories :
113
114
- data:/var/lib/postgresql/data
114
115
files :
115
116
- db/production_setup.sql:/docker-entrypoint-initdb.d/setup.sql
116
- migrator :
117
- host : 192.168.1.188
118
- image : samrayleung/telegram_spam_sniper_bot
119
- cmd : bin/rails import:migrate_from_csv
120
- env :
121
- secret :
122
- - RAILS_MASTER_KEY
123
- volumes :
124
- - " /tmp/migration_data/db_migration_data.csv:/rails/db/data/db_migration_data.csv:ro"
125
- # Mount the SAME storage volume as the main app to access the database
126
- - " telegram_spam_sniper_bot_storage:/rails/storage"
127
- cleanup :
128
- host : 192.168.1.188
129
- image : samrayleung/telegram_spam_sniper_bot
130
- cmd : bin/rails cleanup:delete_by_csv_hash RAILS_ENV=production
131
- env :
132
- secret :
133
- - RAILS_MASTER_KEY
134
117
volumes :
135
118
- " /tmp/migration_data:/rails/db/data"
136
- # Mount the SAME storage volume as the main app to access the database
137
- - " telegram_spam_sniper_bot_storage:/rails/storage"
138
- exporter :
139
- host : 192.168.1.188
140
- image : samrayleung/telegram_spam_sniper_bot
141
- cmd : bin/rails export:trained_messages RAILS_ENV=production
142
- env :
143
- secret :
144
- - RAILS_MASTER_KEY
145
- volumes :
146
- - " /tmp/migration_data:/rails/db/data"
147
- # Mount the SAME storage volume as the main app to access the database
148
- - " telegram_spam_sniper_bot_storage:/rails/storage"
149
119
150
- json_importer :
120
+ runner :
151
121
host : 192.168.1.188
152
122
image : samrayleung/telegram_spam_sniper_bot
153
- cmd : bin/rails pg_migration:import_data RAILS_ENV=production
123
+ cmd : sleep infinity # Keeps the container running but idle
154
124
env :
155
125
clear :
156
126
DB_HOST : telegram_spam_sniper_bot-postgres
@@ -161,33 +131,9 @@ accessories:
161
131
- POSTGRES_PASSWORD
162
132
directories :
163
133
- data:/var/lib/postgresql/data
164
- files :
165
- - db/production_setup.sql:/docker-entrypoint-initdb.d/setup.sql
166
134
volumes :
167
135
- " /tmp/migration_data:/rails/db/data"
168
136
169
- json_exporter :
170
- host : 192.168.1.188
171
- image : samrayleung/telegram_spam_sniper_bot
172
- cmd : bin/rails pg_migration:export_data RAILS_ENV=production
173
- env :
174
- secret :
175
- - RAILS_MASTER_KEY
176
- volumes :
177
- - " /tmp/migration_data:/rails/db/data"
178
- # Mount the SAME storage volume as the main app to access the database
179
- - " telegram_spam_sniper_bot_storage:/rails/storage"
180
-
181
- backfiller :
182
- host : 192.168.1.188
183
- image : samrayleung/telegram_spam_sniper_bot
184
- cmd : bin/rails data_migration:backfill_message_hashes
185
- env :
186
- secret :
187
- - RAILS_MASTER_KEY
188
- volumes :
189
- # Mount the SAME storage volume as the main app to access the database
190
- - " telegram_spam_sniper_bot_storage:/rails/storage"
191
137
# db:
192
138
# image: mysql:8.0
193
139
# host: 192.168.0.2
0 commit comments