Archived
Production Hardening (#241)
This commit is contained in:
1 parent
4f0a5376f3
commit
f79bbea7a4
8 files changed
+49
-14
No files matched your search
+11
-3
@@ -1,11 +1,19 @@
|
||||
FROM nginx:mainline-alpine
|
||||
|
||||
# Remove default configuration and add our custom Nginx configuration files
|
||||
RUN rm /etc/nginx/conf.d/default.conf
|
||||
COPY ./mattermost /etc/nginx/sites-available/
|
||||
COPY ./mattermost-ssl /etc/nginx/sites-available/
|
||||
RUN rm /etc/nginx/conf.d/default.conf \
|
||||
&& apk add --no-cache curl
|
||||
|
||||
COPY ["./mattermost", "./mattermost-ssl", "/etc/nginx/sites-available/"]
|
||||
COPY ./security.conf /etc/nginx/conf.d/
|
||||
|
||||
# Add and setup entrypoint
|
||||
COPY entrypoint.sh /
|
||||
|
||||
#Healthcheck to make sure container is ready
|
||||
HEALTHCHECK CMD curl --fail http://localhost:80 || exit 1
|
||||
|
||||
ENTRYPOINT ["/entrypoint.sh"]
|
||||
|
||||
VOLUME ["/var/run", "/etc/nginx/conf.d/", "/var/cache/nginx/"]
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
|
||||
# Define default value for app container hostname and port
|
||||
APP_HOST=${APP_HOST:-app}
|
||||
APP_PORT_NUMBER=${APP_PORT_NUMBER:-80}
|
||||
APP_PORT_NUMBER=${APP_PORT_NUMBER:-8000}
|
||||
|
||||
# Check if SSL should be enabled (if certificates exists)
|
||||
if [ -f "/cert/cert.pem" -a -f "/cert/key-no-password.pem" ]; then
|
||||
|
||||
Reference in new issue
Block a user