Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Verified Commit e7806e02 authored by Sreeram R's avatar Sreeram R 🦇
Browse files

Update for bringing client IP to nginx logs

parent 96574b2f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -69,6 +69,7 @@ test:unit:
    - scp $ENV_FILE $SSH_USER@$BACKEND_HOST:$DEPLOYMENT_PATH/.env
    - ssh $SSH_USER@$BACKEND_HOST "cd $DEPLOYMENT_PATH
      && sed -i 's/SPOT_DOCKER_TAG=master/SPOT_DOCKER_TAG=$SPOT_DOCKER_TAG/g' .env
      && sed -i "s/GATEWAY_WG_IP/$GATEWAY_WG_IP/g" etc/nginx/nginx.conf
      && docker-compose pull && sleep 2 && docker-compose up -d --remove-orphans && docker-compose restart spot-nginx"

deploy:spot.murenatest.io.backend1:
+4 −5
Original line number Diff line number Diff line
@@ -14,13 +14,12 @@ http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format main '$http_x_forwarded_for - $remote_user [$time_local] '
                    '"$request" $status $body_bytes_sent '
                    '"$http_referer" "$http_user_agent"';

    set_real_ip_from GATEWAY_WG_IP;
    real_ip_header X-Forwarded-For;
    real_ip_recursive on;

    error_log  /var/log/nginx/spot-error.log warn;
    access_log  /var/log/nginx/spot-access.log main;
    access_log  /var/log/nginx/spot-access.log;

    sendfile        on;
    #tcp_nopush     on;