mirror of
https://github.com/zulip/docker-zulip.git
synced 2025-10-23 04:51:58 +00:00
Remove setup_files/ and related code from docker-compose.
This removes the fork of the core Zulip nginx configuration file that we were maintaining in the docker-zulip project; doing so improves the maintainability of this project for the future, since we don't need to check on every Zulip upgrade whether we've made any changes to the `nginx` package in zulip/zulip. The only feature we were using that for was the DISABLE_HTTPS setting in docker-zulip, and it's now possible to do that by editing zulip.conf instead. Fixes #114.
This commit is contained in:
committed by
Tim Abbott
parent
de7b59b352
commit
d3c32ab0c1
@@ -84,7 +84,6 @@ RUN apt-get -q dist-upgrade -y && \
|
|||||||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||||
|
|
||||||
COPY entrypoint.sh /sbin/entrypoint.sh
|
COPY entrypoint.sh /sbin/entrypoint.sh
|
||||||
ADD setup_files/ /opt/files
|
|
||||||
|
|
||||||
VOLUME ["$DATA_DIR"]
|
VOLUME ["$DATA_DIR"]
|
||||||
EXPOSE 80 443
|
EXPOSE 80 443
|
||||||
|
@@ -142,12 +142,12 @@ nginxConfiguration() {
|
|||||||
echo "Executing nginx configuration ..."
|
echo "Executing nginx configuration ..."
|
||||||
if [ "$DISABLE_HTTPS" == "True" ] || [ "$DISABLE_HTTPS" == "true" ]; then
|
if [ "$DISABLE_HTTPS" == "True" ] || [ "$DISABLE_HTTPS" == "true" ]; then
|
||||||
echo "Disabling https in nginx."
|
echo "Disabling https in nginx."
|
||||||
mv -f /opt/files/nginx/zulip-enterprise-http /etc/nginx/sites-enabled/zulip-enterprise
|
crudini --set /etc/zulip/zulip.conf application_server http_only true
|
||||||
|
/home/zulip/deployments/current/scripts/zulip-puppet-apply -f
|
||||||
fi
|
fi
|
||||||
sed -i "s/worker_processes .*/worker_processes $NGINX_WORKERS;/g" /etc/nginx/nginx.conf
|
sed -i "s/worker_processes .*/worker_processes $NGINX_WORKERS;/g" /etc/nginx/nginx.conf
|
||||||
sed -i "s/client_max_body_size .*/client_max_body_size $NGINX_MAX_UPLOAD_SIZE;/g" /etc/nginx/nginx.conf
|
sed -i "s/client_max_body_size .*/client_max_body_size $NGINX_MAX_UPLOAD_SIZE;/g" /etc/nginx/nginx.conf
|
||||||
sed -i "s/proxy_buffering .*/proxy_buffering $NGINX_PROXY_BUFFERING;/g" /etc/nginx/zulip-include/proxy_longpolling
|
sed -i "s/proxy_buffering .*/proxy_buffering $NGINX_PROXY_BUFFERING;/g" /etc/nginx/zulip-include/proxy_longpolling
|
||||||
/home/zulip/deployments/current/scripts/zulip-puppet-apply -f
|
|
||||||
echo "Nginx configuration succeeded."
|
echo "Nginx configuration succeeded."
|
||||||
}
|
}
|
||||||
configureCerts() {
|
configureCerts() {
|
||||||
|
@@ -1,22 +0,0 @@
|
|||||||
|
|
||||||
include /etc/nginx/zulip-include/upstreams;
|
|
||||||
|
|
||||||
server {
|
|
||||||
listen 80;
|
|
||||||
|
|
||||||
location /user_avatars {
|
|
||||||
add_header X-Content-Type-Options nosniff;
|
|
||||||
add_header Content-Security-Policy "default-src 'none' img-src 'self'";
|
|
||||||
include /etc/nginx/zulip-include/uploads.types;
|
|
||||||
alias /home/zulip/uploads/avatars;
|
|
||||||
}
|
|
||||||
|
|
||||||
location /local-static {
|
|
||||||
alias /home/zulip/local-static;
|
|
||||||
}
|
|
||||||
|
|
||||||
include /etc/nginx/zulip-include/certbot;
|
|
||||||
include /etc/nginx/zulip-include/app;
|
|
||||||
include /etc/nginx/zulip-include/uploads.route;
|
|
||||||
}
|
|
||||||
|
|
Reference in New Issue
Block a user