-
Notifications
You must be signed in to change notification settings - Fork 14
/
Dockerfile
44 lines (32 loc) · 1.34 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
FROM python:3.6-buster
MAINTAINER WireCloud Team <[email protected]>
ENV DEFAULT_THEME=wirecloud.defaulttheme
ENV FORWARDED_ALLOW_IPS=*
ENV DB_HOST=
ENV DB_PORT=5432
ENV LOGLEVEL=info
RUN apt-get update && \
apt-get install -y libmemcached-dev gosu && \
pip install --no-cache-dir "social-auth-app-django<5" "gunicorn==19.3.0" "psycopg2-binary==2.8.6" pylibmc pysolr "elasticsearch==2.4.1" && \
rm -rf /var/lib/apt/lists/* && \
gosu nobody true
# Install WireCloud & dependencies
RUN pip install --no-cache-dir "wirecloud<1.4"
COPY ./docker-entrypoint.sh /
COPY ./manage.py /usr/local/bin/
RUN adduser --system --group --shell /bin/bash wirecloud && \
pip install --no-cache-dir "channels<2.4.0" asgi_ipc asgi_redis wirecloud_keycloak && \
mkdir -p /opt/wirecloud_instance /var/www/static && \
cd /opt && \
wirecloud-admin startproject wirecloud_instance wirecloud_instance && \
chown -R wirecloud:wirecloud wirecloud_instance /var/www/static && \
chmod a+x wirecloud_instance/manage.py
COPY ./settings.py ./urls.py /opt/wirecloud_instance/wirecloud_instance/
WORKDIR /opt/wirecloud_instance
VOLUME /var/www/static
VOLUME /opt/wirecloud_instance/data
EXPOSE 8000
HEALTHCHECK --interval=5s \
--start-period=120s \
CMD curl --fail http://localhost:8000/api/features || exit 1
ENTRYPOINT ["/docker-entrypoint.sh"]