Skip to content

Commit

Permalink
chore(ci): Update database dockerfile and compose reference. (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
fergmac committed Sep 4, 2024
1 parent 076ac9b commit 0fe5c62
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
9 changes: 9 additions & 0 deletions database/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
FROM crunchydata/crunchy-postgres-gis:centos7-12.2-4.2.2

# Copy startup scripts
COPY /* /docker-entrypoint-initdb.d/

# User, port and Healthcheck
USER postgres
EXPOSE 5432
HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD [ "pg_isready", "-U", "postgres"]
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ services:
#############################################################################################
db:
platform: linux/x86_64
image: crunchydata/crunchy-postgres-gis:centos7-12.2-4.2.2
build:
context: ./database
dockerfile: Dockerfile
hostname: db
environment:
PG_USER: gwells
Expand All @@ -74,7 +76,7 @@ services:
- "5432:5432"
volumes:
- /pgdata
- ./database/scripts/local_dev/setup.sql:/pgconf/setup.sql
# - ./database/scripts/local_dev/setup.sql:/pgconf/setup.sql
healthcheck:
test: ["CMD-SHELL", "/usr/pgsql-12/bin/pg_isready", "-d", "gwells"]
interval: 20s
Expand Down

0 comments on commit 0fe5c62

Please sign in to comment.