Skip to content

Commit

Permalink
Merge pull request #87 from fly-apps/add-postgis-extension
Browse files Browse the repository at this point in the history
Add PostGIS extension to base image
  • Loading branch information
davissp14 authored Feb 9, 2023
2 parents b0a9be5 + 81fe88b commit 82fca44
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ COPY . .
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/event_handler ./cmd/event_handler
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/failover_validation ./cmd/failover_validation
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/pg_unregister ./cmd/pg_unregister

RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start_monitor ./cmd/monitor
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start_admin_server ./cmd/admin_server

RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start ./cmd/start

COPY ./bin/* /fly/bin/
Expand All @@ -24,6 +22,8 @@ FROM postgres:${PG_VERSION}
ENV PGDATA=/data/postgresql
ARG VERSION
ARG PG_MAJOR_VERSION
ARG POSTGIS_MAJOR=3


LABEL fly.app_role=postgres_cluster
LABEL fly.version=${VERSION}
Expand All @@ -34,6 +34,10 @@ RUN apt-get update && apt-get install --no-install-recommends -y \
ca-certificates iproute2 postgresql-$PG_MAJOR_VERSION-repmgr curl bash dnsutils vim procps jq pgbouncer ssh \
&& apt autoremove -y

RUN apt-get update && apt-get install --no-install-recommends -y \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts

COPY --from=0 /fly/bin/* /usr/local/bin
COPY --from=postgres_exporter /postgres_exporter /usr/local/bin/

Expand Down

0 comments on commit 82fca44

Please sign in to comment.