FROM postgres:12

# install PostGIS extension
RUN apt-get update && apt install -y postgis postgresql-12-postgis-3

RUN mkdir -p /docker-entrypoint-initdb.d

# create app database and restore data
COPY ./schema.sql /docker-entrypoint-initdb.d/schema.sql
COPY ./tables.sql /docker-entrypoint-initdb.d/tables.sql