From 6d0b586a6f23e3851d771c1f019144d6ccf1229f Mon Sep 17 00:00:00 2001 From: Weilai Wang <38804125+miku-wwl@users.noreply.github.com> Date: Sat, 23 May 2026 15:40:44 +1200 Subject: [PATCH 1/6] fix:nginx --- compose.override.yml | 2 +- frontend/nginx-backend-not-found.conf | 23 ++++++++++++++++++++--- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/compose.override.yml b/compose.override.yml index 779cc8238d..91328db071 100644 --- a/compose.override.yml +++ b/compose.override.yml @@ -101,7 +101,7 @@ services: context: . dockerfile: frontend/Dockerfile args: - - VITE_API_URL=http://localhost:8000 + - VITE_API_URL= - NODE_ENV=development playwright: diff --git a/frontend/nginx-backend-not-found.conf b/frontend/nginx-backend-not-found.conf index f6fea66358..0c15220164 100644 --- a/frontend/nginx-backend-not-found.conf +++ b/frontend/nginx-backend-not-found.conf @@ -1,9 +1,26 @@ +resolver 127.0.0.11 ipv6=off; + location /api { - return 404; + set $backend http://backend:8000; + proxy_pass $backend; + 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 /docs { - return 404; + set $backend http://backend:8000; + proxy_pass $backend; + 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 /redoc { - return 404; + set $backend http://backend:8000; + proxy_pass $backend; + 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; } From 488c7a360d6e8bc1209f2763e90775d5e16d3fcd Mon Sep 17 00:00:00 2001 From: Weilai Wang <38804125+miku-wwl@users.noreply.github.com> Date: Tue, 26 May 2026 10:22:54 +1200 Subject: [PATCH 2/6] update:ignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index f903ab6066..e1c7a4e5ad 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +.idea/ +.DS_Store .vscode/* !.vscode/extensions.json node_modules/ From be0ab712c43b46dc738e1cff2e1eaee511da286d Mon Sep 17 00:00:00 2001 From: wz4satan Date: Fri, 29 May 2026 23:02:49 +1200 Subject: [PATCH 3/6] =?UTF-8?q?docs:=20=E6=96=B0=E5=A2=9E=20Assess2=20Prop?= =?UTF-8?q?osals=20=E8=AE=BE=E8=AE=A1=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- documentation/Proposals.md | 66 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 documentation/Proposals.md diff --git a/documentation/Proposals.md b/documentation/Proposals.md new file mode 100644 index 0000000000..45aeb24eb6 --- /dev/null +++ b/documentation/Proposals.md @@ -0,0 +1,66 @@ +# Proposal 1 +## Project Title +CiteSync: Academic Knowledge and Citation Management API + +## Introduction +Graduate students and researchers often struggle with organizing complex literature references and adhering to strict academic formatting rules, such as the APA 7th edition. The objective of this project is to develop a centralized knowledge management system that stores academic metadata, parses reading notes, and automatically generates properly formatted bibliographies. The expected benefit is a significant reduction in manual formatting errors and a highly streamlined workflow for academic writing and research tracking. + +## Technologies and Tools Used +The project will be built using the FastAPI full-stack template: + +- **Backend**: Python and FastAPI to process metadata and handle the formatting logic. + +- **Frontend**: React for a clean UI where users can input literature details and tag notes. + +- **Database**: PostgreSQL to map complex many-to-many relationships between authors, publications, and user notes. + +- **Formatting Engine**: Python libraries (such as citeproc-py) integrated with the API to dynamically render citations in standard academic formats. + +## Final Outcome +The deliverable will be a full-stack web application featuring a robust literature repository. Users will be able to input, search, and categorize academic papers. The system will feature an export module that compiles selected references into a dynamically generated, perfectly formatted bibliography, meeting the strict requirements of modern academic research. + +# Proposal 2 +## Project Title +FinLaw: Automated Financial Compliance Document Workflow System + +## Introduction +The financial sector requires rigorous adherence to legal and regulatory compliance, which often involves the manual review of extensive documentation. The problem being addressed is the inefficiency and high risk of human error associated with manual compliance checks. The objective of this project is to develop an automated workflow system that manages, tracks, and flags financial documents for legal compliance review. The expected benefit is a significant reduction in administrative overhead, improved accuracy in identifying compliance risks, and a streamlined auditing process for financial institutions. + +## Technologies and Tools Used +This project will be built upon the provided FastAPI full-stack template. + +- **Backend**: Python and FastAPI for high-performance, asynchronous API endpoints. + +- **Frontend**: React (integrated within the template) to build an interactive administrative dashboard. + +- **Database**: PostgreSQL for robust, relational data storage of document metadata and compliance logs, replacing lightweight solutions like SQLite3 for production readiness. + +- **ORM & Data Validation**: SQLModel/SQLAlchemy and Pydantic for strict data typing and database interactions. + +- **Containerization**: Docker and Docker Compose for consistent deployment and environment management. + +## Final Outcome +The final deliverable will be a deployed full-stack web application featuring a user-friendly dashboard. The system will allow users to upload document records, track their compliance status through a Kanban-style workflow, and generate automated compliance reports. It will successfully meet the project objectives by providing a centralized, secure, and efficient platform for managing financial legal documentation workflows. + +# Proposal 3 +## Project Title +ForeXchange: Full-Stack Real-Time Currency Conversion and Remittance Dashboard + +## Introduction +While basic money exchange applications handle simple conversions, real-world remittance requires scalable architecture, real-time rate tracking, and secure transaction management. This project addresses the lack of accessible, full-stack solutions for tracking cross-border currency exchanges efficiently. The objective is to engineer a robust currency exchange platform that handles user authentication, live rate simulations, and secure transaction histories. The expected impact is providing users with a transparent, fast, and reliable tool for managing foreign exchange operations and remittance planning. + +## Technologies and Tools Used +The solution will leverage the modern Python web ecosystem via the FastAPI template. + +- **Core Backend**: Python 3 and FastAPI to handle RESTful API requests and complex currency conversion logic. + +- **Frontend**: React for a responsive, single-page application (SPA) interface. + +- **Database Management**: PostgreSQL to handle transactional data securely, migrating away from flat-file or local databases to a true client-server architecture. + +- **Authentication**: OAuth2 with password flow and JWT tokens (built into the FastAPI template) for secure user session management. + +- **Deployment**: Dockerized microservices orchestrated with Traefik for reverse proxy and load balancing. + +## Final Outcome +The expected outcome is a fully functional web-based prototype of a currency exchange platform. It will include a secure login system, an interactive dashboard displaying currency trends, and a module for executing and recording simulated money exchange transactions. This will meet the user requirements for a secure, database-driven financial application built on modern software engineering principles. \ No newline at end of file From 16e9bddfc7cbc31223293e424ff51e857a958982 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Fri, 29 May 2026 11:24:43 +0000 Subject: [PATCH 4/6] =?UTF-8?q?=F0=9F=8E=A8=20Auto=20format=20and=20update?= =?UTF-8?q?=20with=20pre-commit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- documentation/Proposals.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/Proposals.md b/documentation/Proposals.md index 45aeb24eb6..d7ddead8aa 100644 --- a/documentation/Proposals.md +++ b/documentation/Proposals.md @@ -63,4 +63,4 @@ The solution will leverage the modern Python web ecosystem via the FastAPI templ - **Deployment**: Dockerized microservices orchestrated with Traefik for reverse proxy and load balancing. ## Final Outcome -The expected outcome is a fully functional web-based prototype of a currency exchange platform. It will include a secure login system, an interactive dashboard displaying currency trends, and a module for executing and recording simulated money exchange transactions. This will meet the user requirements for a secure, database-driven financial application built on modern software engineering principles. \ No newline at end of file +The expected outcome is a fully functional web-based prototype of a currency exchange platform. It will include a secure login system, an interactive dashboard displaying currency trends, and a module for executing and recording simulated money exchange transactions. This will meet the user requirements for a secure, database-driven financial application built on modern software engineering principles. From 26485bc262ddf8c55cb1add803e1cf420d52da9b Mon Sep 17 00:00:00 2001 From: wz4satan Date: Sat, 30 May 2026 12:00:23 +1200 Subject: [PATCH 5/6] updated for proposals --- documentation/Proposals.md | 71 +++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 39 deletions(-) diff --git a/documentation/Proposals.md b/documentation/Proposals.md index d7ddead8aa..3298a62d7c 100644 --- a/documentation/Proposals.md +++ b/documentation/Proposals.md @@ -1,66 +1,59 @@ # Proposal 1 + ## Project Title -CiteSync: Academic Knowledge and Citation Management API +TradSync: Intelligent Job Management and Regulatory Compliance API for Trade Services ## Introduction -Graduate students and researchers often struggle with organizing complex literature references and adhering to strict academic formatting rules, such as the APA 7th edition. The objective of this project is to develop a centralized knowledge management system that stores academic metadata, parses reading notes, and automatically generates properly formatted bibliographies. The expected benefit is a significant reduction in manual formatting errors and a highly streamlined workflow for academic writing and research tracking. +Small-to-medium trade enterprises (plumbing, electrical, and carpentry businesses) in New Zealand face heavy administrative burdens complying with strict Health & Safety regulations and Building Code standards while managing daily workflows. The problem addressed is the high operational friction and legal risk associated with manual job tracking, onsite hazard assessments, and regulatory compliance logging. The objective of this project is to develop a centralized job management API that structures field notes, manages client service records, and automatically flags compliance/safety risks against statutory checklists before a job is signed off. The expected benefit is a significant reduction in administrative overhead for tradies, improved onsite safety tracking, and automated, legally sound documentation for council auditing. ## Technologies and Tools Used The project will be built using the FastAPI full-stack template: - -- **Backend**: Python and FastAPI to process metadata and handle the formatting logic. - -- **Frontend**: React for a clean UI where users can input literature details and tag notes. - -- **Database**: PostgreSQL to map complex many-to-many relationships between authors, publications, and user notes. - -- **Formatting Engine**: Python libraries (such as citeproc-py) integrated with the API to dynamically render citations in standard academic formats. +* **Backend:** Python and FastAPI to build asynchronous endpoints handling incoming job telemetry, materials logging, and automated compliance-checking algorithms. +* **Frontend:** React to build a responsive, scannable field-technician dashboard and an administrative command center for tracking active work sites. +* **Database:** PostgreSQL to map complex relational data models, including many-to-many relationships between jobs, field technicians, materials, hazard reports, and statutory compliance clauses. +* **Validation & Security:** Pydantic and SQLModel for rigid input sanitization (ensuring onsite safety data is complete), combined with OAuth2/JWT for role-based access control (separating Apprentices, Certified Tradesmen, and Auditors). ## Final Outcome -The deliverable will be a full-stack web application featuring a robust literature repository. Users will be able to input, search, and categorize academic papers. The system will feature an export module that compiles selected references into a dynamically generated, perfectly formatted bibliography, meeting the strict requirements of modern academic research. +The final deliverable will be a deployed full-stack job management prototype tailored for trade industries. Field workers can log job details, track billable hours, and complete interactive, rule-based site safe/compliance checklists. The system features an automated report exporter that compiles immutable job histories and compliance logs into structured summaries. This serves as a highly relevant portfolio piece for the booming construction-technology (ConTech) and regulatory-technology (RegTech) sectors. + +--- # Proposal 2 + ## Project Title -FinLaw: Automated Financial Compliance Document Workflow System +FinLaw: Automated Financial Compliance Workflow and Regulatory Audit System ## Introduction -The financial sector requires rigorous adherence to legal and regulatory compliance, which often involves the manual review of extensive documentation. The problem being addressed is the inefficiency and high risk of human error associated with manual compliance checks. The objective of this project is to develop an automated workflow system that manages, tracks, and flags financial documents for legal compliance review. The expected benefit is a significant reduction in administrative overhead, improved accuracy in identifying compliance risks, and a streamlined auditing process for financial institutions. +The financial sector requires rigorous adherence to volatile anti-money laundering (AML) laws and legal compliance frameworks, which currently involves highly inefficient, manual reviews of extensive documentation. This project addresses the operational bottleneck and high human-error risks associated with manual legal compliance checks. The objective is to engineer an automated, state-machine driven document workflow system that tracks, flags, and audits financial documents against predefined compliance rules. The expected impact is a drastic reduction in administrative overhead, institutional legal risks, and a bulletproof, software-driven auditing trail for financial institutions. ## Technologies and Tools Used -This project will be built upon the provided FastAPI full-stack template. - -- **Backend**: Python and FastAPI for high-performance, asynchronous API endpoints. - -- **Frontend**: React (integrated within the template) to build an interactive administrative dashboard. - -- **Database**: PostgreSQL for robust, relational data storage of document metadata and compliance logs, replacing lightweight solutions like SQLite3 for production readiness. - -- **ORM & Data Validation**: SQLModel/SQLAlchemy and Pydantic for strict data typing and database interactions. - -- **Containerization**: Docker and Docker Compose for consistent deployment and environment management. +This project will be built upon the provided FastAPI full-stack template: +* **Backend:** Python and FastAPI leveraging asynchronous endpoints to simulate concurrent document ingestion and high-performance parsing. +* **Frontend:** React to build an interactive administrative dashboard featuring an interactive Kanban workflow and compliance risk matrices. +* **Database:** PostgreSQL utilizing transactional isolation levels to guarantee the integrity of document metadata and immutable compliance logs, replacing lightweight solutions like SQLite3 for production-grade reliability. +* **ORM & Data Validation:** SQLModel/SQLAlchemy and Pydantic for rigid data-typing, schema enforcement, and input sanitization against legal data fields. +* **Containerization:** Docker and Docker Compose for consistent deployment pipelines and isolated environment management. ## Final Outcome -The final deliverable will be a deployed full-stack web application featuring a user-friendly dashboard. The system will allow users to upload document records, track their compliance status through a Kanban-style workflow, and generate automated compliance reports. It will successfully meet the project objectives by providing a centralized, secure, and efficient platform for managing financial legal documentation workflows. +The final deliverable will be a deployed full-stack compliance web application. The system will allow compliance officers to upload financial document records, transition them through a strict, rule-based Kanban workflow, and automatically generate structured, tamper-proof compliance audit reports. This system bridges the gap between legal rigor and software engineering, making it a highly relevant prototype for modern RegTech (Regulatory Technology) ecosystems. + +--- # Proposal 3 + ## Project Title -ForeXchange: Full-Stack Real-Time Currency Conversion and Remittance Dashboard +ForeXchange: High-Availability Real-Time Remittance and Compliance Telemetry Dashboard ## Introduction -While basic money exchange applications handle simple conversions, real-world remittance requires scalable architecture, real-time rate tracking, and secure transaction management. This project addresses the lack of accessible, full-stack solutions for tracking cross-border currency exchanges efficiently. The objective is to engineer a robust currency exchange platform that handles user authentication, live rate simulations, and secure transaction histories. The expected impact is providing users with a transparent, fast, and reliable tool for managing foreign exchange operations and remittance planning. +While basic currency applications handle simple static conversions, commercial cross-border remittance demands highly scalable architectures, real-time telemetry (rate tracking), and rigid compliance checks to prevent financial crime. This project addresses the lack of transparent, secure, and production-ready architectures for monitoring international money exchanges. The objective is to engineer a robust, database-driven foreign exchange platform that seamlessly handles concurrent user sessions, live rate simulations, automated fee compliance calculations, and immutable transaction histories. ## Technologies and Tools Used -The solution will leverage the modern Python web ecosystem via the FastAPI template. - -- **Core Backend**: Python 3 and FastAPI to handle RESTful API requests and complex currency conversion logic. - -- **Frontend**: React for a responsive, single-page application (SPA) interface. - -- **Database Management**: PostgreSQL to handle transactional data securely, migrating away from flat-file or local databases to a true client-server architecture. - -- **Authentication**: OAuth2 with password flow and JWT tokens (built into the FastAPI template) for secure user session management. - -- **Deployment**: Dockerized microservices orchestrated with Traefik for reverse proxy and load balancing. +The solution will leverage the modern Python web ecosystem via the FastAPI template: +* **Core Backend:** Python 3 and FastAPI utilizing background tasks to process algorithmic currency conversion and transactional compliance checking. +* **Frontend:** React for a responsive, state-managed single-page application (SPA) tracking live market fluctuations. +* **Database Management:** PostgreSQL with strict relational constraints to secure ledger data, migrating local SQLite3 prototypes to an enterprise client-server model. +* **Authentication & Security:** OAuth2 with Password Flow and JWT tokens integrated natively into the FastAPI pipeline to enforce secure, role-based user sessions (e.g., Customer vs. Compliance Auditor). +* **Deployment:** Dockerized microservices orchestrated with Traefik for automated reverse proxy, SSL termination, and load balancing. ## Final Outcome -The expected outcome is a fully functional web-based prototype of a currency exchange platform. It will include a secure login system, an interactive dashboard displaying currency trends, and a module for executing and recording simulated money exchange transactions. This will meet the user requirements for a secure, database-driven financial application built on modern software engineering principles. +The expected outcome is a fully functional, containerized prototype of an enterprise money exchange platform. It will feature a secure multi-tier login system, an interactive dashboard visualizing live simulated currency trends, and an immutable ledger module that records and flags simulated cross-border remittance transactions. The architecture demonstrates modern software principles required in both FinTech and telemetry-driven industrial software engineering. \ No newline at end of file From 14416633337a667caf3836fcbfe4ab563092f553 Mon Sep 17 00:00:00 2001 From: Weilai Wang <38804125+miku-wwl@users.noreply.github.com> Date: Sat, 6 Jun 2026 02:39:03 +1200 Subject: [PATCH 6/6] =?UTF-8?q?refactor:=20simplify=20compose=20files=20?= =?UTF-8?q?=E2=80=94=20remove=20Traefik,=20adminer,=20proxy?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Simplify docker compose setup to a basic frontend + backend + db stack. Remove all Traefik-related labels, networks, and services. --- compose.override.yml | 68 ++++--------------------------- compose.yml | 95 ++++---------------------------------------- 2 files changed, 15 insertions(+), 148 deletions(-) diff --git a/compose.override.yml b/compose.override.yml index 91328db071..a4b26334fb 100644 --- a/compose.override.yml +++ b/compose.override.yml @@ -1,59 +1,12 @@ services: - # Local services are available on their ports, but also available on: - # http://api.localhost.tiangolo.com: backend - # http://dashboard.localhost.tiangolo.com: frontend - # etc. To enable it, update .env, set: - # DOMAIN=localhost.tiangolo.com - proxy: - image: traefik:3.6 - volumes: - - /var/run/docker.sock:/var/run/docker.sock - ports: - - "80:80" - - "8090:8080" - # Duplicate the command from compose.yml to add --api.insecure=true - command: - # Enable Docker in Traefik, so that it reads labels from Docker services - - --providers.docker - # Add a constraint to only use services with the label for this stack - - --providers.docker.constraints=Label(`traefik.constraint-label`, `traefik-public`) - # Do not expose all Docker services, only the ones explicitly exposed - - --providers.docker.exposedbydefault=false - # Create an entrypoint "http" listening on port 80 - - --entrypoints.http.address=:80 - # Create an entrypoint "https" listening on port 443 - - --entrypoints.https.address=:443 - # Enable the access log, with HTTP requests - - --accesslog - # Enable the Traefik log, for configurations and errors - - --log - # Enable debug logging for local development - - --log.level=DEBUG - # Enable the Dashboard and API - - --api - # Enable the Dashboard and API in insecure mode for local development - - --api.insecure=true - labels: - # Enable Traefik for this service, to make it available in the public network - - traefik.enable=true - - traefik.constraint-label=traefik-public - # Dummy https-redirect middleware that doesn't really redirect, only to - # allow running it locally - - traefik.http.middlewares.https-redirect.contenttype.autodetect=false - networks: - - traefik-public - - default - db: restart: "no" ports: - "5432:5432" - adminer: + prestart: restart: "no" - ports: - - "8080:8080" backend: restart: "no" @@ -62,7 +15,6 @@ services: build: context: . dockerfile: backend/Dockerfile - # command: sleep infinity # Infinite loop to keep container alive doing nothing command: - fastapi - run @@ -78,7 +30,6 @@ services: - .venv - path: ./backend/pyproject.toml action: rebuild - # TODO: remove once coverage is done locally volumes: - ./backend/htmlcov:/app/backend/htmlcov environment: @@ -87,12 +38,6 @@ services: SMTP_TLS: "false" EMAILS_FROM_EMAIL: "noreply@example.com" - mailcatcher: - image: schickling/mailcatcher - ports: - - "1080:1080" - - "1025:1025" - frontend: restart: "no" ports: @@ -104,6 +49,12 @@ services: - VITE_API_URL= - NODE_ENV=development + mailcatcher: + image: schickling/mailcatcher + ports: + - "1080:1080" + - "1025:1025" + playwright: build: context: . @@ -120,7 +71,6 @@ services: environment: - VITE_API_URL=http://backend:8000 - MAILCATCHER_HOST=http://mailcatcher:1080 - # For the reports when run locally - PLAYWRIGHT_HTML_HOST=0.0.0.0 - CI=${CI} volumes: @@ -129,7 +79,3 @@ services: ports: - 9323:9323 -networks: - traefik-public: - # For local dev, don't expect an external Traefik network - external: false diff --git a/compose.yml b/compose.yml index 2488fc007b..0cb751cacd 100644 --- a/compose.yml +++ b/compose.yml @@ -19,37 +19,11 @@ services: - POSTGRES_USER=${POSTGRES_USER?Variable not set} - POSTGRES_DB=${POSTGRES_DB?Variable not set} - adminer: - image: adminer - restart: always - networks: - - traefik-public - - default - depends_on: - - db - environment: - - ADMINER_DESIGN=pepa-linha-dark - labels: - - traefik.enable=true - - traefik.docker.network=traefik-public - - traefik.constraint-label=traefik-public - - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.rule=Host(`adminer.${DOMAIN?Variable not set}`) - - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.entrypoints=http - - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-http.middlewares=https-redirect - - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.rule=Host(`adminer.${DOMAIN?Variable not set}`) - - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.entrypoints=https - - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.tls=true - - traefik.http.routers.${STACK_NAME?Variable not set}-adminer-https.tls.certresolver=le - - traefik.http.services.${STACK_NAME?Variable not set}-adminer.loadbalancer.server.port=8080 - prestart: image: '${DOCKER_IMAGE_BACKEND?Variable not set}:${TAG-latest}' build: context: . dockerfile: backend/Dockerfile - networks: - - traefik-public - - default depends_on: db: condition: service_healthy @@ -58,30 +32,16 @@ services: env_file: - .env environment: - - DOMAIN=${DOMAIN} - - FRONTEND_HOST=${FRONTEND_HOST?Variable not set} - - ENVIRONMENT=${ENVIRONMENT} - - BACKEND_CORS_ORIGINS=${BACKEND_CORS_ORIGINS} - - SECRET_KEY=${SECRET_KEY?Variable not set} - - FIRST_SUPERUSER=${FIRST_SUPERUSER?Variable not set} - - FIRST_SUPERUSER_PASSWORD=${FIRST_SUPERUSER_PASSWORD?Variable not set} - - SMTP_HOST=${SMTP_HOST} - - SMTP_USER=${SMTP_USER} - - SMTP_PASSWORD=${SMTP_PASSWORD} - - EMAILS_FROM_EMAIL=${EMAILS_FROM_EMAIL} - POSTGRES_SERVER=db - POSTGRES_PORT=${POSTGRES_PORT} - POSTGRES_DB=${POSTGRES_DB} - POSTGRES_USER=${POSTGRES_USER?Variable not set} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set} - - SENTRY_DSN=${SENTRY_DSN} + - ENVIRONMENT=${ENVIRONMENT} backend: image: '${DOCKER_IMAGE_BACKEND?Variable not set}:${TAG-latest}' restart: always - networks: - - traefik-public - - default depends_on: db: condition: service_healthy @@ -108,67 +68,28 @@ services: - POSTGRES_USER=${POSTGRES_USER?Variable not set} - POSTGRES_PASSWORD=${POSTGRES_PASSWORD?Variable not set} - SENTRY_DSN=${SENTRY_DSN} - + build: + context: . + dockerfile: backend/Dockerfile healthcheck: test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/utils/health-check/"] interval: 10s timeout: 5s retries: 5 - build: - context: . - dockerfile: backend/Dockerfile - labels: - - traefik.enable=true - - traefik.docker.network=traefik-public - - traefik.constraint-label=traefik-public - - - traefik.http.services.${STACK_NAME?Variable not set}-backend.loadbalancer.server.port=8000 - - - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.rule=Host(`api.${DOMAIN?Variable not set}`) - - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.entrypoints=http - - - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.rule=Host(`api.${DOMAIN?Variable not set}`) - - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.entrypoints=https - - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.tls=true - - traefik.http.routers.${STACK_NAME?Variable not set}-backend-https.tls.certresolver=le - - # Enable redirection for HTTP and HTTPS - - traefik.http.routers.${STACK_NAME?Variable not set}-backend-http.middlewares=https-redirect - frontend: image: '${DOCKER_IMAGE_FRONTEND?Variable not set}:${TAG-latest}' restart: always - networks: - - traefik-public - - default + depends_on: + backend: + condition: service_healthy build: context: . dockerfile: frontend/Dockerfile args: - - VITE_API_URL=https://api.${DOMAIN?Variable not set} + - VITE_API_URL= - NODE_ENV=production - labels: - - traefik.enable=true - - traefik.docker.network=traefik-public - - traefik.constraint-label=traefik-public - - - traefik.http.services.${STACK_NAME?Variable not set}-frontend.loadbalancer.server.port=80 - - - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.rule=Host(`dashboard.${DOMAIN?Variable not set}`) - - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.entrypoints=http - - - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.rule=Host(`dashboard.${DOMAIN?Variable not set}`) - - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.entrypoints=https - - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls=true - - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-https.tls.certresolver=le - # Enable redirection for HTTP and HTTPS - - traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.middlewares=https-redirect volumes: app-db-data: -networks: - traefik-public: - # Allow setting it to false for testing - external: true