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

@ -28,6 +28,8 @@ cd `dirname "$0"`
export TAG= export TAG=
export DBCONN= export DBCONN=
export SQLITE= export SQLITE=
export WEB_PORTNO=3002
export FLASK_PORTNO=5002
export EXTERNAL_DOCS_BASEDIR= export EXTERNAL_DOCS_BASEDIR=
export USER_FILES_BASEDIR= export USER_FILES_BASEDIR=
export ASLRB_BASE_URL= export ASLRB_BASE_URL=
@ -39,7 +41,7 @@ if [ $# -eq 0 ]; then
print_help print_help
exit 0 exit 0
fi 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 if [ $? -ne 0 ]; then exit 1; fi
eval set -- "$params" eval set -- "$params"
while true; do while true; do
@ -50,6 +52,12 @@ while true; do
-d | --dbconn ) -d | --dbconn )
DBCONN=$2 DBCONN=$2
shift 2 ;; shift 2 ;;
--web-portno )
WEB_PORTNO=$2
shift 2 ;;
--flask-portno )
FLASK_PORTNO=$2
shift 2 ;;
-e | --extdocs ) -e | --extdocs )
EXTERNAL_DOCS_BASEDIR=$2 EXTERNAL_DOCS_BASEDIR=$2
shift 2 ;; shift 2 ;;

Loading…
Cancel
Save