Commit a1a44470 authored by Johan Bloemberg's avatar Johan Bloemberg

wip

parent 3164ee65
Pipeline #38393880 failed with stage
in 12 minutes and 18 seconds
......@@ -26,17 +26,15 @@ RUN apk --no-cache add \
go \
bash
# install app and dependencies in a artifact-able directory
RUN /usr/bin/pip3 install virtualenv
RUN virtualenv /pyenv
# install requirements seperately as they change less often then source, improved caching
COPY requirements.txt /source/
# copy pip cache to improve build speeds
COPY ./.pip-cache/ /root/.cache/pip/
RUN /pyenv/bin/pip3 install -r /source/requirements.txt
COPY requirements.deploy.txt /source/
RUN /pyenv/bin/pip3 install -r /source/requirements.deploy.txt
RUN /usr/bin/pip3 install --disable-pip-version-check pipenv
# install application and its dependencies into a artifactable virtualenv
COPY Pipfile Pipfile.lock setup.py setup.cfg MANIFEST.in version* /source/
COPY ./failmap/ /source/failmap/
WORKDIR /source/
RUN mkdir /pyenv
RUN VIRTUAL_ENV=/pyenv/ PIPENV_QUIET=1 PIPENV_COLORBLIND=1 pipenv sync
WORKDIR /
# install dnscheck
COPY vendor/dnscheck /vendor/dnscheck
......@@ -47,13 +45,14 @@ RUN tools/docker-install-dnscheck.sh
RUN npm install osmtogeojson
# build hypersh hypercli
COPY vendor/hypercli /gopath/src/github.com/hyperhq/hypercli
COPY vendor/hypercli /gopath/src/github.com/hyperhq/hypercli
RUN cd /gopath/src/github.com/hyperhq/hypercli; GOPATH=/gopath HYPER_GITCOMMIT=0 ./build.sh
# restart with a clean image
FROM failmap/o-saft:latest
USER root
WORKDIR /
# mailcap includes mimetypes required by uwsgi
RUN apk --no-cache add \
......@@ -113,21 +112,11 @@ RUN ln -s /node_modules/.bin/osmtogeojson /usr/local/bin/
COPY --from=build /gopath/src/github.com/hyperhq/hypercli/hyper/hyper /usr/local/bin/hyper
# copy all relevant files for python installation
COPY ./failmap/ /source/failmap/
COPY /tools/dnssec.pl /source/tools/dnssec.pl
# copy dependencies that are not in pypi or otherwise not available with ease
COPY ./vendor/ /source/vendor/
# add wildcard to version file as it may not exists (eg: local development)
COPY setup.py setup.cfg MANIFEST.in requirements.dev.txt version* /source/
# Install app by linking source into virtualenv. This is against convention
# but allows the source to be overwritten by a volume during development.
RUN /pyenv/bin/pip3 install -e /source/ --no-deps
WORKDIR /
# configuration for django-uwsgi to work correct in Docker environment
ENV UWSGI_GID root
ENV UWSGI_UID root
......
ifeq ($(VIRTUAL_ENV),)
$(info No virtualenv configured, a new virtualenv will be setup)
else
$(info Running in virtualenv: ${VIRTUAL_ENV})
endif
run = pipenv run
all: check test
......
[tool.poetry]
name = "failmap"
version = "0.1.0"
description = ""
authors = ["Your Name <you@example.com>"]
[tool.poetry.dependencies]
python = "^3.6"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"
......@@ -51,8 +51,5 @@ setup(
'failmap = failmap.manage:main',
],
},
scripts=[
'tools/dnssec.pl'
],
include_package_data=True,
)
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