File tree Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Expand file tree Collapse file tree 4 files changed +23
-2
lines changed Original file line number Diff line number Diff line change 1111 }
1212}
1313
14+ # Trac connection
15+ DATABASES ["trac" ] = {
16+ "ENGINE" : "django.db.backends.postgresql" ,
17+ "NAME" : os .environ .get ("TRAC_DATABASE" , "code.djangoproject" ),
18+ "USER" : os .environ .get ("TRAC_USER" , "code.djangoproject" ),
19+ "PASSWORD" : os .environ .get ("TRAC_PASSWORD" , "" ),
20+ "HOST" : os .environ .get ("TRAC_HOST" , "db" ),
21+ "PORT" : os .environ .get ("TRAC_PORT" , "5432" ),
22+ }
23+
1424SECRET_KEY = os .environ .get ("SECRET_KEY" )
1525
1626ALLOWED_HOSTS = [".localhost" , "127.0.0.1" , "www.127.0.0.1" ]
1727
1828LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = ["docs.djangoproject.localhost" ]
1929
2030# django-hosts settings
21- PARENT_HOST = "localhost:8000"
31+ PARENT_HOST = "djangoproject. localhost:8000"
Original file line number Diff line number Diff line change @@ -21,6 +21,12 @@ services:
2121 - SQL_PASSWORD=secret
2222 - SQL_HOST=db
2323 - SQL_PORT=5432
24+ - TRAC_DATABASE=code.djangoproject
25+ - TRAC_USER=code.djangoproject
26+ - TRAC_PASSWORD=secret
27+ - TRAC_HOST=db
28+ - TRAC_PORT=5432
29+
2430 depends_on :
2531 db :
2632 condition : service_healthy
@@ -35,3 +41,5 @@ services:
3541 interval : 1s
3642 timeout : 10s
3743 retries : 10
44+ volumes :
45+ - ./initdb/tracdb.sql:/docker-entrypoint-initdb.d/tracdb.sql
Original file line number Diff line number Diff line change 11#! /bin/sh
22
33python -m manage flush --no-input
4- # PGPASSWORD=djangoproject psql --host db --port 5432 --username=code.djangoproject --dbname=code.djangoproject < tracdb/trac.sql
4+ PGPASSWORD=secret psql --host db --port 5432 --username=code.djangoproject --dbname=code.djangoproject < tracdb/trac.sql
55python -m manage migrate
66make compile-scss # must come before collectstatic
77python -m manage collectstatic --no-input --clear
Original file line number Diff line number Diff line change 1+ -- Legacy Trac DB
2+ CREATE USER " code.djangoproject" WITH PASSWORD ' secret' CREATEDB;
3+ CREATE DATABASE " code.djangoproject" OWNER " code.djangoproject" ;
You can’t perform that action at this time.
0 commit comments