Commit 3c619972 authored by Vasek Sraier's avatar Vasek Sraier

continuation of docker compose setup

parent e8d72032
......@@ -2,7 +2,7 @@
* run with `docker-compose up` in this directory
* used constants:
* postgres username: `pguser`
* postgres username: `rmbt`
* postgres password: `pgpass`
* RMBT_SECRET_KEY: `rmbt_secret_key`
......
......@@ -7,7 +7,7 @@ services:
dockerfile: docker/postgres/Dockerfile
environment:
POSTGRES_PASSWORD: pgpass
POSTGRES_USERNAME: pguser
POSTGRES_USER: rmbt
control:
build:
......
FROM postgres:10
FROM mdillon/postgis:9.5
RUN apt-get update && apt-get install -y pgxnclient make gcc postgresql-server-dev-10 && pgxn install quantile
RUN apt-get update && apt-get install -y pgxnclient make gcc postgresql-server-dev-9.5 && pgxn install quantile
RUN apt-get install -y postgresql-10-postgis-2.5
#RUN apt-get install -y --no-install-recommends postgresql-9.5-postgis-2.5
ADD RMBTControlServer/rmbt.sql /docker-entrypoint-initdb.d/00_rmbt.sql
ADD RMBTControlServer/rmbt_init.sql /docker-entrypoint-initdb.d/01_rmbt_init.sql
ADD RMBTControlServer/qos_texts-en.sql /docker-entrypoint-initdb.d/02_qos_texts-en.sql
ADD RMBTControlServer/qos_texts-cs.sql /docker-entrypoint-initdb.d/03_qos_texts-cs.sql
ADD RMBTControlServer/qos_tests.sql /docker-entrypoint-initdb.d/04_qos_tests.sql
ADD RMBTControlServer/rmbt_settings.sql /docker-entrypoint-initdb.d/05_rmbt_settings.sql
RUN mv /docker-entrypoint-initdb.d/postgis.sh /docker-entrypoint-initdb.d/00_postgis.sh
ADD docker/postgres/enable_extensions.sql /docker-entrypoint-initdb.d/02_enable_extensions.sql
ADD docker/postgres/init_roles.sh /docker-entrypoint-initdb.d/05_init_roles.sh
ADD docker/postgres/rmbt.sql /docker-entrypoint-initdb.d/10_rmbt.sql
ADD RMBTControlServer/rmbt_init.sql /docker-entrypoint-initdb.d/11_rmbt_init.sql
ADD RMBTControlServer/qos_texts-en.sql /docker-entrypoint-initdb.d/12_qos_texts-en.sql
ADD RMBTControlServer/qos_texts-cs.sql /docker-entrypoint-initdb.d/13_qos_texts-cs.sql
ADD RMBTControlServer/qos_tests.sql /docker-entrypoint-initdb.d/14_qos_tests.sql
ADD RMBTControlServer/rmbt_settings.sql /docker-entrypoint-initdb.d/15_rmbt_settings.sql
CREATE EXTENSION hstore;
\ No newline at end of file
#!/bin/bash
set -e
psql -v ON_ERROR_STOP=1 --username "$POSTGRES_USER" --dbname "$POSTGRES_DB" <<-EOSQL
CREATE USER rmbt;
CREATE DATABASE rmbt;
GRANT ALL PRIVILEGES ON DATABASE rmbt TO rmbt;
EOSQL
\ No newline at end of file
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment