Comments (5)
Thank you!
Comfirmed, works for me with the OP settings.
from phpredisadmin.
I have never worked with Docker secrets before but it seems like they are only available though files.
A pull request to support REDIS_1_AUTH_FILE
is welcome.
You would need to check here if getenv($prefix . 'AUTH_FILE')
exists, and if it does set something like $server_auth = file_get_contents(getenv($prefix . 'AUTH_FILE'));
.
I don't have any setup with Docker secrets to test this so I hope you can make a pull and test this?
from phpredisadmin.
One little prob, I donβt know, what I should do. π
But found this little snippet, maybe you could get something from itβ¦
If you want to load a secrets file into an environment variable, the Official MySQL Docker Image has a solution for you.
See
docker_setup_env()
andfile_env()
functions in docker-entrypoint.she.g. -
$ docker run --name some-mysql -e MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql-root -d mysql:tag
Results in loading the contents of
/run/secrets/mysql-root
intoMYSQL_ROOT_PASSWORD
from phpredisadmin.
# 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
echo >&2 "error: both ${var} and ${fileVar} are set (but are mutually exclusive)"
exit 1
fi
local val="$def"
if [ "${!var:-}" ]; then
val="${!var}"
elif [ "${!fileVar:-}" ]; then
val="$(< "${!fileVar}")"
fi
export "$var"="$val"
unset "$fileVar"
}
from phpredisadmin.
I just released a new v1.17.3 version which should have support for this. Can you please check if it works for you?
from phpredisadmin.
Related Issues (20)
- BAD CSRF TOKEN HOT 7
- bug-web HOT 7
- Arm64 docker image HOT 3
- Why no tags for new versions? HOT 2
- reJSON HOT 2
- .htaccess HOT 1
- Uncaught Predis\Connection\ConnectionException: Error while reading line from the server. HOT 6
- Doesn't work in Cluster Mode HOT 3
- Please support semantic versioning HOT 1
- Unable to delete keys with comma(s) HOT 7
- phpRedisAdmin does not support arm64v8 architectures HOT 4
- Feature Request - Support TLS HOT 5
- Deprecated: Using ${var} in strings is deprecated
- php 8.2 quirks HOT 1
- Can not connect redis localhost via docker bridge0 HOT 1
- Show number of keys without explicitly displaying them
- sites:get_sites HOT 1
- Uncaught SyntaxError: Unexpected token ':' HOT 1
- Issue: Uncaught Predis\Response\ServerException: WRONGTYPE Operation against a key holding the wrong kind of value
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 phpredisadmin.