Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapter and Docker #67

Merged
merged 13 commits into from
May 16, 2019
Merged
86 changes: 86 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
Dockerfile
.dockerignore

.git/

# custom configs
custom.cfg
data_sources.cfg
custom_wps.cfg
Makefile.config

# Python / Extensions etc.
**/*.mo
**/*.so
**/*.pyc
**/*.pyo
**/*.egg
**/*.egg-info
**/*.sqlite
**/*.bak
**/__pycache__
**/*.py[cod]

# Unit test / Coverage reports
**/*.cache
**/*.coverage
**/*.pytest_cache
**/*.tox
**/nosetests.xml
**/*.log
**/*.lock
tests/
testdata.json

# R
**/*.Rhistory

# Eclipse / PyDev
**/*.project
**/*.pydevproject
**/*.settings

# PyCharm
**/*.idea

# Intellij
**/*.iml

# Kate
**/*.kate-swp

# Sublime Text Editor
**/*.sublime*

# build / env config
bin/
build/
develop-eggs/
dist/
downloads/
eggs/
env/
opt/
parts/
**/*.installed.cfg
**/*.bak.*

# sphinx
docs/

# External Sources
src/

# IPython and Notebooks
.ipynb_checkpoints
**/*.ipynb

# gcc/fortran
**/*.o
**/*.a
**/*.mod
**/*.out

# process results
**/*.tif
**/*.zip
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ __pycache__
.tox
nosetests.xml
unit_tests/testdata.json
build
coverage/

# R
*.Rhistory
Expand Down Expand Up @@ -63,3 +63,7 @@ testdata.json
*.a
*.mod
*.out

# Environments
env/
venv/
3 changes: 2 additions & 1 deletion AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Carsten Ehbrecht <ehbrecht@dkrz.de>
Eric Lemoine <eric.lemoine@gmail.com> (http://github.com/elemoine/papyrus_ogcproxy)

David Byrns <david.byrns@crim.ca>
Francis Charette-Migneault <francis.charette-migneault@crim.ca>
12 changes: 12 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Changes
*******

Unreleased
==========

New Features:

* Provide a `Dockerfile` for building `Twitcher`.
* Improve `Makefile` conda environment setup/activation/update to speedup target operations when possible.
* Add `Makefile` targets for `docker`, `conda`, `bumpversion` and `coverage` analysis related tasks.
* Provide ``AdapterInterface`` to allow overriding store implementations with configuration setting ``twitcher.adapter``.
* Add version auto-update (number and date) of these 'changes' with ``bump2version``.
* Update requirements with missing dependencies when building docker image.

0.4.0 (2019-05-02)
==================

Expand Down
47 changes: 47 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# vim:set ft=dockerfile:
FROM python:3.7-alpine
LABEL Description="Twitcher" Vendor="Birdhouse" Maintainer="https://github.com/bird-house/twitcher"

# Configure hostname and ports for services
ENV HTTP_PORT 8080
ENV HTTPS_PORT 8443
ENV OUTPUT_PORT 8000
ENV HOSTNAME localhost
EXPOSE 9001 $HTTP_PORT $HTTPS_PORT $OUTPUT_PORT

ENV HOME /root
ENV TWITCHER_DIR /opt/birdhouse/src/twitcher
WORKDIR $TWITCHER_DIR

# copy basic requirements/references and build dependencies
# will be skipped if only source code has been updated
COPY \
requirements* \
setup.py \
README.rst \
CHANGES.rst \
$TWITCHER_DIR/
COPY \
twitcher/__init__.py \
twitcher/__version__.py \
$TWITCHER_DIR/twitcher/
RUN apk update \
&& apk add \
bash \
libxslt-dev \
libxml2 \
libffi-dev \
openssl-dev \
&& apk add --virtual .build-deps \
python-dev \
gcc \
musl-dev \
&& pip install --no-cache-dir --upgrade pip setuptools \
&& pip install --no-cache-dir -e $TWITCHER_DIR \
&& apk --purge del .build-deps

# copy source code and install it
COPY ./ $TWITCHER_DIR
RUN pip install --no-dependencies -e $TWITCHER_DIR

CMD ["pserve", "development.ini"]