Skip to content

Commit

Permalink
Build images on Travis.CI
Browse files Browse the repository at this point in the history
  • Loading branch information
dodobas committed Oct 12, 2017
1 parent 919cea6 commit 34248f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ language: python
env:
global:
- DOCKER_COMPOSE_VERSION=1.14.0
- secure: Nj8UfoZ10iBX5uXVnIvO9TOWKC9jHhP5q5l/pZzIt1kLoTv4mVpXq+KatfUi5whKVt9+dMCZEWjXGzVfJsg0RtXhi4KX7PhTFnG01w3QXtNvzGKmOkThP60DV21BohOZTXvobQ81DjN+oTw/VCD6Qh1FiBS/yx+vUWM07PTwHrA=
- secure: Iq0qyM2NOOa2E/MhK8dYi2AlVWyjovz9xuJJqQHiuFJjy3pt4QLtnhIzcKF7Vixp5f8a5yjttlC1XKzXJR+/rC++qWxR/sIsB8nFLg4vl2Jo4bYIFtlDOYSPOjse0VkupDpgXLCViZM1gmWLa4BAbzZj5oQqjs7xJYzx58mX2bE=

before_install:
- sudo rm /usr/local/bin/docker-compose
Expand All @@ -30,3 +32,9 @@ script:

after_success:
- docker-compose exec web env TRAVIS=$TRAVIS TRAVIS_JOB_ID=$TRAVIS_JOB_ID TRAVIS_BRANCH=$TRAVIS_BRANCH coveralls --nogit
- git clean -dfx
- docker login -u $DOCKER_USER -p $DOCKER_PASS
- export REPO=healthsites/web
- export TAG=`if [ "$TRAVIS_BRANCH" == "master" ]; then echo "latest"; else echo $TRAVIS_BRANCH ; fi`
- docker build django_project/ -t $REPO:$TAG
- docker push $REPO:$TAG
2 changes: 1 addition & 1 deletion docker-compose.prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: '3.3'
services:
web:
image: healthsites/web
command: ./utils/wait-for.sh db:5432 -- uwsgi --http-socket :8000 --workers 1 --static-map /static=./static/ --offload-threads --master --module core.wsgi:application
command: ./utils/wait-for.sh db:5432 -- uwsgi --http-socket :8000 --workers 1 --static-map /media=./media --static-map /static=./static/ --offload-threads --master --module core.wsgi:application
environment:
- DJANGO_SETTINGS_MODULE=core.settings.prod
- SECRET_FILE=hs-secret.py
Expand Down

0 comments on commit 34248f4

Please sign in to comment.