kopia lustrzana https://github.com/OpenDroneMap/WebODM
Build PostGIS from source
rodzic
e1d04e8454
commit
761652f14a
|
@ -76,7 +76,7 @@ class Migration(migrations.Migration):
|
|||
('options', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default={}, help_text='Options that are being used to process this task', validators=[app.models.validate_task_options])),
|
||||
('console_output', models.TextField(blank=True, default='', help_text="Console output of the OpenDroneMap's process")),
|
||||
('ground_control_points', models.FileField(blank=True, help_text='Optional Ground Control Points file to use for processing', null=True, upload_to=app.models.gcp_directory_path)),
|
||||
('orthophoto', django.contrib.gis.db.models.RasterField(blank=True, help_text='Orthophoto created by OpenDroneMap', null=True, srid=4326)),
|
||||
('orthophoto', models.CharField(blank=True, help_text='Orthophoto created by OpenDroneMap', null=True, max_length=1)),
|
||||
('created_at', models.DateTimeField(default=django.utils.timezone.now, help_text='Creation date')),
|
||||
('pending_action', models.IntegerField(blank=True, choices=[(1, 'CANCEL'), (2, 'REMOVE'), (3, 'RESTART')], db_index=True, help_text='A requested action to be performed on the task. The selected action will be performed by the scheduler at the next iteration.', null=True)),
|
||||
('processing_node', models.ForeignKey(blank=True, help_text='Processing node assigned to this task (or null if this task has not been associated yet)', null=True, on_delete=django.db.models.deletion.CASCADE, to='nodeodm.ProcessingNode')),
|
||||
|
|
|
@ -1,17 +1,23 @@
|
|||
FROM postgres:9.5
|
||||
MAINTAINER Piero Toffanin <pt@masseranolabs.com>
|
||||
|
||||
ENV POSTGIS_MAJOR 2.3
|
||||
ENV POSTGRES_PASSWORD postgres
|
||||
|
||||
RUN . /etc/os-release \
|
||||
&& echo "deb http://deb.debian.org/debian "$VERSION_CODENAME"-backports main" >> /etc/apt/sources.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR \
|
||||
postgresql-$PG_MAJOR-postgis-$POSTGIS_MAJOR-scripts \
|
||||
postgis \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
# Build PostGIS from source
|
||||
RUN apt-get update && \
|
||||
apt-get install -y --no-install-recommends wget gcc build-essential libproj-dev libgeos-dev libpq-dev libxml2-dev postgresql-server-dev-9.5 && \
|
||||
mkdir /staging && \
|
||||
cd /staging && \
|
||||
wget --no-check-certificate -q https://download.osgeo.org/postgis/source/postgis-2.3.0.tar.gz && \
|
||||
tar -zxvf postgis-2.3.0.tar.gz && \
|
||||
cd postgis-2.3.0 && \
|
||||
./configure --without-raster && \
|
||||
make -j$(nproc) && \
|
||||
make install && \
|
||||
cd / && \
|
||||
rm -fr /staging && \
|
||||
apt-get remove -y gcc build-essential postgresql-server-dev-9.5 wget && \
|
||||
apt-get clean
|
||||
|
||||
EXPOSE 5432
|
||||
COPY init.sql /docker-entrypoint-initdb.d/init-db.sql
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
ALTER USER postgres PASSWORD 'postgres';
|
||||
CREATE DATABASE webodm_dev;
|
||||
ALTER DATABASE webodm_dev SET postgis.gdal_enabled_drivers TO 'GTiff';
|
||||
ALTER DATABASE webodm_dev SET postgis.enable_outdb_rasters TO True;
|
||||
|
||||
CREATE EXTENSION IF NOT EXISTS postgis;
|
||||
|
|
Ładowanie…
Reference in New Issue