2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-07-02 03:30:54 +00:00

Docker postgres fix (#9041)

* Update docker image

- Move from alpine 3.19 to alpine 3.21
- Move from postgres13_client to postgres17_client

* Update docker-compose file

- Move from postgres:13 to postgres:16
- Move from redis:7.0 to redis:7-alpine

* Update docs

* Update docker docs

* Separate Dockerfile for devcontainer

- Debian based (python3.11-bookworm)
- Install essential system packages

* Instal postgres client

* Further devcontainer updates

- Bump postgresql image from 13 to 15
- Store psql data in the dev/psql directory
- Install required frontend packages

* Use --host mode for frontend server

* Tweak devcontainer docs

* Bump pre commit config file

* Revert "Bump pre commit config file"

This reverts commit bbfd875ac8.
This commit is contained in:
Oliver
2025-02-15 08:00:12 +11:00
committed by GitHub
parent 8367c32e84
commit 6f939931ca
10 changed files with 82 additions and 28 deletions

View File

@ -46,7 +46,7 @@ InvenTree run-time configuration options described in the [configuration documen
As docker containers are ephemeral, any *persistent* data must be stored in an external [volume](https://docs.docker.com/storage/volumes/). To simplify installation / implementation, all external data are stored in a single volume, arranged as follows:
#### Media FIles
#### Media Files
Uploaded media files are stored in the `media/` subdirectory of the external data volume.
@ -112,6 +112,19 @@ InvenTree stores any persistent data (e.g. uploaded media files, database data,
!!! info "Data Directory"
Make sure you change the path to the local directory where you want persistent data to be stored.
### Database Connection
The `inventree-db` container is configured to use the `postgres:{{ config.extra.docker_postgres_version }}` docker image.
Connecting to a different database container is entirely possible, but requires modification of the `docker-compose.yml` file. This is outside the scope of this documentation.
#### Postgres Version
The `inventree-server` and `inventree-worker` containers support connection to a postgres database up to (and including) version {{ config.extra.docker_postgres_version }}.
!!! warning "Newer Postgres Versions"
The InvenTree docker image supports connection to a postgres database up to version {{ config.extra.docker_postgres_version }}. Connecting to a database using a newer version of postgres is not possible.
## Common Issues
### Volume Mapping