simplify reverse proxy (#98)

make use of mainline nginx image, switch ssl/non-ssl config file based on presence of cert/key, hardcode app port since it is hardcoded in the app container as well
This commit is contained in:
nikosch86 authored and Pan Luo committed 2017-02-26 00:30:03 -08:00
1 parent 142b766cde
commit f7c78e675a
7 files changed
+15 -48

No files matched your search

+5 -18
View File
@@ -1,22 +1,9 @@
FROM ubuntu:14.04
FROM nginx:mainline
RUN apt-get update && apt-get install -y nginx
RUN rm /etc/nginx/sites-enabled/default
COPY mattermost /etc/nginx/sites-available/
COPY mattermost-ssl /etc/nginx/sites-available/
ADD docker-entry.sh /
RUN rm /etc/nginx/conf.d/default.conf
COPY ./mattermost /etc/nginx/sites-available/
COPY ./mattermost-ssl /etc/nginx/sites-available/
COPY docker-entry.sh /
RUN chmod +x /docker-entry.sh
# You can see the logs using `docker-compose logs web`.
RUN ln -sf /dev/stdout /var/log/nginx/access.log
RUN ln -sf /dev/stderr /var/log/nginx/error.log
# Define working directory.
WORKDIR /etc/nginx
ENTRYPOINT /docker-entry.sh
EXPOSE 80 443