Actualiser 2.build.postgresql.sh
This commit is contained in:
parent
008abfcf2a
commit
7966a5062c
1 changed files with 3 additions and 3 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
source ./modules_OCA.env
|
||||||
|
|
||||||
NEW_PORT=5455
|
|
||||||
DIR=./config-postgresql
|
DIR=./config-postgresql
|
||||||
|
|
||||||
mkdir -p "$DIR"
|
mkdir -p "$DIR"
|
||||||
|
|
@ -11,7 +11,7 @@ cat > "$DIR/Dockerfile" <<EOF
|
||||||
FROM postgres:15
|
FROM postgres:15
|
||||||
|
|
||||||
# Changer le port d'écoute dans la configuration PostgreSQL
|
# Changer le port d'écoute dans la configuration PostgreSQL
|
||||||
RUN sed -i 's/^#port = 5432/port = $NEW_PORT/' /usr/share/postgresql/postgresql.conf.sample
|
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
|
# Copier la configuration dans le répertoire de configuration PostgreSQL
|
||||||
CMD ["postgres", "-c", "config_file=/usr/share/postgresql/postgresql.conf.sample"]
|
CMD ["postgres", "-c", "config_file=/usr/share/postgresql/postgresql.conf.sample"]
|
||||||
|
|
@ -19,7 +19,7 @@ EOF
|
||||||
|
|
||||||
sed -i -E "s/^([[:space:]]*)db_port[[:space:]]*=.*/\1db_port = $NEW_PORT/" ./odoo.conf
|
sed -i -E "s/^([[:space:]]*)db_port[[:space:]]*=.*/\1db_port = $NEW_PORT/" ./odoo.conf
|
||||||
|
|
||||||
sed -i "s/postgres15-5434/postgres15-$NEW_PORT/g" ./docker-compose.yml
|
sed -i "s/postgres15-5434/postgres15-$POSTGRESQL_PORT/g" ./docker-compose.yml
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue