blob: 6c783f05525e8859d58d71f0fae2b26f04419cc0 [file] [log] [blame]
Tommy Carpenter89846042018-06-26 22:19:08 -04001FROM tiangolo/uwsgi-nginx-flask:python3.6
Tommy Carpenter0581c1e2017-08-11 15:02:32 -04002MAINTAINER tommy@research.att.com
3
Tommy Carpenter89846042018-06-26 22:19:08 -04004#setup uwsgi+nginx
5# https://hub.docker.com/r/tiangolo/uwsgi-nginx-flask/
6COPY ./app /app
Tommy Carpenter0581c1e2017-08-11 15:02:32 -04007
Tommy Carpenter89846042018-06-26 22:19:08 -04008RUN pip install --upgrade pip
9RUN pip install /app/app
Tommy Carpenter0581c1e2017-08-11 15:02:32 -040010
Tommy Carpenter226719d2018-03-09 10:41:05 -050011RUN mkdir -p /opt/logs/
12
Tommy Carpenter0d2fdb12018-06-29 16:08:34 -040013# create the dir for the ssl certs
14RUN mkdir -p /etc/nginx/ssl
15
16COPY nginxhttps.conf /etc/nginx/conf.d/nginxhttps.conf
17
Tommy Carpenter9ab2e0b2018-07-25 08:49:20 -040018#443 is https, 10000 is http
19# in the future, hopefully http can go away completely
Tommy Carpenter0d2fdb12018-06-29 16:08:34 -040020ENV LISTEN_PORT 10000
21EXPOSE 443
22EXPOSE 10000
23
Tommy Carpenter9ab2e0b2018-07-25 08:49:20 -040024# Mount a self signed certificate that should be overwritten upon Run
25RUN apt-get update && \
26 apt-get install -y openssl && \
27 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/nginx/ssl/nginx.key -out /etc/nginx/ssl/nginx.crt -subj "/C=US/ST=NJ/L=foo/O=ONAP/OU=ONAP/CN=configbinding"
28
Tommy Carpenter0d2fdb12018-06-29 16:08:34 -040029#this is a registrator flag that tells it to ignore 80 from service discovery. Nothing is listening on 80, but the parent Dockerfile here exposes it. This container is internally listening on 10000 and 443.
30ENV SERVICE_80_IGNORE true