File tree Expand file tree Collapse file tree 13 files changed +91
-55
lines changed Expand file tree Collapse file tree 13 files changed +91
-55
lines changed Original file line number Diff line number Diff line change 1
1
FROM postgres:9.0
2
- MAINTAINER Mike Dillon <mike@embody.org >
2
+ MAINTAINER Mike Dillon <mike@appropriate.io >
3
3
4
4
ENV POSTGIS_MAJOR 2.1
5
5
ENV POSTGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- POSTGRES=" gosu postgres postgres"
3
2
4
- $POSTGRES --single -E << EOSQL
5
- CREATE DATABASE template_postgis
6
- UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'
3
+ set -e
4
+
5
+ # Perform all actions as user 'postgres'
6
+ export PGUSER=postgres
7
+
8
+ # Create the 'template_postgis' template db
9
+ psql << EOSQL
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
7
12
EOSQL
8
13
9
- POSTGIS_CONFIG=/usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
10
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /postgis.sql
11
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /topology.sql
12
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /spatial_ref_sys.sql
14
+ # Populate 'template_postgis'
15
+ cd /usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
16
+ psql --dbname template_postgis < postgis.sql
17
+ psql --dbname template_postgis < topology.sql
18
+ psql --dbname template_postgis < spatial_ref_sys.sql
Original file line number Diff line number Diff line change 1
1
FROM postgres:9.1
2
- MAINTAINER Mike Dillon <mike@embody.org >
2
+ MAINTAINER Mike Dillon <mike@appropriate.io >
3
3
4
4
ENV POSTGIS_MAJOR 2.1
5
5
ENV POSTGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- POSTGRES=" gosu postgres postgres"
3
2
4
- $POSTGRES --single -E << EOSQL
5
- CREATE DATABASE template_postgis
6
- UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'
3
+ set -e
4
+
5
+ # Perform all actions as user 'postgres'
6
+ export PGUSER=postgres
7
+
8
+ # Create the 'template_postgis' template db
9
+ psql << EOSQL
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
7
12
EOSQL
8
13
9
- POSTGIS_CONFIG=/usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
10
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /postgis.sql
11
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /topology.sql
12
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /spatial_ref_sys.sql
14
+ # Populate 'template_postgis'
15
+ cd /usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
16
+ psql --dbname template_postgis < postgis.sql
17
+ psql --dbname template_postgis < topology.sql
18
+ psql --dbname template_postgis < spatial_ref_sys.sql
Original file line number Diff line number Diff line change 1
1
FROM postgres:9.2
2
- MAINTAINER Mike Dillon <mike@embody.org >
2
+ MAINTAINER Mike Dillon <mike@appropriate.io >
3
3
4
4
ENV POSTGIS_MAJOR 2.1
5
5
ENV POSTGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- POSTGRES=" gosu postgres postgres"
3
2
4
- $POSTGRES --single -E << EOSQL
5
- CREATE DATABASE template_postgis
6
- UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'
3
+ set -e
4
+
5
+ # Perform all actions as user 'postgres'
6
+ export PGUSER=postgres
7
+
8
+ # Create the 'template_postgis' template db
9
+ psql << EOSQL
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
7
12
EOSQL
8
13
9
- POSTGIS_CONFIG=/usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
10
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /postgis.sql
11
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /topology.sql
12
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /spatial_ref_sys.sql
14
+ # Populate 'template_postgis'
15
+ cd /usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
16
+ psql --dbname template_postgis < postgis.sql
17
+ psql --dbname template_postgis < topology.sql
18
+ psql --dbname template_postgis < spatial_ref_sys.sql
Original file line number Diff line number Diff line change 1
1
FROM postgres:9.3
2
- MAINTAINER Mike Dillon <mike@embody.org >
2
+ MAINTAINER Mike Dillon <mike@appropriate.io >
3
3
4
4
ENV POSTGIS_MAJOR 2.1
5
5
ENV POSTGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- POSTGRES=" gosu postgres postgres"
3
2
4
- $POSTGRES --single -E << EOSQL
5
- CREATE DATABASE template_postgis
6
- UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'
3
+ set -e
4
+
5
+ # Perform all actions as user 'postgres'
6
+ export PGUSER=postgres
7
+
8
+ # Create the 'template_postgis' template db
9
+ psql << EOSQL
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
7
12
EOSQL
8
13
9
- POSTGIS_CONFIG=/usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
10
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /postgis.sql
11
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /topology.sql
12
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /spatial_ref_sys.sql
14
+ # Populate 'template_postgis'
15
+ cd /usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
16
+ psql --dbname template_postgis < postgis.sql
17
+ psql --dbname template_postgis < topology.sql
18
+ psql --dbname template_postgis < spatial_ref_sys.sql
Original file line number Diff line number Diff line change 1
1
FROM postgres:9.4
2
- MAINTAINER Mike Dillon <mike@embody.org >
2
+ MAINTAINER Mike Dillon <mike@appropriate.io >
3
3
4
4
ENV POSTGIS_MAJOR 2.1
5
5
ENV POSTGIS_VERSION 2.1.7+dfsg-3~94.git954a8d0.pgdg80+1
Original file line number Diff line number Diff line change 1
1
#! /bin/sh
2
- POSTGRES=" gosu postgres postgres"
3
2
4
- $POSTGRES --single -E << EOSQL
5
- CREATE DATABASE template_postgis
6
- UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis'
3
+ set -e
4
+
5
+ # Perform all actions as user 'postgres'
6
+ export PGUSER=postgres
7
+
8
+ # Create the 'template_postgis' template db
9
+ psql << EOSQL
10
+ CREATE DATABASE template_postgis;
11
+ UPDATE pg_database SET datistemplate = TRUE WHERE datname = 'template_postgis';
7
12
EOSQL
8
13
9
- POSTGIS_CONFIG=/usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
10
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /postgis.sql
11
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /topology.sql
12
- $POSTGRES --single template_postgis -j < $POSTGIS_CONFIG /spatial_ref_sys.sql
14
+ # Populate 'template_postgis'
15
+ cd /usr/share/postgresql/$PG_MAJOR /contrib/postgis-$POSTGIS_MAJOR
16
+ psql --dbname template_postgis < postgis.sql
17
+ psql --dbname template_postgis < topology.sql
18
+ psql --dbname template_postgis < spatial_ref_sys.sql
You can’t perform that action at this time.
0 commit comments