Comments (8)
They've set it up in a very generic way in all of their base images. You can see an example of their bash script here and here is an example of the usage.
from immich.
Oh and MariaDB's official image also does the same thing (though they use a suffix instead of prefix)
from immich.
Thank you for the suggestion, I will take a look at this.
from immich.
LSIO does this for all their containers and its great
from immich.
@kaysond Can you help me find one that I can refer to?
from immich.
They've set it up in a very generic way in all of their base images. You can see an example of their bash script here and here is an example of the usage.
LSIO's method requires s6-overlay. The code is here.
Oh and MariaDB's official image also does the same thing (though they use a suffix instead of prefix)
This method is less dynamic, but done purely with bash script. Unfortunately the variable expansion method used is not supported by sh and the immich containers don't have bash currently.
# usage: file_env VAR [DEFAULT]
# ie: file_env 'XYZ_DB_PASSWORD' 'example'
# (will allow for "$XYZ_DB_PASSWORD_FILE" to fill in the value of
# "$XYZ_DB_PASSWORD" from a file, especially for Docker's secrets feature)
file_env() {
local var="$1"
local fileVar="${var}_FILE"
local def="${2:-}"
if [ "${!var:-}" ] && [ "${!fileVar:-}" ]; then
mysql_error "Both $var and $fileVar are set (but are exclusive)"
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
from immich.
Also, definitely not an expert, but I think we can't use the MariaDB method verbatim anyway since they are under GPL2 license and this project is under MIT.
Edit: And the LSIO is under GPL3 too.
from immich.
Actually I just found the identical code over in the postgres docker which is MIT license. So I believe it is fair to copy.
from immich.
Related Issues (20)
- Android App not correctly showing upload status HOT 1
- cannot see if content is uploaded due to background of image
- iOS asset upload state stays "not uploaded" HOT 1
- Media upload stopped working after library delete
- iOS app logs me out sometimes when Immich is down HOT 1
- Exif date/time isn't parsed correctly HOT 3
- Symlinked photos in external library download as a zip of symlinks
- Panasonic S5 IIx RW2 Raws show as pink noise HOT 1
- Not refreshing when merging faces together
- iOS App - Search Tab stutter with 120hz iPhones
- Going back to search results from a fullscreen-displayed photo - always returns to the start of the search results list HOT 1
- WARN [StorageRepository] File upload/thumbs/.../ does not exist
- Issue on video playback: WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses HOT 1
- (browser) can't see upload progress because of info notifications HOT 1
- Web admin settings page number input broken HOT 2
- Android app more assets been uploaded than Total assets. HOT 1
- "Select album cover" jumps to top of page after setting album cover
- Video unmutes when scrubbing HOT 2
- addAssetsToAlbum endpoint does not handle repeated IDs HOT 1
- Change name popup focus not on the text field
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from immich.