FROM postgres:10

ENV POSTGRES_USER mops
ENV POSTGRES_PASSWORD gavgav
ENV POSTGRES_DB mopsdb
ENV POSTGRES_PORT 6432

RUN apt-get update && \
    apt-get install -y \
        postgresql-10-partman \
        python-pip

RUN pip install \
        psycopg2==2.7.7 \
        yandex-pgmigrate==1.0.3

COPY mopsdb /opt/mopsdb
COPY initdb /docker-entrypoint-initdb.d
