Skip to content

Commit 2f24e44

Browse files
committed
fix
1 parent 2323e73 commit 2f24e44

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
FROM nginx:latest
33

44
# Copy the custom Nginx configuration file to the container
5-
COPY nginx.conf /etc/nginx/nginx.conf
5+
COPY nginx-template.conf /etc/nginx/conf.d/nginx-template.conf
66

77
EXPOSE 80
8+
9+
CMD ["/bin/sh", "-c", "envsubst < /etc/nginx/conf.d/nginx-template.conf > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"]
10+

docker-compose.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,4 @@ services:
33
nginx-proxy:
44
image: ghcr.io/andreitere/coolify-nginx-reverse-proxy:${VERSION:-latest}
55
environment:
6-
- SERVICE_FQDN_PLEXPROXY
7-
ports:
8-
- "80"
6+
- PROXY_HOST_PORT=${PROXY_HOST_PORT}

nginx.conf renamed to nginx-template.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ http {
88
server_name _;
99

1010
location / {
11-
proxy_pass http://10.37.0.37:32400; # Replace with your local IP address
11+
proxy_pass http://${PROXY_HOST_PORT}; # Replace with your local IP address
1212
proxy_set_header Host $host;
1313
proxy_set_header X-Real-IP $remote_addr;
1414
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

0 commit comments

Comments
 (0)