summaryrefslogtreecommitdiffstats
path: root/docker/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'docker/Dockerfile')
-rw-r--r--docker/Dockerfile34
1 files changed, 27 insertions, 7 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index fbfa7df..fcbf836 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -1,14 +1,34 @@
-FROM onap/dcae-tosca-base:1.0.4
-
-RUN apk add --no-cache \
+FROM python:3.5-alpine
+
+RUN apk add --update --no-cache \
+ autoconf \
+ gcc \
+ libc-dev \
+ linux-headers \
+ nginx \
curl \
+ && pip install --upgrade setuptools \
+ && pip install gunicorn
+
+RUN apk del \
+ autoconf \
+ gcc \
+ libc-dev \
+ linux-headers \
&& :
-COPY ./app /srv/
+RUN mkdir -p /run/nginx /run/gunicorn && \
+ touch /run/nginx/nginx.pid && \
+ chown -R nginx:nginx /var/log/nginx /run/nginx /run/gunicorn && \
+ chmod 0775 /var/log/nginx && \
+ chmod 0770 /var/lib/nginx/tmp /run/gunicorn && \
+ chmod 0664 /run/nginx/nginx.pid
+
+COPY app /srv/
-COPY ./docker/docker-entrypoint.sh /srv/
+COPY docker/docker-entrypoint.sh /srv/
-COPY ./nginx/nginx.conf /etc/nginx/nginx.conf
+COPY nginx/nginx.conf /etc/nginx/nginx.conf
RUN chmod +x /srv/tosca_server.py && \
chmod +x /srv/docker-entrypoint.sh
@@ -17,4 +37,4 @@ RUN pip3 install -r /srv/requirements.txt
EXPOSE 8085
-ENTRYPOINT ["/srv/docker-entrypoint.sh", "/usr/local/bin/uwsgi", "--ini", "/srv/web/uwsgi.ini"]
+ENTRYPOINT ["/srv/docker-entrypoint.sh", "/usr/local/bin/gunicorn", "-c", "/srv/web/gunicorn.conf" , "tosca_server:application"]