Try to fix connectivity issues
Some checks failed
Podman Rootless Demo / test-backend (push) Has been skipped
Podman Rootless Demo / test-frontend (push) Has been skipped
Podman Rootless Demo / build-backend (push) Has been skipped
Podman Rootless Demo / build-frontend (push) Has been skipped
Podman Rootless Demo / deploy-prod (push) Failing after 31s

This commit is contained in:
continuist 2025-09-21 00:20:10 -04:00
parent 78966329e3
commit 4feb39dfe3
2 changed files with 23 additions and 23 deletions

View file

@ -73,7 +73,7 @@ spec:
drop: ["ALL"] drop: ["ALL"]
env: env:
- name: DATABASE_URL - name: DATABASE_URL
value: "postgres://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DATABASE_NAME}?sslmode=disable" value: "postgres://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@127.0.0.1:${POSTGRES_PORT}/${POSTGRES_DATABASE_NAME}?sslmode=disable"
- name: PORT - name: PORT
value: "${PROD_BACKEND_PORT}" value: "${PROD_BACKEND_PORT}"
ports: ports:
@ -162,7 +162,6 @@ spec:
runAsGroup: 1000 runAsGroup: 1000
ports: ports:
- containerPort: 8080 # inside pod - containerPort: 8080 # inside pod
- containerPort: 8090 # health inside pod (not exposed)
volumeMounts: volumeMounts:
- { name: nginx-run, mountPath: /var/run, readOnly: false } - { name: nginx-run, mountPath: /var/run, readOnly: false }
- { name: nginx-cache, mountPath: /var/cache/nginx, readOnly: false } - { name: nginx-cache, mountPath: /var/cache/nginx, readOnly: false }
@ -171,7 +170,7 @@ spec:
mountPath: /tmp mountPath: /tmp
# Health check # Health check
livenessProbe: livenessProbe:
httpGet: { path: /healthz, port: 8090, scheme: HTTP } httpGet: { path: /healthz, port: 8080, scheme: HTTP }
initialDelaySeconds: 10 initialDelaySeconds: 10
periodSeconds: 30 periodSeconds: 30
# Resource limits # Resource limits

View file

@ -15,34 +15,35 @@ http {
uwsgi_temp_path /tmp/uwsgi_temp; uwsgi_temp_path /tmp/uwsgi_temp;
scgi_temp_path /tmp/scgi_temp; scgi_temp_path /tmp/scgi_temp;
# health
server {
listen 8090;
location = /healthz { return 200 "ok\n"; add_header Content-Type text/plain; }
}
# public HTTP entrypoint (host will terminate TLS and proxy here) # public HTTP entrypoint (host will terminate TLS and proxy here)
server { server {
listen 8080; listen 8080;
# exact-match: wins over everything else in this server
location = /healthz {
access_log off;
add_header Content-Type text/plain;
return 200 "ok\n";
}
# frontend default # frontend default
location / { location / {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection ""; proxy_set_header Connection "";
proxy_pass http://127.0.0.1:${PROD_FRONTEND_PORT}; proxy_pass http://127.0.0.1:${PROD_FRONTEND_PORT};
} }
# backend API # backend API
location /api/ { location /api/ {
proxy_http_version 1.1; proxy_http_version 1.1;
proxy_set_header Host $host; proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme; proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Connection ""; proxy_set_header Connection "";
proxy_pass http://127.0.0.1:${PROD_BACKEND_PORT}/; proxy_pass http://127.0.0.1:${PROD_BACKEND_PORT}/;
}
} }
}
} }