File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -94,14 +94,28 @@ async function main () {
9494 }
9595 console . info ( 'Existing containers with same name have been terminated.' )
9696
97+ // Get shared docker network
98+ console . info ( 'Querying shared docker network...' )
99+ const networks = await dock . listNetworks ( )
100+ if ( ! networks . some ( n => n . Name === 'shared' ) ) {
101+ console . info ( 'No shared docker network found, creating a new one...' )
102+ await dock . createNetwork ( {
103+ Name : 'shared' ,
104+ CheckDuplicate : true
105+ } )
106+ console . info ( 'Created shared docker network successfully.' )
107+ } else {
108+ console . info ( 'Existing shared docker network found.' )
109+ }
110+
97111 // Create DB container
98112 console . info ( `Creating DB docker container... [dt-db-${ branch } ]` )
99113 const dbContainer = await dock . createContainer ( {
100114 Image : 'ghcr.io/ietf-tools/datatracker-db:latest' ,
101115 name : `dt-db-${ branch } ` ,
102116 Hostname : `dt-db-${ branch } ` ,
103117 HostConfig : {
104- NetworkMode : 'bridge ' ,
118+ NetworkMode : 'shared ' ,
105119 RestartPolicy : {
106120 Name : 'unless-stopped'
107121 }
@@ -122,7 +136,7 @@ async function main () {
122136 `VIRTUAL_PORT=8000`
123137 ] ,
124138 HostConfig : {
125- NetworkMode : 'bridge ' ,
139+ NetworkMode : 'shared ' ,
126140 RestartPolicy : {
127141 Name : 'unless-stopped'
128142 }
Original file line number Diff line number Diff line change 11#! /bin/bash
22
3- apt-get update
4- apt-get install iputils-ping -y
5- ping dt-db-main
6-
7- # echo "Fixing permissions..."
8- # chmod -R 777 ./
9- # echo "Ensure all requirements.txt packages are installed..."
10- # pip --disable-pip-version-check --no-cache-dir install -r requirements.txt
11- # echo "Creating data directories..."
12- # chmod +x ./app-create-dirs.sh
13- # ./app-create-dirs.sh
14- # echo "Running Datatracker checks..."
15- # ./ietf/manage.py check
16- # echo "Running Datatracker migrations..."
17- # ./ietf/manage.py migrate
18- # echo "Starting Datatracker..."
19- # ./ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local
3+ echo " Fixing permissions..."
4+ chmod -R 777 ./
5+ echo " Ensure all requirements.txt packages are installed..."
6+ pip --disable-pip-version-check --no-cache-dir install -r requirements.txt
7+ echo " Creating data directories..."
8+ chmod +x ./app-create-dirs.sh
9+ ./app-create-dirs.sh
10+ echo " Running Datatracker checks..."
11+ ./ietf/manage.py check
12+ echo " Running Datatracker migrations..."
13+ ./ietf/manage.py migrate
14+ echo " Starting Datatracker..."
15+ ./ietf/manage.py runserver 0.0.0.0:8000 --settings=settings_local
You can’t perform that action at this time.
0 commit comments