feat: add dynamic dialog max width to ModalDialog component
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m45s
All checks were successful
Chore App Build, Test, and Push Docker Images / build-and-push (push) Successful in 2m45s
This commit is contained in:
@@ -29,9 +29,10 @@ services:
|
|||||||
chores-test-app-frontend: # Test frontend service name
|
chores-test-app-frontend: # Test frontend service name
|
||||||
image: git.ryankegel.com:3000/kegel/chores/frontend:next # Use latest next tag
|
image: git.ryankegel.com:3000/kegel/chores/frontend:next # Use latest next tag
|
||||||
ports:
|
ports:
|
||||||
- "446:443" # Host 446 -> Container 443 (HTTPS)
|
- "446:80" # Host 446 -> Container 80 (HTTP behind external TLS proxy)
|
||||||
environment:
|
environment:
|
||||||
- BACKEND_HOST=chores-test-app-backend # Points to internal backend service
|
- BACKEND_HOST=chores-test-app-backend # Points to internal backend service
|
||||||
|
- FRONTEND_SSL_ENABLED=false
|
||||||
depends_on:
|
depends_on:
|
||||||
- chores-test-app-backend
|
- chores-test-app-backend
|
||||||
# Add volumes, networks, etc., as needed
|
# Add volumes, networks, etc., as needed
|
||||||
|
|||||||
@@ -25,9 +25,10 @@ services:
|
|||||||
image: git.ryankegel.com:3000/kegel/chores/frontend:latest # Or specific version tag
|
image: git.ryankegel.com:3000/kegel/chores/frontend:latest # Or specific version tag
|
||||||
container_name: chores-app-frontend-prod # Added for easy identification
|
container_name: chores-app-frontend-prod # Added for easy identification
|
||||||
ports:
|
ports:
|
||||||
- "${FRONTEND_HOST_PORT:-4601}:443" # Host port -> Container 443 (HTTPS)
|
- "${FRONTEND_HOST_PORT:-4601}:${FRONTEND_CONTAINER_PORT:-443}" # Host port -> Container 443 (HTTPS) or 80 (HTTP)
|
||||||
environment:
|
environment:
|
||||||
- BACKEND_HOST=chores-app-backend # Points to internal backend service
|
- BACKEND_HOST=chores-app-backend # Points to internal backend service
|
||||||
|
- FRONTEND_SSL_ENABLED=${FRONTEND_SSL_ENABLED:-true}
|
||||||
depends_on:
|
depends_on:
|
||||||
- chores-app-backend
|
- chores-app-backend
|
||||||
networks:
|
networks:
|
||||||
|
|||||||
@@ -10,17 +10,15 @@ RUN npm run build
|
|||||||
FROM nginx:alpine
|
FROM nginx:alpine
|
||||||
COPY --from=build /app/dist /usr/share/nginx/html
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
||||||
# Copy SSL certificate and key
|
COPY nginx.http.conf.template /etc/nginx/nginx.http.conf.template
|
||||||
#COPY 192.168.1.102+1.pem /etc/nginx/ssl/server.crt
|
COPY docker/start-nginx.sh /docker/start-nginx.sh
|
||||||
#COPY 192.168.1.102+1-key.pem /etc/nginx/ssl/server.key
|
RUN chmod +x /docker/start-nginx.sh
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
EXPOSE 443
|
EXPOSE 443
|
||||||
# Copy nginx.conf
|
|
||||||
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
|
||||||
|
|
||||||
# Set default BACKEND_HOST (can be overridden at runtime)
|
# Set default runtime values (can be overridden at runtime)
|
||||||
ENV BACKEND_HOST=chore-app-backend
|
ENV BACKEND_HOST=chore-app-backend
|
||||||
|
ENV FRONTEND_SSL_ENABLED=true
|
||||||
|
|
||||||
# Use sed to replace $BACKEND_HOST with the env value, then start Nginx
|
CMD ["/docker/start-nginx.sh"]
|
||||||
CMD ["/bin/sh", "-c", "sed 's/\\$BACKEND_HOST/'\"$BACKEND_HOST\"'/g' /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf && nginx -g 'daemon off;'"]
|
|
||||||
|
|||||||
18
frontend/docker/start-nginx.sh
Normal file
18
frontend/docker/start-nginx.sh
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
backend_host="${BACKEND_HOST:-chore-app-backend}"
|
||||||
|
ssl_enabled="$(printf '%s' "${FRONTEND_SSL_ENABLED:-true}" | tr '[:upper:]' '[:lower:]')"
|
||||||
|
|
||||||
|
template_file="/etc/nginx/nginx.http.conf.template"
|
||||||
|
|
||||||
|
case "$ssl_enabled" in
|
||||||
|
1|true|yes|on)
|
||||||
|
template_file="/etc/nginx/nginx.conf.template"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
sed "s|\$BACKEND_HOST|${backend_host}|g" "$template_file" > /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
nginx -t
|
||||||
|
exec nginx -g 'daemon off;'
|
||||||
@@ -2,20 +2,20 @@
|
|||||||
"cookies": [
|
"cookies": [
|
||||||
{
|
{
|
||||||
"name": "refresh_token",
|
"name": "refresh_token",
|
||||||
"value": "dBbCt9vi-FCh7U6UBtBxlLj6LzrHM07A-Tt9g7lc5vI",
|
"value": "FZULMCV2SqB1TurS_72i4vCGjYXmL4rQzTvtKFODS-c",
|
||||||
"domain": "localhost",
|
"domain": "localhost",
|
||||||
"path": "/api/auth",
|
"path": "/api/auth",
|
||||||
"expires": 1785439751.941889,
|
"expires": 1784993494.828813,
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "Strict"
|
"sameSite": "Strict"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "access_token",
|
"name": "access_token",
|
||||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS1jY0B0ZXN0LmNvbSIsInVzZXJfaWQiOiJhZjY4NTM2Ny1hZGI1LTRiN2ItYWI2OC0zM2QzMGY4OWU1NDkiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3Nzc2NzQ1NTF9.gvhv1GLxMgANWlVK9gIn1q7bJ3Krbw2qtXf7jTjV-Ig",
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS1jY0B0ZXN0LmNvbSIsInVzZXJfaWQiOiJiMTkyZDgzZS1mMTQyLTRhZjQtYjAyNC02YzdiNzFmNzFlYjYiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3NzcyMTgzOTR9.7JsdzTZDZd8qErp-GiAaYfU92jCb1L5ROGZXpEaz-dc",
|
||||||
"domain": "localhost",
|
"domain": "localhost",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"expires": 1777674551.941821,
|
"expires": 1777218394.827404,
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "Lax"
|
"sameSite": "Lax"
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
"localStorage": [
|
"localStorage": [
|
||||||
{
|
{
|
||||||
"name": "authSyncEvent",
|
"name": "authSyncEvent",
|
||||||
"value": "{\"type\":\"logout\",\"at\":1777663751805}"
|
"value": "{\"type\":\"logout\",\"at\":1777217494503}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "parentAuth",
|
"name": "parentAuth",
|
||||||
"value": "{\"expiresAt\":1777836552105}"
|
"value": "{\"expiresAt\":1777390295394}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,20 +2,20 @@
|
|||||||
"cookies": [
|
"cookies": [
|
||||||
{
|
{
|
||||||
"name": "refresh_token",
|
"name": "refresh_token",
|
||||||
"value": "RgOQUW4r8HHf0oRC7CkS7N_ai16ldte8wZ4vqEnbykA",
|
"value": "tTh7qrpLh9RjQNVxmjhfQi0VOQwbLa4PJ8xfjlMC9P8",
|
||||||
"domain": "localhost",
|
"domain": "localhost",
|
||||||
"path": "/api/auth",
|
"path": "/api/auth",
|
||||||
"expires": 1785439751.938223,
|
"expires": 1784993494.703215,
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "Strict"
|
"sameSite": "Strict"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "access_token",
|
"name": "access_token",
|
||||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS1kZWxldGVAdGVzdC5jb20iLCJ1c2VyX2lkIjoiOTEwNzc3MGMtOGI5MC00MmM0LWE5MmUtNGRhN2UzMmM3MTdiIiwidG9rZW5fdmVyc2lvbiI6MCwiZXhwIjoxNzc3Njc0NTUxfQ.ywvqlx64QlwBSC9JmoWhGZv6_JFMVgyZ0VV5CHlgUEo",
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZS1kZWxldGVAdGVzdC5jb20iLCJ1c2VyX2lkIjoiMGY4YzE2YzUtN2ZlNy00ZGZiLWE4ZmMtMTc3NjQ5MDkxOWI4IiwidG9rZW5fdmVyc2lvbiI6MCwiZXhwIjoxNzc3MjE4Mzk0fQ.zSLSZsWZb9N1En9mWCqXxM9d__U7JldwT8pCKaoxzUc",
|
||||||
"domain": "localhost",
|
"domain": "localhost",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"expires": 1777674551.938155,
|
"expires": 1777218394.702339,
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "Lax"
|
"sameSite": "Lax"
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
"localStorage": [
|
"localStorage": [
|
||||||
{
|
{
|
||||||
"name": "authSyncEvent",
|
"name": "authSyncEvent",
|
||||||
"value": "{\"type\":\"logout\",\"at\":1777663751795}"
|
"value": "{\"type\":\"logout\",\"at\":1777217494445}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "parentAuth",
|
"name": "parentAuth",
|
||||||
"value": "{\"expiresAt\":1777836552105}"
|
"value": "{\"expiresAt\":1777390295182}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,20 +2,20 @@
|
|||||||
"cookies": [
|
"cookies": [
|
||||||
{
|
{
|
||||||
"name": "refresh_token",
|
"name": "refresh_token",
|
||||||
"value": "4Wf4BWiljd-T-9TdZStP2DmwF1-8Gj9YTWriMyUzrVU",
|
"value": "iBgMbKeAn8p8X9iS6eumIZHEqKN0yqMKZ09V6nk7s-U",
|
||||||
"domain": "localhost",
|
"domain": "localhost",
|
||||||
"path": "/api/auth",
|
"path": "/api/auth",
|
||||||
"expires": 1785439750.178407,
|
"expires": 1784993490.715252,
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "Strict"
|
"sameSite": "Strict"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "access_token",
|
"name": "access_token",
|
||||||
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZUB0ZXN0LmNvbSIsInVzZXJfaWQiOiIzMTdhMDQyZS0yNGNhLTQ1MzUtODZmNC1lY2FiZWYwODIyM2MiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3Nzc2NzQ1NTB9.XQxqXaYlr21DEuuKes0AFHvuWeJvlOTwFpruuhsxacs",
|
"value": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImUyZUB0ZXN0LmNvbSIsInVzZXJfaWQiOiJhM2ZlZjRmNS01MTc4LTRlYWEtOWU0NC1jZjk2MGJiMGQ3ZTkiLCJ0b2tlbl92ZXJzaW9uIjowLCJleHAiOjE3NzcyMTgzOTB9.PtdzVvtN6rMWPOTS6OfGc8tVSrihktnT2GhVIwKollc",
|
||||||
"domain": "localhost",
|
"domain": "localhost",
|
||||||
"path": "/",
|
"path": "/",
|
||||||
"expires": 1777674550.178361,
|
"expires": 1777218390.714722,
|
||||||
"httpOnly": true,
|
"httpOnly": true,
|
||||||
"secure": true,
|
"secure": true,
|
||||||
"sameSite": "Lax"
|
"sameSite": "Lax"
|
||||||
@@ -27,11 +27,11 @@
|
|||||||
"localStorage": [
|
"localStorage": [
|
||||||
{
|
{
|
||||||
"name": "authSyncEvent",
|
"name": "authSyncEvent",
|
||||||
"value": "{\"type\":\"logout\",\"at\":1777663750032}"
|
"value": "{\"type\":\"logout\",\"at\":1777217490520}"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "parentAuth",
|
"name": "parentAuth",
|
||||||
"value": "{\"expiresAt\":1777836550307}"
|
"value": "{\"expiresAt\":1777390290893}"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
37
frontend/nginx.http.conf.template
Normal file
37
frontend/nginx.http.conf.template
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
events {}
|
||||||
|
|
||||||
|
http {
|
||||||
|
include /etc/nginx/mime.types;
|
||||||
|
default_type application/octet-stream;
|
||||||
|
|
||||||
|
server {
|
||||||
|
client_max_body_size 2M;
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
|
||||||
|
location /api/ {
|
||||||
|
proxy_pass http://$BACKEND_HOST:5000/;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /events {
|
||||||
|
proxy_pass http://$BACKEND_HOST:5000/events;
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header Connection '';
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
chunked_transfer_encoding off;
|
||||||
|
proxy_buffering off;
|
||||||
|
proxy_cache off;
|
||||||
|
proxy_read_timeout 36000s;
|
||||||
|
proxy_send_timeout 36000s;
|
||||||
|
}
|
||||||
|
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.html;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user