|
1 | 1 | # Develop with Docker |
2 | 2 |
|
| 3 | +!!! warning "PostgreSQL 18 Upgrade (Release 0.8.0)" |
| 4 | + As of release `0.8.0`, we have upgraded PostgreSQL from version 17 to 18.1. |
| 5 | + This version is not compatible with existing PostgreSQL 17 databases. |
| 6 | + |
| 7 | + You will need to either: |
| 8 | + |
| 9 | + 1. **Delete and recreate** the database volume: |
| 10 | + ```console |
| 11 | + docker compose down |
| 12 | + docker volume rm api-db-data |
| 13 | + docker compose up |
| 14 | + ``` |
| 15 | + 2. **Dump and reload** your existing data before upgrading (see PostgreSQL |
| 16 | + documentation for migration guides) |
| 17 | + |
3 | 18 | ## Python and PostgreSQL versions |
4 | 19 |
|
5 | | -Currently, the Docker confguration uses Python version `3.13` and PostgreSQL |
6 | | -version `17` (or the latest patch version of each). |
| 20 | +Currently, the Docker configuration uses Python version `3.14` and PostgreSQL |
| 21 | +version `18.1` (or the latest patch version of each). |
7 | 22 |
|
8 | 23 | !!! warning "Database Version Changes" |
9 | 24 | At times we will update the Docker configurations to use a newer version of |
@@ -77,14 +92,27 @@ docker compose build |
77 | 92 |
|
78 | 93 | ## Database Administration |
79 | 94 |
|
80 | | -At this time, the CLI tool is not available in the Docker container, so you will |
81 | | -need to use an external tool such as `pgAdmin4` to manage the database. Note |
82 | | -that the database is exposed on port `5433` and the default username and |
83 | | -password are those set in your `.env` file. |
| 95 | +The `api-admin` CLI tool is fully functional within the Docker container. You can |
| 96 | +run any `api-admin` commands using: |
| 97 | + |
| 98 | +```console |
| 99 | +docker compose run --rm api api-admin <command> |
| 100 | +``` |
| 101 | + |
| 102 | +Alternatively, you can use an external tool such as `pgAdmin4` to manage the |
| 103 | +database. Note that the database is exposed on port `5433` and the default |
| 104 | +username and password are those set in your `.env` file. |
| 105 | + |
| 106 | +## Local File Changes |
| 107 | + |
| 108 | +The Docker configuration uses volume mounting to ensure that any changes you make |
| 109 | +to your local files (including source code and tests) are immediately reflected |
| 110 | +in the running container. This means you don't need to rebuild the Docker image |
| 111 | +every time you make a code change. |
84 | 112 |
|
85 | | -In the future I will try to get the `api-admin` tool working inside the Docker |
86 | | -container. The issue is getting this to work without destroying my local `.venv` |
87 | | -folder. |
| 113 | +Your local `.venv` directory is protected and will not be affected by the |
| 114 | +container's virtual environment, so you can safely develop both locally and |
| 115 | +within Docker without conflicts. |
88 | 116 |
|
89 | 117 | ## Run Tests |
90 | 118 |
|
|
0 commit comments