Skip to content

Commit 82fca44

Browse files
authored
Merge pull request #87 from fly-apps/add-postgis-extension
Add PostGIS extension to base image
2 parents b0a9be5 + 81fe88b commit 82fca44

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Dockerfile

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ COPY . .
1010
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/event_handler ./cmd/event_handler
1111
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/failover_validation ./cmd/failover_validation
1212
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/pg_unregister ./cmd/pg_unregister
13-
1413
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start_monitor ./cmd/monitor
1514
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start_admin_server ./cmd/admin_server
16-
1715
RUN CGO_ENABLED=0 GOOS=linux go build -v -o /fly/bin/start ./cmd/start
1816

1917
COPY ./bin/* /fly/bin/
@@ -24,6 +22,8 @@ FROM postgres:${PG_VERSION}
2422
ENV PGDATA=/data/postgresql
2523
ARG VERSION
2624
ARG PG_MAJOR_VERSION
25+
ARG POSTGIS_MAJOR=3
26+
2727

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

37+
RUN apt-get update && apt-get install --no-install-recommends -y \
38+
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
39+
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts
40+
3741
COPY --from=0 /fly/bin/* /usr/local/bin
3842
COPY --from=postgres_exporter /postgres_exporter /usr/local/bin/
3943

0 commit comments

Comments
 (0)