Skip to content

Commit 4f730a3

Browse files
Change docker-compose to docker compose (#541)
1 parent 0db937c commit 4f730a3

File tree

17 files changed

+33
-33
lines changed

17 files changed

+33
-33
lines changed

app/scripts/convert.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
# migration
33

44
# example:
5-
# docker-compose exec web python core/scripts/convert.py \
5+
# docker compose exec web python core/scripts/convert.py \
66
# core/initial_data/UserStatus.csv
77

88
# to apply the seed script:
9-
# docker-compose exec web python manage.py runscript userstatus-seed
9+
# docker compose exec web python manage.py runscript userstatus-seed
1010

1111
import csv
1212
import json

docs/contributing/dev_environment.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,11 @@ Before cloning your forked repository to your local machine, you must have Git i
4242

4343
### Install Docker
4444

45-
Install or make sure [docker][docker-install] and [docker-compose][docker-compose-install] are installed on your computer
45+
Install or make sure [docker][docker-install] and [docker compose][docker-compose-install] are installed on your computer.
4646

4747
```bash
4848
docker -v
49-
docker-compose -v
49+
docker compose -v
5050
```
5151

5252
The recommended installation method for your operating system can be found [here](https://docs.docker.com/install/).
@@ -159,7 +159,7 @@ upstream https://github.com/hackforla/peopledepot.git (push)
159159
cp ./app/.env.docker-example ./app/.env.docker
160160
```
161161
162-
1. Build and run the project via the script (this includes running `docker-compose up`)
162+
1. Build and run the project via the script (this includes running `docker compose up`)
163163
164164
```bash
165165
./scripts/buildrun.sh
@@ -168,7 +168,7 @@ upstream https://github.com/hackforla/peopledepot.git (push)
168168
1. Create a super user for logging into the web admin interface
169169
170170
```bash
171-
docker-compose exec web python manage.py createsuperuser --no-input
171+
docker compose exec web python manage.py createsuperuser --no-input
172172
```
173173
174174
1. Browse to the web admin interface at `http://localhost:8000/admin/` and confirm the admin site is running. Use DJANGO_SUPERUSER_USERNAME and DJANGO_SUPERUSER_PASSWORD from .env.docker for credentials.

docs/contributing/howto/create-initial-data-migrations.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ It is required that there be data in the first column of the sheet.
4343
1. Go to the project root and run this command
4444

4545
```bash
46-
docker-compose exec web python scripts/convert.py "core/initial_data/PD_ Table and field explanations - ProgramArea - Data.csv"
46+
docker compose exec web python scripts/convert.py "core/initial_data/PD_ Table and field explanations - ProgramArea - Data.csv"
4747
```
4848

4949
1. Check that there's a new file called `app/core/scripts/programarea_seed.py` and that it looks correct
@@ -53,13 +53,13 @@ It is required that there be data in the first column of the sheet.
5353
1. Run this command to run the script
5454
5555
```bash
56-
docker-compose exec web python manage.py runscript programarea_seed
56+
docker compose exec web python manage.py runscript programarea_seed
5757
```
5858
5959
1. To remove the data, go into the database and delete all rows from `core_programarea`
6060
6161
```bash
62-
docker-compose exec web python manage.py dbshell
62+
docker compose exec web python manage.py dbshell
6363
6464
# now we have a shell to the db
6565

docs/contributing/tools/docker.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@
77
To stop the service-container, but not destroy it (often sufficient for day-to-day work):
88

99
```bash
10-
docker-compose stop
10+
docker compose stop
1111
```
1212

1313
To stop and destroy the service container:
1414

1515
```bash
16-
docker-compose down
16+
docker compose down
1717
```
1818

1919
Add the `-v` flag to destroy the data volumes as well:
2020

2121
```bash
22-
docker-compose down -v
22+
docker compose down -v
2323
```
2424

2525
### Recycling / Refreshing Database
@@ -30,7 +30,7 @@ From Docker:
3030
=== "Terminal"
3131

3232
```bash
33-
docker-compose down -v
33+
docker compose down -v
3434
```
3535

3636
=== "Docker Desktop"

docs/contributing/tools/mkdocs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ We are using MkDocs to generate our documentation. See [Docker-mkdocs repo](http
99
1. Run the mkdocs container.
1010

1111
```bash
12-
docker-compose up mkdocs # (1)!
12+
docker compose up mkdocs # (1)!
1313
```
1414

1515
1. Optionally use the `-d` flag to run the container in the background

docs/contributing/tools/uv.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ We're using `uv` as a faster replacement to `pip` and `pip-tools`. See the [offi
66

77
We're using `uv` to compile and install python dependencies, which replaces the functionalities of `pip` and `pip-tools`. `uv` can also create and maintain a virtual environment but we're not using it for now. In fact, we're suppressing it with the `--system` option during `uv pip install`.
88

9-
`uv` is already part of the `docker` image, so there's no need to install it on the host. It does require prepending the docker-compose information to run, for example: `docker-compose exec web uv pip compile requirements.in -o requirements.txt`. We'll omit the `docker-compose exec web` portion from now on in this document.
9+
`uv` is already part of the `docker` image, so there's no need to install it on the host. It does require prepending the docker compose information to run, for example: `docker compose exec web uv pip compile requirements.in -o requirements.txt`. We'll omit the `docker compose exec web` portion from now on in this document.
1010

1111
`requirements.in` is the requirements file and `uv pip compile` generates `requirement.txt`, with pinned versions, similar to lock files in other languages.
1212

@@ -46,7 +46,7 @@ See the [official documentation](https://docs.astral.sh/uv/guides/install-python
4646
We shouldn't run this on every build, but we should do this manually every month/quarter or so. Be sure to re-run all tests to make sure they still pass.
4747

4848
```bash
49-
# docker-compose exec web \
49+
# docker compose exec web \
5050
uv pip compile requirements.in -o requirements.txt --no-header --upgrade
5151
```
5252

scripts/createsuperuser.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ set -x
99
# This command requires the DJANGO_SUPERUSER_USERNAME and
1010
# DJANGO_SUPERUSER_PASSWORD environmental variables to be set when django starts
1111
# echo "DJANGO_SUPERUSER_USERNAME: $DJANGO_SUPERUSER_USERNAME"
12-
docker-compose exec web python manage.py createsuperuser --no-input
12+
docker compose exec web python manage.py createsuperuser --no-input

scripts/db.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ IFS=$'\n\t'
55
echo "\q to quit"
66

77
set -x
8-
docker-compose exec db psql -d people_depot_dev -U people_depot "$@"
8+
docker compose exec db psql -d people_depot_dev -U people_depot "$@"

scripts/erd.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ IFS=$'\n\t'
44
set -x
55

66
# create entity-relation diagram
7-
docker-compose exec web python manage.py graph_models -a > app/erd.dot
8-
docker-compose exec web dot -Tpng erd.dot -o erd.png
9-
# docker-compose exec web python manage.py graph_models --pydot -a -g -o erd.png
7+
docker compose exec web python manage.py graph_models -a > app/erd.dot
8+
docker compose exec web dot -Tpng erd.dot -o erd.png
9+
# docker compose exec web python manage.py graph_models --pydot -a -g -o erd.png

scripts/lint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ set -x
55

66
pre-commit run --all-files --show-diff-on-failure
77

8-
docker-compose exec -T web python manage.py spectacular --file /tmp/schema.yaml --validate
8+
docker compose exec -T web python manage.py spectacular --file /tmp/schema.yaml --validate

0 commit comments

Comments
 (0)