forked from geopython/GeoHealthCheck
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
83 lines (68 loc) · 2.57 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
FROM python:2.7.13-alpine
# Thanks to http://www.sandtable.com/reduce-docker-image-sizes-using-alpine
# FROM debian:jessie
# Credits to yjacolin for providing first versions
LABEL original_developer "yjacolin <[email protected]>"
LABEL maintainer "Just van den Broecke <[email protected]>"
# These are default values,
# Override when running container via docker(-compose)
# General ENV settings
ENV LC_ALL "en_US.UTF-8"
ENV LANG "en_US.UTF-8"
ENV LANGUAGE "en_US.UTF-8"
# GHC ENV settings
ENV ADMIN_NAME admin
ENV ADMIN_PWD admin
ENV ADMIN_EMAIL [email protected]
ENV SQLALCHEMY_DATABASE_URI 'sqlite:////GeoHealthCheck/DB/data.db'
ENV SECRET_KEY 'd544ccc37dc3ad214c09b1b7faaa64c60351d5c8bb48b342'
ENV GHC_RETENTION_DAYS 30
ENV GHC_RUN_FREQUENCY 'hourly'
ENV GHC_SELF_REGISTER False
ENV GHC_NOTIFICATIONS False
ENV GHC_NOTIFICATIONS_VERBOSITY True
ENV GHC_WWW_LINK_EXCEPTION_CHECK False
ENV GHC_ADMIN_EMAIL '[email protected]'
ENV GHC_NOTIFICATIONS_EMAIL '[email protected],[email protected]'
ENV GHC_SITE_TITLE 'GeoHealthCheck'
ENV GHC_SITE_URL 'http://localhost'
ENV GHC_SMTP_SERVER None
ENV GHC_SMTP_PORT None
ENV GHC_SMTP_TLS False
ENV GHC_SMTP_SSL False
ENV GHC_SMTP_USERNAME None
ENV GHC_SMTP_PASSWORD None
ENV GHC_METADATA_CACHE_SECS 900
# WSGI server settings, assumed is gunicorn
ENV HOST 0.0.0.0
ENV PORT 80
ENV WSGI_WORKERS 4
ENV WSGI_WORKER_TIMEOUT 6000
ENV WSGI_WORKER_CLASS 'eventlet'
# GHC Core Plugins modules and/or classes, seldom needed to set:
# if not specified here or in Container environment
# all GHC built-in Plugins will be active.
#ENV GHC_PLUGINS 'GeoHealthCheck.plugins.probe.owsgetcaps,\
# GeoHealthCheck.plugins.probe.wms, ...., ...\
# GeoHealthCheck.plugins.check.checks'
# GHC User Plugins, best be overridden via Container environment
ENV GHC_USER_PLUGINS ''
RUN apk add --no-cache --virtual .build-deps gcc build-base linux-headers postgresql-dev \
&& apk add --no-cache bash vim postgresql-client \
&& pip install virtualenv \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*
# Add standard files and Add/override Plugins
# Alternative Entrypoints to run GHC jobs
# Override default Entrypoint with these on Containers
ADD docker/install.sh docker/configure.sh docker/run.sh \
docker/config_site.py docker/cron-jobs-daily.sh docker/cron-jobs-hourly.sh docker/plugins /
RUN chmod a+x /*.sh
# Add Source Code
ADD . /GeoHealthCheck
# Install and Remove build-related packages for smaller image size
RUN bash install.sh \
&& apk del .build-deps
# For SQLite
VOLUME ["/GeoHealthCheck/DB/"]
EXPOSE ${PORT}
ENTRYPOINT /configure.sh && /run.sh