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 11
11
}
12
12
}
13
13
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
+
14
24
SECRET_KEY = os .environ .get ("SECRET_KEY" )
15
25
16
26
ALLOWED_HOSTS = [".localhost" , "127.0.0.1" , "www.127.0.0.1" ]
17
27
18
28
LOCALE_MIDDLEWARE_EXCLUDED_HOSTS = ["docs.djangoproject.localhost" ]
19
29
20
30
# 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:
21
21
- SQL_PASSWORD=secret
22
22
- SQL_HOST=db
23
23
- 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
+
24
30
depends_on :
25
31
db :
26
32
condition : service_healthy
@@ -35,3 +41,5 @@ services:
35
41
interval : 1s
36
42
timeout : 10s
37
43
retries : 10
44
+ volumes :
45
+ - ./initdb/tracdb.sql:/docker-entrypoint-initdb.d/tracdb.sql
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
2
3
3
python -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
5
5
python -m manage migrate
6
6
make compile-scss # must come before collectstatic
7
7
python -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