Skip to content

Update docker to use Python 3.14 and Postgres 18.1. fix resulting issues#786

Merged
seapagan merged 3 commits intomainfrom
freshen-docker-config
Dec 25, 2025
Merged

Update docker to use Python 3.14 and Postgres 18.1. fix resulting issues#786
seapagan merged 3 commits intomainfrom
freshen-docker-config

Conversation

@seapagan
Copy link
Owner

This pull request updates the development environment to use newer versions of Python and PostgreSQL, improves Docker configuration for local development, and enhances documentation to guide users through these changes. The most important changes are grouped below.

Environment and Dependency Upgrades

  • Upgraded the base Python image in the Dockerfile from python:3.13-slim to python:3.14-slim.
  • Updated the PostgreSQL Docker image from version 17.3-bullseye to 18.1-bookworm, and adjusted related volume and environment variables to match the new version.

Docker Configuration Improvements

  • Added essential build tools (git, file, make) to the Docker image for improved development experience.
  • Changed Docker Compose volumes to mount the entire project directory and .venv, ensuring local file changes are immediately reflected in the container without affecting the local virtual environment.
  • Updated the uv sync commands to use the --locked flag instead of --frozen for more robust dependency management.

Documentation Updates

  • Added a warning and instructions for upgrading to PostgreSQL 18, including steps for handling incompatible database volumes.
  • Updated documentation to reflect the new Python and PostgreSQL versions, and clarified how local file changes and virtual environments are handled with Docker. [1] [2]
  • Documented that the api-admin CLI tool is now fully functional within the Docker container.

Testing Improvements

  • Improved Docker environment detection in tests by checking both the .dockerenv file and the DOCKER_RUNNING environment variable.
  • Skipped a test that fails under Docker to ensure reliable test results in containerized environments.

Signed-off-by: Grant Ramsay <seapagan@gmail.com>
- Fix volume mount to use /app/ instead of /app/src/ to ensure
  local file changes are immediately reflected in container
- Add anonymous volume for /app/.venv to protect local virtual
  environment from being overwritten by container's venv
- Update is_running_in_docker() to check DOCKER_RUNNING env var
  for more reliable Docker detection with pyfakefs
- Skip test_metadata_command_cant_write_toml in Docker where
  root user can bypass file permissions
- Update Dockerfile: add git, file, make packages and change
  uv sync from --frozen to --locked
- Upgrade PostgreSQL from 17.3 to 18.1 and update volume paths
- Add PostgreSQL 18 upgrade warning with migration instructions
- Update Python version from 3.13 to 3.14
- Update PostgreSQL version from 17 to 18.1
- Fix typo: "confguration" to "configuration"
- Document api-admin CLI tool now working in Docker
- Add "Local File Changes" section explaining volume mounting
  and .venv protection
- Reorder Database Administration to prioritize api-admin over
  external tools like pgAdmin4
@seapagan seapagan self-assigned this Dec 25, 2025
@seapagan seapagan added the enhancement New feature or request label Dec 25, 2025
@codacy-production
Copy link

codacy-production bot commented Dec 25, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.00% (target: -1.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (17aeba6) 1547 1547 100.00%
Head commit (61e965c) 1547 (+0) 1547 (+0) 100.00% (+0.00%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#786) 0 0 ∅ (not applicable)

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

@seapagan seapagan marked this pull request as ready for review December 25, 2025 10:19
@seapagan seapagan merged commit e6926f1 into main Dec 25, 2025
17 checks passed
@seapagan seapagan deleted the freshen-docker-config branch December 25, 2025 10:20
@seapagan seapagan changed the title Freshen docker config Update docker to use Python 3.14 and Postgres 18.1. fix resulting issues Dec 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant