fix: HTTPS permanent in pipeline, refined dark theme, 16px font

This commit is contained in:
ikechukwu Elizabeth
2026-06-01 19:37:24 +01:00
parent 5f8922cb23
commit ee5b28fb35
4 changed files with 37 additions and 16 deletions
+8 -3
View File
@@ -346,8 +346,12 @@ jobs:
"echo \"--- Starting backend ---\"", "echo \"--- Starting backend ---\"",
"docker run -d --name task-backend --restart unless-stopped -p 3000:3000 -e DB_HOST=$DB_HOST -e DB_PORT=5432 -e DB_NAME=$DB_NAME -e DB_USER=$DB_USER -e DB_PASSWORD=$DB_PASSWORD -e DB_SSL=true -e JWT_SECRET=$JWT_SECRET 424522917561.dkr.ecr.us-east-1.amazonaws.com/task-backend:latest", "docker run -d --name task-backend --restart unless-stopped -p 3000:3000 -e DB_HOST=$DB_HOST -e DB_PORT=5432 -e DB_NAME=$DB_NAME -e DB_USER=$DB_USER -e DB_PASSWORD=$DB_PASSWORD -e DB_SSL=true -e JWT_SECRET=$JWT_SECRET 424522917561.dkr.ecr.us-east-1.amazonaws.com/task-backend:latest",
"sleep 5", "sleep 5",
"echo \"--- Starting frontend ---\"", "echo \"--- Starting frontend with HTTPS ---\"",
"docker run -d --name task-frontend --restart unless-stopped -p 80:80 --link task-backend:backend 424522917561.dkr.ecr.us-east-1.amazonaws.com/task-frontend:latest", "docker run -d --name task-frontend --restart unless-stopped -p 80:80 -p 443:443 -v /etc/letsencrypt:/etc/letsencrypt:ro --link task-backend:backend 424522917561.dkr.ecr.us-east-1.amazonaws.com/task-frontend:latest",
"sleep 3",
"echo \"--- Applying HTTPS nginx config ---\"",
"docker exec task-frontend sh -c \"cat > /etc/nginx/conf.d/default.conf << 'NGINXEOF'\nserver {\n listen 80;\n server_name taskflow.lizzycloudlab.online lizzycloudlab.online;\n return 301 https://\\$host\\$request_uri;\n}\nserver {\n listen 443 ssl;\n server_name taskflow.lizzycloudlab.online lizzycloudlab.online;\n ssl_certificate /etc/letsencrypt/live/taskflow.lizzycloudlab.online/fullchain.pem;\n ssl_certificate_key /etc/letsencrypt/live/taskflow.lizzycloudlab.online/privkey.pem;\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_ciphers HIGH:!aNULL:!MD5;\n location / { root /usr/share/nginx/html; index index.html; try_files \\$uri \\$uri/ /index.html; }\n location /api/ { proxy_pass http://backend:3000; proxy_http_version 1.1; proxy_set_header Host \\$host; proxy_set_header X-Real-IP \\$remote_addr; }\n}\nNGINXEOF\"",
"docker exec task-frontend nginx -s reload",
"echo \"--- Deployment complete ---\"", "echo \"--- Deployment complete ---\"",
"docker ps" "docker ps"
]' \ ]' \
@@ -395,6 +399,7 @@ jobs:
echo "### Deployment Complete - $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_STEP_SUMMARY echo "### Deployment Complete - $(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY
echo "- New images pulled from ECR" >> $GITHUB_STEP_SUMMARY echo "- New images pulled from ECR" >> $GITHUB_STEP_SUMMARY
echo "- Containers restarted with latest images" >> $GITHUB_STEP_SUMMARY echo "- Containers restarted with HTTPS enabled" >> $GITHUB_STEP_SUMMARY
echo "- SSL certificate mounted from Let's Encrypt" >> $GITHUB_STEP_SUMMARY
echo "- Secrets fetched from SSM Parameter Store" >> $GITHUB_STEP_SUMMARY echo "- Secrets fetched from SSM Parameter Store" >> $GITHUB_STEP_SUMMARY
echo "- Instance: \`${{ env.EC2_INSTANCE_ID }}\`" >> $GITHUB_STEP_SUMMARY echo "- Instance: \`${{ env.EC2_INSTANCE_ID }}\`" >> $GITHUB_STEP_SUMMARY
+15
View File
@@ -1,5 +1,20 @@
# Redirect HTTP to HTTPS
server { server {
listen 80; listen 80;
server_name taskflow.lizzycloudlab.online lizzycloudlab.online;
return 301 https://$host$request_uri;
}
# HTTPS server
server {
listen 443 ssl;
server_name taskflow.lizzycloudlab.online lizzycloudlab.online;
ssl_certificate /etc/letsencrypt/live/taskflow.lizzycloudlab.online/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/taskflow.lizzycloudlab.online/privkey.pem;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
location / { location / {
root /usr/share/nginx/html; root /usr/share/nginx/html;
+7 -6
View File
@@ -6,10 +6,10 @@
/* ---- CSS variables ---- */ /* ---- CSS variables ---- */
:root { :root {
--bg: #0a0b0f; --bg: #0d0f14;
--surface: #111318; --surface: #13151c;
--surface2: #16181f; --surface2: #1a1d26;
--border: #1e2028; --border: #252836;
--accent: #6366f1; --accent: #6366f1;
--accent-dim: rgba(99,102,241,0.12); --accent-dim: rgba(99,102,241,0.12);
--green: #22c55e; --green: #22c55e;
@@ -17,8 +17,8 @@
--red: #ef4444; --red: #ef4444;
--red-dim: rgba(239,68,68,0.12); --red-dim: rgba(239,68,68,0.12);
--text: #f1f5f9; --text: #f1f5f9;
--text-2: #94a3b8; --text-2: #a8b4c8;
--text-3: #3d4257; --text-3: #545970;
} }
/* ---- Base resets ---- */ /* ---- Base resets ---- */
@@ -32,6 +32,7 @@ html { scroll-behavior: smooth; }
body { body {
font-family: 'DM Sans', sans-serif; font-family: 'DM Sans', sans-serif;
font-size: 16px;
background: var(--bg); background: var(--bg);
color: var(--text); color: var(--text);
min-height: 100vh; min-height: 100vh;
+6 -6
View File
@@ -7,10 +7,10 @@ export default {
theme: { theme: {
extend: { extend: {
colors: { colors: {
bg: "#0a0b0f", bg: "#0d0f14",
surface: "#111318", surface: "#13151c",
surface2: "#16181f", surface2: "#1a1d26",
border: "#1e2028", border: "#252836",
accent: "#6366f1", accent: "#6366f1",
"accent-hover": "#4f46e5", "accent-hover": "#4f46e5",
"accent-dim": "rgba(99,102,241,0.12)", "accent-dim": "rgba(99,102,241,0.12)",
@@ -19,8 +19,8 @@ export default {
red: "#ef4444", red: "#ef4444",
"red-dim": "rgba(239,68,68,0.12)", "red-dim": "rgba(239,68,68,0.12)",
text1: "#f1f5f9", text1: "#f1f5f9",
text2: "#94a3b8", text2: "#a8b4c8",
text3: "#3d4257", text3: "#545970",
}, },
fontFamily: { fontFamily: {
display: ["Syne", "sans-serif"], display: ["Syne", "sans-serif"],