Added postgres version to env

This commit is contained in:
Sergio Morillo 2023-09-27 18:35:40 +02:00
parent ef01aa9edf
commit 73da309768
2 changed files with 4 additions and 3 deletions

View file

@ -1,4 +1,5 @@
VERSION=6.0
POSTGRES_VERSION=15
POSTGRES_PASSWORD=<>
TRYTON_DB_USER=trytond
TRYTON_DB_PASSWORD=<>

View file

@ -8,9 +8,9 @@ x-logging:
services:
postgres:
image: postgres:14
image: postgres:${POSTGRES_VERSION}
# use alpine image if fails access to volume 'docker-entrypoint-initdb.d'
# image: postgres:14-alpine
# image: postgres:${POSTGRES_VERSION}-alpine
container_name: postgres
restart:
always
@ -21,7 +21,7 @@ services:
- TRYTON_DB_NAME=${TRYTON_DB_NAME}
volumes:
- ./sql_init_scripts:/docker-entrypoint-initdb.d
- /var/lib/pgsql/14/data:/var/lib/postgresql/data
- /var/lib/pgsql/${POSTGRES_VERSION}/data:/var/lib/postgresql/data
ports:
- "5432:5432"
shm_size: '128mb'