@@ -20,7 +20,6 @@ Using Docker
20
20
------------
21
21
22
22
* Install Docker
23
- * ``pip install docker-compose ``
24
23
* Create a ``secrets.json `` file at the root of the repository (next to `Dockerfile `), containing
25
24
something like::
26
25
@@ -30,22 +29,22 @@ Using Docker
30
29
"db_password": "secret"
31
30
}
32
31
33
- * ``docker- compose up --build ``
32
+ * ``docker compose up --build ``
34
33
* Follow instructions above to create/load the DB, grant permissions, create the
35
34
config, etc. For example::
36
35
37
- docker- compose up --build
36
+ docker compose up --build
38
37
export DATABASE_URL=postgres://code.djangoproject:secret@db/code.djangoproject
39
- docker- compose exec -T db psql $DATABASE_URL < ../djangoproject.com/tracdb/trac.sql
40
- docker- compose exec trac trac-admin /code/trac-env/ permission add anonymous TRAC_ADMIN
38
+ docker compose exec -T db psql $DATABASE_URL < ../djangoproject.com/tracdb/trac.sql
39
+ docker compose exec trac trac-admin /code/trac-env/ permission add anonymous TRAC_ADMIN
41
40
42
41
Using Podman
43
42
------------
44
43
45
44
It may be possible to use Podman for local development to more closely simulate
46
45
production. The above Docker instructions should work for Podman as well,
47
46
however, be aware that ``podman-compose `` is not as well battle-tested as
48
- ``docker- compose `` (e.g., it may require pruning or forcefully stopping a
47
+ ``docker compose `` (e.g., it may require pruning or forcefully stopping a
49
48
container before it will rebuild properly).
50
49
51
50
How to port the CSS from djangoproject.com
@@ -69,16 +68,16 @@ How to recreate `trac.sql` after upgrading Trac
69
68
70
69
Start with a clean slate::
71
70
72
- docker- compose down
71
+ docker compose down
73
72
sh -c 'cd ../djangoproject.com && git checkout tracdb/trac.sql'
74
73
75
- Bring up database and Trac via docker- compose::
74
+ Bring up database and Trac via docker compose::
76
75
77
- docker- compose up --build -d
76
+ docker compose up --build -d
78
77
export DATABASE_URL=postgres://code.djangoproject:secret@db/code.djangoproject
79
- docker- compose exec -T db psql $DATABASE_URL < ../djangoproject.com/tracdb/trac.sql
80
- docker- compose exec trac /venv/bin/trac-admin /code/trac-env/ upgrade
81
- docker- compose exec db pg_dump --column-inserts -d $DATABASE_URL > ../djangoproject.com/tracdb/trac.sql
78
+ docker compose exec -T db psql $DATABASE_URL < ../djangoproject.com/tracdb/trac.sql
79
+ docker compose exec trac /venv/bin/trac-admin /code/trac-env/ upgrade
80
+ docker compose exec db pg_dump --column-inserts -d $DATABASE_URL > ../djangoproject.com/tracdb/trac.sql
82
81
83
82
84
83
Note:
0 commit comments