Merge branch '34-prod-exposed-ports' into 'main'

Resolve "prod exposed ports"

Closes #34

See merge request ekresse/htwkalender!24
This commit is contained in:
ekresse
2024-03-03 18:14:40 +00:00
3 changed files with 17 additions and 6 deletions

View File

@ -26,7 +26,7 @@ lint-backend:
- cd backend
- go mod download
- golangci-lint --version
- golangci-lint run -v --skip-dirs=migrations
- golangci-lint run -v --skip-dirs=migrations --timeout=5m
build-backend:

View File

@ -6,20 +6,19 @@ services:
command: "--http=0.0.0.0:8090 --dir=/htwkalender/data/pb_data"
pull_policy: always
restart: always
# open port 8090
ports:
- "8090:8090"
volumes:
- pb_data:/htwkalender/data
networks:
- "net"
htwkalender-frontend:
image: DOCKER_REGISTRY_REPO:frontend # DOCKER_REGISTRY_REPO will be replaced by CI
pull_policy: always
restart: always
ports:
- "8000:8000"
depends_on:
- htwkalender-backend
networks:
- "net"
rproxy:
image: bitnami/nginx:1.25
@ -31,6 +30,12 @@ services:
- htwkalender-frontend
ports:
- "80:80"
networks:
- "net"
volumes:
pb_data:
networks:
net:
external: true

View File

@ -34,6 +34,10 @@ http {
set_real_ip_from 2405:8100::/32;
set_real_ip_from 2a06:98c0::/29;
set_real_ip_from 2c0f:f248::/32;
# Docker IP Ranges (https://docs.docker.com/network/iptables/)
set_real_ip_from 172.16.0.0/12;
real_ip_header CF-Connecting-IP;
access_log /opt/bitnami/nginx/logs/proxy_access.log;
@ -204,6 +208,8 @@ http {
if ($admin) {
return 404 "Not Found";
}
# Increase upload file size
client_max_body_size 100m;
}
location / {