feature: adapt container for kubernetes deployment

This commit is contained in:
RouxAntoine 2023-03-14 20:36:24 +01:00
parent 2ba7846366
commit b920b8884e
Signed by: antoine
GPG Key ID: 098FB66FC0475E70
3 changed files with 4 additions and 4 deletions

View File

@ -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"]

View File

@ -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

View File

@ -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';