changes for prod container
This commit is contained in:
1 parent
4097b05cf9
commit
2cbfb03eb6
14 files changed
+128
-53
No files matched your search
+8
-4
@@ -23,17 +23,19 @@ BigInt.prototype.toJSON = function bigIntStringify() {
|
||||
const exec = promisify(execCb)
|
||||
|
||||
async function main() {
|
||||
const VISION_CREDENTIALS = (await import(process.env.GOOGLE_APPLICATION_CREDENTIALS, { with: { type: "json" } })).default
|
||||
|
||||
const log = pino({ base: {} });
|
||||
const VISION_CREDENTIALS = JSON.parse(process.env.VISION_CREDENTIALS)
|
||||
|
||||
const vision = new Vision.ImageAnnotatorClient({ credentials: VISION_CREDENTIALS })
|
||||
const prisma = new PrismaClient()
|
||||
const minio = new Minio.Client({
|
||||
endPoint: process.env.STORAGE_URL,
|
||||
endPoint: process.env.STORAGE_ENDPOINT,
|
||||
accessKey: process.env.STORAGE_ACCESS_KEY,
|
||||
secretKey: process.env.STORAGE_SECRET_KEY,
|
||||
useSSL: false,
|
||||
port: 9000,
|
||||
})
|
||||
|
||||
const meili = new MeiliSearch({
|
||||
host: process.env.MEILI_URL,
|
||||
apiKey: process.env.MEILI_MASTER_KEY,
|
||||
@@ -48,7 +50,7 @@ async function main() {
|
||||
367936467592413194n, // tpm screenshots
|
||||
1028511952277864501n, // tpm sludge
|
||||
725835129326665768n, // machinegirl memes
|
||||
1095060717117374687n, // aella memes
|
||||
// 1095060717117374687n, // aella memes
|
||||
]
|
||||
|
||||
async function migrateDb() {
|
||||
@@ -58,6 +60,8 @@ async function main() {
|
||||
|
||||
await migrateDb()
|
||||
|
||||
log.info('ready')
|
||||
|
||||
await Promise.all(CHANNEL_IDS.map(id => scraper.processChannel(id)))
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user