Made the container port numbers configurable.

master
Pacman Ghost 4 years ago
parent 83d25e1b1a
commit 2488aad352
  1. 4
      docker-compose.yml
  2. 10
      run-containers.sh

@ -7,7 +7,7 @@ services:
image: asl-articles-web:$TAG
build: web
ports:
- "3002:80"
- "$WEB_PORTNO:80"
flask:
image: asl-articles-flask:$TAG
build:
@ -15,7 +15,7 @@ services:
args:
ENABLE_TESTS: $ENABLE_TESTS
ports:
- "5002:5000"
- "$FLASK_PORTNO:5000"
volumes:
- $SQLITE:/data/sqlite.db
- $EXTERNAL_DOCS_BASEDIR:/data/docs/

@ -28,6 +28,8 @@ cd `dirname "$0"`
export TAG=
export DBCONN=
export SQLITE=
export WEB_PORTNO=3002
export FLASK_PORTNO=5002
export EXTERNAL_DOCS_BASEDIR=
export USER_FILES_BASEDIR=
export ASLRB_BASE_URL=
@ -39,7 +41,7 @@ if [ $# -eq 0 ]; then
print_help
exit 0
fi
params="$(getopt -o t:d:e:u:r:a:h -l tag:,dbconn:,extdocs:,user-files:,aslrb:,author-aliases:,help --name "$0" -- "$@")"
params="$(getopt -o t:d:e:u:r:a:h -l tag:,dbconn:,web-portno:,flask-portno:,extdocs:,user-files:,aslrb:,author-aliases:,help --name "$0" -- "$@")"
if [ $? -ne 0 ]; then exit 1; fi
eval set -- "$params"
while true; do
@ -50,6 +52,12 @@ while true; do
-d | --dbconn )
DBCONN=$2
shift 2 ;;
--web-portno )
WEB_PORTNO=$2
shift 2 ;;
--flask-portno )
FLASK_PORTNO=$2
shift 2 ;;
-e | --extdocs )
EXTERNAL_DOCS_BASEDIR=$2
shift 2 ;;

Loading…
Cancel
Save