standardnotes-server/packages/auth/docker/entrypoint.sh

57 lines
980 B
Bash
Raw Normal View History

2022-06-22 10:33:00 +00:00
#!/bin/sh
set -e
COMMAND=$1 && shift 1
case "$COMMAND" in
'start-web' )
exec node docker/entrypoint-server.js
2022-06-22 10:33:00 +00:00
;;
'start-worker' )
exec node docker/entrypoint-worker.js
2022-06-22 10:33:00 +00:00
;;
'cleanup' )
exec node docker/entrypoint-cleanup.js
;;
2022-12-20 07:11:10 +00:00
'stats' )
exec node docker/entrypoint-stats.js
;;
2022-06-22 10:33:00 +00:00
'email-daily-backup' )
exec node docker/entrypoint-backup.js daily
2022-06-22 10:33:00 +00:00
;;
'email-weekly-backup' )
exec node docker/entrypoint-backup.js weekly
2022-06-22 10:33:00 +00:00
;;
'email-backup' )
EMAIL=$1 && shift 1
exec node docker/entrypoint-user-email-backup.js $EMAIL
;;
'fix-quota' )
EMAIL=$1 && shift 1
exec node docker/entrypoint-fix-quota.js $EMAIL
;;
'fix-roles' )
exec node docker/entrypoint-fix-roles.js
;;
'delete-accounts' )
FILE_NAME=$1 && shift 1
MODE=$1 && shift 1
exec node docker/entrypoint-delete-accounts.js $FILE_NAME $MODE
;;
2022-06-22 10:33:00 +00:00
* )
echo "[Docker] Unknown command"
2022-06-22 10:33:00 +00:00
;;
esac
exec "$@"