Skip to content

Commit

Permalink
Changing the command name docker-compose to docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
nakul-py committed Dec 5, 2024
1 parent 45b7589 commit fe366a3
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Using Docker
------------

* Install Docker
* ``pip install docker-compose``
* ``pip install docker compose``
* Create a ``secrets.json`` file at the root of the repository (next to `Dockerfile`), containing
something like::

Expand All @@ -30,22 +30,22 @@ Using Docker
"db_password": "secret"
}

* ``docker-compose up --build``
* ``docker compose up --build``
* Follow instructions above to create/load the DB, grant permissions, create the
config, etc. For example::

docker-compose up --build
docker compose up --build
export DATABASE_URL=postgres://code.djangoproject:secret@db/code.djangoproject
docker-compose exec -T db psql $DATABASE_URL < ../djangoproject.com/tracdb/trac.sql
docker-compose exec trac trac-admin /code/trac-env/ permission add anonymous TRAC_ADMIN
docker compose exec -T db psql $DATABASE_URL < ../djangoproject.com/tracdb/trac.sql
docker compose exec trac trac-admin /code/trac-env/ permission add anonymous TRAC_ADMIN

Using Podman
------------

It may be possible to use Podman for local development to more closely simulate
production. The above Docker instructions should work for Podman as well,
however, be aware that ``podman-compose`` is not as well battle-tested as
``docker-compose`` (e.g., it may require pruning or forcefully stopping a
``docker compose`` (e.g., it may require pruning or forcefully stopping a
container before it will rebuild properly).

How to port the CSS from djangoproject.com
Expand All @@ -69,16 +69,16 @@ How to recreate `trac.sql` after upgrading Trac

Start with a clean slate::

docker-compose down
docker compose down
sh -c 'cd ../djangoproject.com && git checkout tracdb/trac.sql'

Bring up database and Trac via docker-compose::
Bring up database and Trac via docker compose::

docker-compose up --build -d
docker compose up --build -d
export DATABASE_URL=postgres://code.djangoproject:secret@db/code.djangoproject
docker-compose exec -T db psql $DATABASE_URL < ../djangoproject.com/tracdb/trac.sql
docker-compose exec trac /venv/bin/trac-admin /code/trac-env/ upgrade
docker-compose exec db pg_dump --column-inserts -d $DATABASE_URL > ../djangoproject.com/tracdb/trac.sql
docker compose exec -T db psql $DATABASE_URL < ../djangoproject.com/tracdb/trac.sql
docker compose exec trac /venv/bin/trac-admin /code/trac-env/ upgrade
docker compose exec db pg_dump --column-inserts -d $DATABASE_URL > ../djangoproject.com/tracdb/trac.sql


Note:
Expand Down

0 comments on commit fe366a3

Please sign in to comment.