Skip to content

Commit d9fd8fd

Browse files
committed
Swapped gateway ports 70 and 80 to prep for SSL
To run certbot on deployment, it requires the server to be running on port 80. This change is to prep for certbot use on deployment. Note that the change in port required the Dockerfile to expose 70:70 for the internal gateway again - as the final deployment uses kuber this should not pose an issue.
1 parent 4dc737d commit d9fd8fd

File tree

5 files changed

+8
-6
lines changed

5 files changed

+8
-6
lines changed

compose.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,8 @@ services:
153153
image: distractedcat/nginx
154154
volumes:
155155
- ./nginx/nginx.conf:/etc/nginx/internal.conf
156+
ports:
157+
- "70:70"
156158
depends_on:
157159
- peerprep
158160
- backend
@@ -164,7 +166,7 @@ services:
164166
build: inbound-gateway
165167
image: wzwren/inbound-gateway
166168
ports:
167-
- "70:70"
169+
- "80:80"
168170
volumes:
169171
- ./inbound-gateway/nginx.conf:/etc/nginx/external.conf
170172
depends_on:

inbound-gateway/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM nginx:alpine
22
COPY nginx.conf /etc/nginx/external.conf
3-
EXPOSE 70
3+
EXPOSE 80
44
CMD ["nginx", "-c", "external.conf", "-g", "daemon off;"]

inbound-gateway/nginx.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ http {
2323
}
2424

2525
server {
26-
listen 70;
26+
listen 80;
2727

2828
location / {
2929
proxy_pass http://peerprep/;
3030
proxy_set_header Host $host;
3131
proxy_set_header X-Real-IP $remote_addr;
3232
proxy_set_header X-Forwarded-Proto $scheme;
33-
proxy_set_header X-Forwarded-Host $host:70;
33+
proxy_set_header X-Forwarded-Host $host; # port 80 implicitly removes this port
3434
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
3535
proxy_http_version 1.1;
3636
proxy_set_header Upgrade $http_upgrade;

nginx/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
FROM nginx:alpine
22
COPY nginx.conf /etc/nginx/internal.conf
3-
EXPOSE 80
3+
EXPOSE 70
44
CMD ["nginx", "-c", "internal.conf", "-g", "daemon off;"]

nginx/nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ http {
4949
# }
5050

5151
server {
52-
listen 80;
52+
listen 70;
5353
location / {
5454
proxy_pass http://peerprep/;
5555
proxy_set_header Host $host;

0 commit comments

Comments
 (0)