feat(sre): Next.js frontend + HTTPS + full API routing for sre.aitbek.tech - #1
Closed
Newterios wants to merge 12 commits into
Closed
feat(sre): Next.js frontend + HTTPS + full API routing for sre.aitbek.tech#1Newterios wants to merge 12 commits into
Newterios wants to merge 12 commits into
Conversation
…add SRE demo Makefile targets - ci-cd.yml: bump go-version 1.22 → 1.25 to match go.work/go.mod requirements - ci-cd.yml: add fail-fast:false to build-images matrix so one failure doesn't cancel all images - sre/Makefile: add demo-destroy / demo-pull / demo-ansible / demo-docker-build / demo-k8s-up / demo-swarm-up / demo-health / demo-full targets for live presentation following the whiteboard steps (branch→team1/2/3) - sre/ansible/inventory.ini: set real server IP (13.63.140.216 / aitbek.tech) - scripts/setup-server.sh: new one-time bootstrap script (Docker+k3s+Ansible+clone) - scripts/deploy-to-server.sh: add SSH_KEY support via env var - sre/final_team/REPORT.md: update final SRE report - sre/final_team/presentation/PRESENTATION.md: update presentation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…sitory names github.repository returns 'Newterios/educationalLMS_general' with mixed case. Add a step to normalise it to lowercase before building/pushing images. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
$GITHUB_ENV does not override workflow-level env: in with: blocks. Switch to step output (id: repo / steps.repo.outputs.name) which is guaranteed to propagate to subsequent steps' with: fields. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eps.repo.outputs.name Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
add_header with return 200 doesn't override nginx default application/octet-stream — browser was downloading instead of rendering. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- sre/docker-compose.sre.yml: add web service (Next.js) with SRE API URL - sre/nginx/default.conf: proxy / to edulmsv2-web:3000 instead of static HTML - sre/Makefile: include --profile web in all compose commands - ci-cd.yml: add web image to build matrix with NEXT_PUBLIC_API_URL build-arg Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
gateway is under profiles:[services]; web depends on it but sre compose only activates --profile web. Override depends_on to empty so compose does not try to activate an out-of-profile service. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Cannot override depends_on from parent compose file. Use a separate service name sre-web that builds the same context without inheriting depends_on:gateway from docker-compose.dev.yml web service. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add gateway_upstream (edulmsv2-gateway:9080) to handle all /api/ calls so the frontend can reach auth/course/etc. Payment and profile routes remain specific matches that take priority over the general /api/ route. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…entation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
add_header Content-Type text/htmlwithreturn 200caused browsers to download the page as a file instead of rendering it. Fixed withdefault_type text/html.sre-webservice tosre/docker-compose.sre.ymlthat buildsweb/(Next.js 14) withNEXT_PUBLIC_API_URL=https://sre.aitbek.techbaked in at build time.gateway_upstream(edulmsv2-gateway:9080) so all/api/*calls (auth, course, assessment) route correctly through the container nginx, not just payment and profile.sre.aitbek.techobtained via certbot (--nginxplugin). HTTP → HTTPS redirect active. Certificate auto-renews (expires 2026-08-19).sre/DEFENSE.mdcovers ТЗ/ТС, all components, Docker/K8s/Ansible/Terraform/CI-CD structure, live URLs, and a 30-second verbal answer for the university defense.Live endpoints (all returning 200)
Test plan
curl -sI https://sre.aitbek.tech/returnsContent-Type: text/htmlcurl https://sre.aitbek.tech/api/payments/healthreturns{"service":"payment","status":"ok"}curl https://sre.aitbek.tech/api/profiles/healthreturns{"service":"user-profile","status":"ok"}curl -I http://sre.aitbek.techreturns301🤖 Generated with Claude Code