Skip to content

Commit

Permalink
Merge pull request #74 from dappnode/dappnodedev/fix-postgres
Browse files Browse the repository at this point in the history
Fix postgres user
  • Loading branch information
pablomendezroyo authored Nov 23, 2023
2 parents a5748db + 7557fef commit 2525182
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 20 deletions.
8 changes: 3 additions & 5 deletions postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ RUN wget -q https://github.com/ConsenSys/web3signer/archive/refs/tags/${UPSTREAM
############
# POSTGRES #
############
FROM postgres:14.1-alpine3.15
FROM postgres:14.1-bullseye

ARG UPSTREAM_VERSION

Expand All @@ -26,12 +26,10 @@ ENV POSTGRES_PASSWORD=gnosis \
POSTGRES_DB=web3signer-gnosis \
INITDB_DIR=/docker-entrypoint-initdb.d/

COPY rename_files.sh /usr/local/bin/rename_files.sh
RUN apt update && apt install -y rename

COPY --from=postgres-migrations /usr/src/app/web3signer-${UPSTREAM_VERSION}/slashing-protection/src/main/resources/migrations/postgresql/* ${INITDB_DIR}

RUN /usr/local/bin/rename_files.sh

USER postgres
RUN rename 's/(\d+)(?=.*\.)/sprintf("%03d",$1)/eg' /docker-entrypoint-initdb.d/*

CMD ["postgres"]
15 changes: 0 additions & 15 deletions postgres/rename_files.sh

This file was deleted.

0 comments on commit 2525182

Please sign in to comment.