Skip to content

Commit

Permalink
Pin docker dependencies
Browse files Browse the repository at this point in the history
- Pin InaSAFE version to 4.4.0
- Pin QGIS Desktop image to 2.18
- Refactor entrypoint script for Dockerfile
  • Loading branch information
lucernae committed Jun 13, 2018
1 parent cd5a4f5 commit 9c2e8b4
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 13 deletions.
8 changes: 4 additions & 4 deletions deployment/ansible/development/group_vars/all.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,21 @@ interpreters:
inasafe:
repo: https://github.com/inasafe/inasafe.git
remote: upstream
version: master
version: version-4_4_0
depth: 1

inasafe_realtime_worker:
command: /docker-entrypoint.sh dev
command: dev
# Uncomment and edit the following lines to switch celery mode
# environment:
# task_always_eager: "${TASK_ALWAYS_EAGER}"
# on_travis: "${ON_TRAVIS}"

inasafe_shakemap_monitor:
command: /docker-entrypoint.sh dev
command: dev

inasafe_shakemap_corrected_monitor:
command: /docker-entrypoint.sh dev
command: dev

docker_port_forward:
inasafe_realtime:
Expand Down
8 changes: 4 additions & 4 deletions deployment/ansible/development/group_vars/all.travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,20 @@ interpreters:
inasafe:
repo: https://github.com/inasafe/inasafe.git
remote: upstream
version: master
version: version-4_4_0
depth: 1

inasafe_realtime_worker:
command: /docker-entrypoint.sh prod inasafe-realtime-worker
command: prod inasafe-realtime-worker
environment:
task_always_eager: "${TASK_ALWAYS_EAGER}"
on_travis: "${ON_TRAVIS}"

inasafe_shakemap_monitor:
command: /docker-entrypoint.sh prod inasafe-realtime-monitor
command: prod inasafe-realtime-monitor

inasafe_shakemap_corrected_monitor:
command: /docker-entrypoint.sh prod inasafe-realtime-monitor
command: prod inasafe-realtime-monitor

docker_port_forward:
inasafe_realtime:
Expand Down
2 changes: 1 addition & 1 deletion deployment/ansible/development/site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
2017.2
2017.3
2018.1
default: '2017.3'
default: '2018.1'
private: no
5 changes: 3 additions & 2 deletions deployment/docker-realtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#--------- Generic stuff all our Dockerfiles should start with so we get caching ------------
FROM kartoza/qgis-desktop:LTR
FROM kartoza/qgis-desktop:2.18

RUN apt-get -y update; apt-get -y --force-yes install pwgen git inotify-tools

Expand Down Expand Up @@ -38,4 +38,5 @@ RUN chmod +x /docker-entrypoint.sh

# Environment variable

CMD ["/docker-entrypoint.sh", "prod", "inasafe-headless"]
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["prod", "inasafe-headless"]
2 changes: 2 additions & 0 deletions deployment/docker-realtime/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ elif [ $# -eq 2 ] && [ $1 = "prod" ] && [ $2 = "inasafe-realtime-monitor" ]; the
elif [ $# -eq 1 ] && [ $1 = "dev" ]; then
/usr/sbin/sshd -D
fi

exec "$@"
5 changes: 3 additions & 2 deletions deployment/production/docker/realtime/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#--------- Generic stuff all our Dockerfiles should start with so we get caching ------------
FROM kartoza/qgis-desktop:LTR
FROM kartoza/qgis-desktop:2.18

RUN apt-get -y update; apt-get -y --force-yes install pwgen git inotify-tools

Expand Down Expand Up @@ -33,4 +33,5 @@ ARG INASAFE_REALTIME_TAG=develop
RUN git clone --branch ${INASAFE_REALTIME_TAG} --depth 1 https://github.com/inasafe/inasafe-realtime.git source
RUN ln -s source/src/realtime realtime

CMD ["/docker-entrypoint.sh", "prod", "inasafe-realtime-worker"]
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["prod", "inasafe-realtime-worker"]
2 changes: 2 additions & 0 deletions deployment/production/docker/realtime/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ if [ $# -eq 2 ] && [ $1 = "prod" ] && [ $2 = "inasafe-realtime-worker" ]; then
elif [ $# -eq 2 ] && [ $1 = "prod" ] && [ $2 = "inasafe-realtime-monitor" ]; then
python realtime/earthquake/notify_new_shake.py ${SHAKEMAPS_DIR}
fi

exec "$@"

0 comments on commit 9c2e8b4

Please sign in to comment.