-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdeploy.sh
executable file
·22 lines (18 loc) · 1.24 KB
/
deploy.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
project="fnic-2024"
region="europe-west1"
matrix_room="!ckizGZoefGVpbVxjZN:matrix.org"
flag_dv="TRUE"
flag_pm="TRUE"
flag_reports="TRUE"
notify_new="FALSE"
get_modlog="TRUE"
modlog_pm="TRUE"
gc_deploy() {
gcloud run jobs deploy modreportbot-$1 --project=$project --region=$region --source . --set-env-vars=LEMMY_USER="fnicmodbot",LEMMY_INSTANCE="$2",MATRIX_USER="@fnic_reports:matrix.org",MATRIX_SERVER="matrix.org",MATRIX_ROOM="$matrix_room",FLAG_DOWNVOTES="$flag_dv",GET_MESSAGES="$flag_pm",GET_REPORTS="$flag_reports",NOTIFY_NEW="$notify_new",GET_MODLOG="$get_modlog",MODLOG_PM="$modlog_pm" --set-secrets="LEMMY_PW=fnicmodbot-$1:latest","MATRIX_PW=fnicreports:latest" &
}
gc_deploy "dbzer0" "lemmy.dbzer0.com"
gc_deploy "lemmy-world" "lemmy.world"
gc_deploy "test" "voyager.lemmy.ml"
gcloud run jobs deploy modreportbot-directorybot --project=$project --region=$region --source . --set-env-vars=LEMMY_USER="directorybot",LEMMY_INSTANCE="lemmy.dbzer0.com",MATRIX_USER="@fnic_reports:matrix.org",MATRIX_SERVER="matrix.org",MATRIX_ROOM="$matrix_room",FLAG_DOWNVOTES="FALSE",GET_MESSAGES="TRUE",GET_REPORTS="FALSE",NOTIFY_NEW="TRUE",GET_MODLOG="FALSE",MODLOG_PM="FALSE" --set-secrets="LEMMY_PW=directorybot:latest","MATRIX_PW=fnicreports:latest" &
wait