Skip to content

Commit

Permalink
Made host configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
nchamo committed Jun 19, 2019
1 parent a6ea8f2 commit c690ed3
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 10 deletions.
1 change: 0 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
WO_HOST=localhost
WO_PORT=9000
WO_DIR=Piwigo
WO_DIR_GALLERIES=Galleries
WO_DIR_LOCAL=Local
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ services:
- mysql
labels:
- traefik.backend=piwigo
- traefik.frontend.rule=Host:imagenes.localhost
- traefik.frontend.rule=Host:imagenes.${WO_HOST}
- traefik.docker.network=web
- traefik.port=9000
- traefik.enable=true
Expand Down
8 changes: 0 additions & 8 deletions piwigo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ __dirname=$(cd $(dirname "$0"); pwd -P)
cd "${__dirname}"
# Load default values
source .env
DEFAULT_PORT="$WO_PORT"
DEFAULT_HOST="$WO_HOST"
DEFAULT_DIR="$WO_DIR"

Expand All @@ -15,11 +14,6 @@ do
key="$1"

case $key in
--port)
export WO_PORT="$2"
shift # past argument
shift # past value
;;
--hostname)
export WO_HOST="$2"
shift # past argument
Expand Down Expand Up @@ -57,7 +51,6 @@ usage(){
echo " rebuild Rebuild all docker containers and perform cleanups"
echo ""
echo "Options:"
echo " --port <port> Set the port that WebODM should bind to (default: $DEFAULT_PORT)"
echo " --hostname <hostname> Set the hostname that Piwigo will be accessible from (default: $DEFAULT_HOST)"
echo " ---dir <path> Path where data will be persisted (default: $DEFAULT_DIR (docker named volume))"
exit
Expand All @@ -73,7 +66,6 @@ start(){
echo "Using the following environment:"
echo "================================"
echo "Host: $WO_HOST"
echo "Port: $WO_PORT"
echo "Directory: $WO_DIR"
echo "================================"
echo "Make sure to issue a $0 down if you decide to change the environment."
Expand Down

0 comments on commit c690ed3

Please sign in to comment.