Skip to content

Commit 6da0438

Browse files
committed
fix: read client ip via cloudflare patch
1 parent cbb96e2 commit 6da0438

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN echo "Acquire::http::Pipeline-Depth 0;" > /etc/apt/apt.conf.d/99custom && \
2626
# Install system dependencies, PHP, Node.js, Composer, and FrankenPHP CLI
2727
RUN apt-get update && apt-get upgrade -y \
2828
&& mkdir -p /etc/apt/keyrings \
29-
&& apt-get install -y --no-install-recommends gnupg curl ca-certificates zip unzip git sqlite3 libcap2-bin libpng-dev python3 dnsutils librsvg2-bin fswatch ffmpeg nano redis-server \
29+
&& apt-get install -y --no-install-recommends gnupg curl ca-certificates zip unzip git sqlite3 libcap2-bin libpng-dev python3 dnsutils librsvg2-bin fswatch ffmpeg nano redis-server nginx \
3030
# Add Ondrej PPA for PHP
3131
&& curl -sS 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0xb8dc7e53946656efbce4c1dd71daeaab4ad4cab6' | gpg --dearmor | tee /etc/apt/keyrings/ppa_ondrej_php.gpg > /dev/null \
3232
&& echo "deb [signed-by=/etc/apt/keyrings/ppa_ondrej_php.gpg] https://ppa.launchpadcontent.net/ondrej/php/ubuntu noble main" > /etc/apt/sources.list.d/ppa_ondrej_php.list \

docker/start.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
#!/bin/bash
22

3+
# Configure Nginx
4+
echo "real_ip_header CF-Connecting-IP;" > /etc/nginx/conf.d/real-ip.conf
5+
6+
# Start Nginx
7+
nginx -g 'daemon off;' &
38
redis-server &
49
php artisan serve --host=0.0.0.0 --port=80

0 commit comments

Comments
 (0)