Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/publishDockerImages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,10 @@ jobs:
runs-on: ubuntu-22.04

steps:
- uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}

- uses: actions/checkout@v1
- run: bash manifest.sh
2 changes: 1 addition & 1 deletion manifest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ docker manifest create \
"$DOCKER_IMAGE:latest-linux" \
"$DOCKER_IMAGE:latest-windows"

echo $DOCKER_HUB_TOKEN | docker login -u $DOCKER_HUB_USER --password-stdin
# Push manifests to Docker Hub
docker manifest push "$DOCKER_IMAGE:$POSTGRESQL_VERSION"
docker manifest push "$DOCKER_IMAGE:latest"
11 changes: 7 additions & 4 deletions postgresql/Dockerfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ RUN setx /M PATH "C:/pgsql/bin;%PATH%"

EXPOSE 5432

HEALTHCHECK --interval=5s --timeout=60s CMD pg_isready

USER ContainerUser

RUN mkdir "C:/pgsql/data"
Expand All @@ -37,10 +35,15 @@ COPY postgresql.conf /pgsql/data/
COPY pg_hba.conf /pgsql/data/

RUN pg_ctl -D "C:/pgsql/data" start && \
# satrapu 2023-08-16: See more about the 'createdb' command here: https://www.postgresql.org/docs/current/app-createdb.html
createdb && \
# satrapu 2023-08-16: See more about the 'createuser' command here: https://www.postgresql.org/docs/current/app-createuser.html
createuser --createdb --superuser --createrole --inherit --login postgres && \
psql -c "ALTER USER postgres WITH PASSWORD 'postgres'; " && \
dropdb ContainerUser && \
# satrapu 2023-08-16: Avoid removing 'ContainerUser' database to avoid error: 'FATAL: database "ContainerUser" does not exist'
# dropdb ContainerUser && \
pg_ctl -D "C:/pgsql/data" stop

CMD ["C:/pgsql/bin/postgres.exe", "-D", "C:/pgsql/data"]
HEALTHCHECK --interval=5s --timeout=60s CMD pg_isready --host=localhost --port=5432 --dbname=postgres --username=postgres

CMD ["C:/pgsql/bin/postgres.exe", "-D", "C:/pgsql/data"]