1
0
mirror of https://github.com/immich-app/immich.git synced 2024-11-24 08:52:28 +02:00

feat(deployment): support docker secrets (#1254)

* Support secrets

* Rewrite to support sh

* Remove JWT_SECRET
This commit is contained in:
James 2023-02-06 00:38:06 -05:00 committed by GitHub
parent 7dbddba757
commit 4261fc8a04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 42 additions and 0 deletions

View File

@ -1,2 +1,23 @@
#! /bin/sh
if [ "$DB_HOSTNAME_FILE" ]; then
export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE)
unset DB_HOSTNAME_FILE
fi
if [ "$DB_DATABASE_NAME_FILE" ]; then
export DB_DATABASE_NAME=$(cat $DB_DATABASE_NAME_FILE)
unset DB_DATABASE_NAME_FILE
fi
if [ "$DB_USERNAME_FILE" ]; then
export DB_USERNAME=$(cat $DB_USERNAME_FILE)
unset DB_USERNAME_FILE
fi
if [ "$DB_PASSWORD_FILE" ]; then
export DB_PASSWORD=$(cat $DB_PASSWORD_FILE)
unset DB_PASSWORD_FILE
fi
exec node dist/apps/microservices/apps/microservices/src/main

View File

@ -1,2 +1,23 @@
#! /bin/sh
if [ "$DB_HOSTNAME_FILE" ]; then
export DB_HOSTNAME=$(cat $DB_HOSTNAME_FILE)
unset DB_HOSTNAME_FILE
fi
if [ "$DB_DATABASE_NAME_FILE" ]; then
export DB_DATABASE_NAME=$(cat $DB_DATABASE_NAME_FILE)
unset DB_DATABASE_NAME_FILE
fi
if [ "$DB_USERNAME_FILE" ]; then
export DB_USERNAME=$(cat $DB_USERNAME_FILE)
unset DB_USERNAME_FILE
fi
if [ "$DB_PASSWORD_FILE" ]; then
export DB_PASSWORD=$(cat $DB_PASSWORD_FILE)
unset DB_PASSWORD_FILE
fi
exec node dist/apps/immich/apps/immich/src/main