#!/bin/bash

MINIO_CI_CD=1

MINIO_ROOT_USER="sites"
MINIO_ROOT_PASSWORD="1f1c7c9b-b833-4462-ae41-d56f52faa49c"

export MINIO_ROOT_USER MINIO_ROOT_PASSWORD MINIO_CI_CD

forever start --killSignal=SIGINT app/workers/host-services.js
forever start --killSignal=SIGINT app/workers/reeeper.js
forever start --killSignal=SIGINT app/workers/logan.js

forever start --killSignal=SIGINT app/workers/newsletter.js
forever start --killSignal=SIGINT app/workers/newsroom.js

forever start --killSignal=SIGINT app/workers/media.js
forever start --killSignal=SIGINT app/workers/chat.js

minio server ./data/minio --address ":9020" --console-address ":9021"

forever stop app/workers/chat.js
forever stop app/workers/media.js

forever stop app/workers/newsroom.js
forever stop app/workers/newsletter.js

forever stop app/workers/logan.js
forever stop app/workers/reeeper.js
forever stop app/workers/host-services.js