Files
shadowsocks-libev/docker/alpine/entrypoint.sh
T
John 2a249b0bac added support for Docker secrets and password file in the Docker image
this means we no longer have to hardcode the password in the docker-compose file, and can treat the file as configuration rather than a secret.
2020-09-19 16:10:26 -02:30

20 lines
386 B
Bash
Executable File

#!/bin/sh
if [[ -f "$PASSWORD_FILE" ]]; then
PASSWORD=$(cat "$PASSWORD_FILE")
fi
if [[ -f "/var/run/secrets/$PASSWORD_SECRET" ]]; then
PASSWORD=$(cat "/var/run/secrets/$PASSWORD_SECRET")
fi
exec ss-server \
-s $SERVER_ADDR \
-p $SERVER_PORT \
-k ${PASSWORD:-$(hostname)} \
-m $METHOD \
-t $TIMEOUT \
-d $DNS_ADDRS \
-u \
$ARGS