From b920b8884efad31f3499ccf1c90b33156f6bb175 Mon Sep 17 00:00:00 2001 From: RouxAntoine Date: Tue, 14 Mar 2023 20:36:24 +0100 Subject: [PATCH] feature: adapt container for kubernetes deployment --- Dockerfile | 1 - Makefile | 5 +++-- initScript/init.sh | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 718f2ba..9ba7a6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,6 @@ RUN localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8 ENV LANG fr_FR.utf8 ENTRYPOINT ["docker-entrypoint.sh"] -VOLUME /var/lib/postgresql/data/instance EXPOSE 5432 CMD ["postgres"] diff --git a/Makefile b/Makefile index a70f544..2ca3bbc 100644 --- a/Makefile +++ b/Makefile @@ -5,14 +5,15 @@ REGISTRY_IP=docker.registry # linux/arm/v6 # linux/arm64 # linux/amd64 -PLATFORM=linux/arm/v6 +PLATFORM=linux/arm/v6,linux/amd64 #VERBOSITY=info VERBOSITY=debug ## build imagePostgres: - $(shell docker-multi-arch-builder build -n postgres --platforms $(PLATFORM) -v $(VERBOSITY)) + docker manifest rm $(REGISTRY_IP):5000/postgres:latest || true + docker-multi-arch-builder build -n postgres --platforms $(PLATFORM) -v $(VERBOSITY) ## management diff --git a/initScript/init.sh b/initScript/init.sh index 4d5af6f..2e54c4e 100644 --- a/initScript/init.sh +++ b/initScript/init.sh @@ -1,7 +1,7 @@ #!/bin/bash set -e -app_password=$(cat "$POSTGRES_APP_PASSWORD_FILE") +app_password="$POSTGRES_APP_PASSWORD" psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL CREATE USER docker WITH PASSWORD '$app_password';