2021-10-20 17:02:36 +02:00
|
|
|
ARG DOCKER_REGISTRY="registry.gitlab.com/grassrootseconomics"
|
|
|
|
|
2021-10-29 11:36:14 +02:00
|
|
|
FROM $DOCKER_REGISTRY/cic-base-images:python-3.8.6-dev-e8eb2ee2
|
2021-10-20 17:02:36 +02:00
|
|
|
|
2021-10-29 11:36:14 +02:00
|
|
|
RUN apt-get install -y redis-server
|
2022-01-07 11:50:49 +01:00
|
|
|
|
2021-03-05 17:28:07 +01:00
|
|
|
# create secrets directory
|
|
|
|
RUN mkdir -vp pgp/keys
|
|
|
|
|
2021-02-06 16:13:47 +01:00
|
|
|
|
2021-12-10 15:55:50 +01:00
|
|
|
ARG EXTRA_PIP_INDEX_URL=https://pip.grassrootseconomics.net
|
2021-10-20 17:02:36 +02:00
|
|
|
ARG EXTRA_PIP_ARGS=""
|
|
|
|
ARG PIP_INDEX_URL=https://pypi.org/simple
|
|
|
|
|
|
|
|
COPY *requirements.txt ./
|
2021-10-29 11:36:14 +02:00
|
|
|
RUN --mount=type=cache,mode=0755,target=/root/.cache/pip \
|
|
|
|
pip install --index-url $PIP_INDEX_URL \
|
|
|
|
--pre \
|
2021-10-20 17:02:36 +02:00
|
|
|
--extra-index-url $EXTRA_PIP_INDEX_URL $EXTRA_PIP_ARGS \
|
2022-01-04 17:01:01 +01:00
|
|
|
-r requirements.txt
|
2021-02-06 16:13:47 +01:00
|
|
|
|
|
|
|
|
2021-07-10 17:46:14 +02:00
|
|
|
COPY . .
|
|
|
|
RUN python setup.py install
|
2021-02-06 16:13:47 +01:00
|
|
|
|
2022-01-07 11:50:49 +01:00
|
|
|
# create local files directory
|
|
|
|
RUN mkdir -vp cic_ussd/data/locale
|
2021-02-06 16:13:47 +01:00
|
|
|
|
2021-10-20 17:02:36 +02:00
|
|
|
COPY docker/*.sh ./
|
2021-02-06 16:13:47 +01:00
|
|
|
RUN chmod +x /root/*.sh
|
|
|
|
|
2021-10-29 11:36:14 +02:00
|
|
|
## copy config and migration files to definitive file so they can be referenced in path definitions for running scripts
|
2021-08-06 18:29:01 +02:00
|
|
|
COPY config/ /usr/local/etc/cic-ussd/
|
2021-07-10 17:46:14 +02:00
|
|
|
COPY cic_ussd/db/migrations/ /usr/local/share/cic-ussd/alembic
|
2021-02-22 18:51:57 +01:00
|
|
|
|
2021-07-10 17:46:14 +02:00
|
|
|
ENTRYPOINT []
|