A full-stack web application for my personal website, featuring:
- AI Studio
- Markdown-based Blogs
- Password Generator & AES Enctyption / Decryption
- Front End: Node.js, React.js, Next.js, Tailwind CSS, MUI
- Back End: Node.js (Nest.js), Python (FastAPI)
- Storage: MySQL, MinIO, Redis
- Authentication: Firebase (Email Verification)
- Infrastructure: Linux (Debian 12), Kubernetes (K3S), Nginx
- DevOps: GitHub Actions
- Copy
./app-secret.example.yaml
to./app-secret.yaml
and./app-secret-test.yaml
, modify value for each key.
Log in as root user
- Compress
./kubernetes
to./kubernetes.zip
- Run
mkdir /root/kubernetes
- Install Dependencies
apt update apt install unzip
- Upload
./kubernetes.zip
to/root/kubernetes/
- Create Configs
cd /root/kubernetes unzip kubernetes.zip rm kubernetes.zip mv kubernetes UniWebPlatform cd UniWebPlatform/
See ./K3S.md
See ./KubernetesCommand.md
HTTP Block:
server {
server_name <domain_name>;
client_max_body_size 100M;
location / {
proxy_pass http://localhost:30080/;
proxy_buffering off;
proxy_request_buffering off;
proxy_set_header Host $http_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;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Host $host;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /kubernetes/ {
proxy_pass https://localhost:38443/;
proxy_ssl_verify off;
proxy_set_header Host $http_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;
proxy_set_header X-Forwarded-Port $server_port;
proxy_set_header X-Forwarded-Host $host;
}
}
Stream Block:
stream {
server {
listen 3306;
proxy_pass localhost:33306;
}
}
- Main:
http://localhost:30080/
- MinIO:
http://localhost:30080/minio/ui/
- Kubernetes Dashboard:
https://localhost:38443/
- Setup and run MySQL and MinIO by K3S in Test Server.
- Setup and run Next, Nest, FastAPI separately by JetBrains IDE according to their documentations.
GitHub >> Repository >> Settings >> Security >> Secrets and variables >> Actions >> Repository secrets: add
- DOCKERHUB_TOKEN
- DOCKERHUB_USERNAME
We welcome contributions! Please follow these steps:
- Create a Branch: Create a new branch based on
main
(e.g.,feat/xxx
). - Commit Changes: Develop your feature and commit changes to the new branch.
- Open a Pull Request (PR): Submit a PR targeting the
test
branch and wait for review.
- Deploy to Test Environment: The repository owner will deploy the changes to the test server via the Kubernetes Dashboard.
- Verify in Test Environment: The repository owner will test the changes in the test environment.
- Merge to Production: If everything works as expected, the repository owner will merge
test
intomain
. - Deploy to Production: The repository owner will manually restart the deployment in the production server via the Kubernetes Dashboard.