Architecture and Deployment
The project has a modular architecture and is fully containerized, making its deployment predictable and easily scalable.
🏗 Component Architecture
At its core, there are two main components working within a single Docker network and hidden behind a reverse proxy:
- Nginx Container (Web Server):
- Receives all incoming HTTP/HTTPS requests.
- Serves static files for the generated MkDocs documentation (under the
/docs/path). -
Forwards (Reverse Proxy) all other requests (home page, projects, contacts) to the Flask container.
-
Flask Container (App Server):
- Processes dynamic routes and inserts the appropriate language into Jinja HTML templates.
🚀 CI/CD Process (GitHub Actions)
Site deployment is fully automated. With every push commit to the main branch, the following Pipeline is triggered:
- Checkout & Setup: GitHub Actions clones the repository and sets up the Python environment.
- Build Docs: Dependencies are installed (including i18n plugins), and the
mkdocs buildcommand is executed to generate the static documentation into thesite/folder. - SCP Transfer: The fresh code and generated static files are copied to the Oracle Cloud server via SSH.
- Docker Compose Rebuild: The old cache is cleared on the server, and the
docker-compose up -d --buildcommand is executed. The containers are rebuilt with the new code with zero downtime.
💻 Local Run (For Development)
To deploy the project on a local machine, you just need to run two commands.
Build documentation (requires Python installed): ```bash pip install -r requirements.txt mkdocs build -f mkdocs-personal.yml