File tree Expand file tree Collapse file tree 3 files changed +39
-3
lines changed
Expand file tree Collapse file tree 3 files changed +39
-3
lines changed Original file line number Diff line number Diff line change 5555* .pyc
5656__pycache__
5757node_modules
58- ietf /static /ietf /bootstrap
58+ ietf /static /ietf /bootstrap
59+ /docker /docker-compose.extend-custom.yml
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ version: '3.8'
33services :
44 app :
55 ports :
6- - ' 8000 :8000'
6+ - ' CUSTOM_PORT :8000'
77 volumes :
88 - .:/workspace
99 - /workspace/node_modules
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3+ # Usage info
4+ show_help () {
5+ cat << EOF
6+ Usage: ${0##*/ } [-h] [-p PORT]
7+ Run datatracker in dev containers using docker-compose.
8+
9+ -h display this help and exit
10+ -p PORT use custom HTTP port for datatracker
11+
12+ EOF
13+ }
14+
15+ CUSTOM_PORT=8000
16+
17+ while getopts hp: opt; do
18+ case $opt in
19+ h)
20+ show_help
21+ exit 0
22+ ;;
23+ p)
24+ CUSTOM_PORT=$OPTARG
25+ echo " Using custom port $CUSTOM_PORT ..."
26+ ;;
27+ * )
28+ CUSTOM_PORT=8000
29+ echo " Using port 8000..."
30+ ;;
31+ esac
32+ done
33+
34+ cp docker-compose.extend.yml docker-compose.extend-custom.yml
35+ sed -i -r -e " s/CUSTOM_PORT/$CUSTOM_PORT /" docker-compose.extend-custom.yml
336cd ..
4- docker-compose -f docker-compose.yml -f docker/docker-compose.extend.yml up -d
37+ docker-compose -f docker-compose.yml -f docker/docker-compose.extend-custom.yml up -d
38+ docker-compose port db 3306
539docker-compose exec app /bin/sh /docker-init.sh
640docker-compose stop
741cd docker
42+ rm -f docker-compose.extend-custom.yml
You can’t perform that action at this time.
0 commit comments