Actualiser 2.build.postgresql.sh
This commit is contained in:
parent
415dde8c2b
commit
4efed3bf52
1 changed files with 0 additions and 23 deletions
|
|
@ -2,29 +2,6 @@
|
|||
set -euo pipefail
|
||||
source ./modules_OCA.env
|
||||
|
||||
DIR=./config-postgresql
|
||||
|
||||
mkdir -p "$DIR"
|
||||
|
||||
cat > "$DIR/Dockerfile" <<EOF
|
||||
# Utiliser l'image officielle PostgreSQL 15
|
||||
FROM postgres:15
|
||||
|
||||
# Changer le port d'écoute dans la configuration PostgreSQL
|
||||
RUN sed -i 's/^#port = 5432/port = $POSTGRESQL_PORT/' /usr/share/postgresql/postgresql.conf.sample
|
||||
|
||||
# Copier la configuration dans le répertoire de configuration PostgreSQL
|
||||
CMD ["postgres", "-c", "config_file=/usr/share/postgresql/postgresql.conf.sample"]
|
||||
EOF
|
||||
|
||||
sed -i -E "s/^([[:space:]]*)db_port[[:space:]]*=.*/\1db_port = $POSTGRESQL_PORT/" ./odoo.conf
|
||||
|
||||
sed -i "s/postgres15-5434/postgres15-$POSTGRESQL_PORT/g" ./docker-compose.yml
|
||||
sed -i "s/postgres-XXXXXXXXXXXXXXXXXXXXXX/$POSTGRES_CONTAINER/g" ./docker-compose.yml
|
||||
sed -i "s/odoo-XXXXXXXXXXXXXXXXXXXXXX/$ODOO_CONTAINER/g" ./docker-compose.yml
|
||||
|
||||
|
||||
|
||||
docker build \
|
||||
-f "$DIR/Dockerfile" \
|
||||
-t "postgres15-$POSTGRESQL_PORT-image" .
|
||||
|
|
|
|||
Loading…
Reference in a new issue