Skip to content
This repository has been archived by the owner on May 28, 2021. It is now read-only.

Commit

Permalink
Initial commit (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
anders-kiaer authored Apr 4, 2019
1 parent 9ac9f31 commit b88be33
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 2 deletions.
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
language: python

python:
- "3.6"

services:
- docker

env:
global:
- DOCKER_USERNAME=webviz
- secure: a86qzNbAd8Ej9vo3Z/KwEls7LmznAGJl9K1Y+bc1DfsMq+nCyrlilEbOwjXGOV91KIhfTgGWBdZHHiodUX0oxCNO7ZZVnUHRwdj53cU3BCHF1oCX0hKufZq413bAGS5cp9hMf75r92LeHIbysvQUFZSSwEV3bX6vvtEYt5F91hkQ/qC5ligieoS4HuOGi47Pl1fCOWZQkMZjXbIleE5u3QpbRC+Mo1HaV69wblFXzzsOrHh/Cx+S8puIYvQvrDq4FQLpfyWyLRLyov/BC2UzbqtL/PfQWc2VWtQFsu2DTMZQMcwcBT0aBkepKgXs985tmWDIIBd4076Rycy0EsuGnQCu3LS+08GaWwZm9VPQBzLFPx+RCsukatBoKe5H0ySecIUm6STQjxsXH8pmwjo6wuoOh0miqdfZPQDMQOcYMo2C9T6j/T6Mgh+c7hcMM47G5rR7y75x0Nh5vXJZdlwdAKzHXz+YtvCvJF0D15WHB84q79lk/mIGeWTdzvCibcsQ7PV7yOmjiPVWjL05i2RbfQ7Rx6wiBX0i1z4eUoztEgq5bMB42ohUBnmPW2uqahuRyRFVQFeVEj3XYh8qchlwoUU4zHsQAWuXC5xIL3XNYPAg80e9ag9pSpnqvR5Y6EyfUmcfvqF10HaLX50X8XLl3mZLnv2wyCEZF0FuxXuUnM4=

install:
- pip install docker pytest

script:
- docker build -t webviz/base_image .

deploy:
provider: script
script: bash deploy_docker_image.sh
skip_cleanup: true
on:
tags: true
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM tiangolo/uwsgi-nginx-flask:python3.7

################################
# Install the webviz ecosystem #
################################

RUN pip install -U pip

RUN pip install webviz-config #webviz-subsurface

# Change from full plotly bundle to one not depending on javascript eval.
# See https://github.com/plotly/dash-core-components/issues/462 for details.

ENV DCC_DIR='/usr/local/lib/python3.7/site-packages/dash_core_components'
RUN PLOTLY_VERSION=`ls $DCC_DIR/plotly-*.min.js | egrep -o '[0-9]+.[0-9]+.[0-9]+'` \
&& wget https://github.com/plotly/plotly.js/raw/v$PLOTLY_VERSION/dist/plotly-cartesian.min.js \
&& mv plotly-cartesian.min.js $DCC_DIR/plotly-cartesian-$PLOTLY_VERSION.min.js \
&& sed -i "s/plotly-$PLOTLY_VERSION.min.js/plotly-cartesian-$PLOTLY_VERSION.min.js/g" $DCC_DIR/__init__.py

##############################################
# Prepare for adding the webviz instance app #
##############################################

ENV LISTEN_PORT=5000
EXPOSE 5000

COPY uwsgi.ini /

ENV UWSGI_INI /uwsgi.ini
ENV STATIC_URL /dash_app/assets

WORKDIR /dash_app
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# webviz-docker
Build and deploy webviz docker base image
# Build webviz docker image

This repository is supposed to build and deploy a `webviz` Docker image
such that there is always an updated base image on Dockerhub, which
then can be used by `webviz-config`.

This repository is in alpha.
3 changes: 3 additions & 0 deletions deploy_docker_image.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
docker push webviz/base_image
7 changes: 7 additions & 0 deletions uwsgi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[uwsgi]
module = dash_app.webviz_app
callable = server
uid = 1000
master = true
threads = 2
processes = 4

0 comments on commit b88be33

Please sign in to comment.