All checks were successful
Frontend CI / build (push) Successful in 1m4s
### Description - Change some environment variables implementation - Nginx configuration: ```nginx server { server_name beta.squidspirit.com; proxy_pass_request_headers on; 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; location / { proxy_pass http://127.0.0.1:10013/; } location /api/ { proxy_pass http://127.0.0.1:10014/; } listen 443 ssl; # managed by Certbot ssl_certificate /etc/letsencrypt/live/beta.squidspirit.com/fullchain.pem; # managed by Certbot ssl_certificate_key /etc/letsencrypt/live/beta.squidspirit.com/privkey.pem; # managed by Certbot include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot } server { if ($host = beta.squidspirit.com) { return 301 https://$host$request_uri; } # managed by Certbot server_name beta.squidspirit.com; listen 80; return 404; # managed by Certbot } ``` - Podman kube configuration: ```yaml apiVersion: v1 kind: Secret metadata: name: beta-blog-secret data: DATABASE_PASSWORD: {{BASE64_PASSWORD}} --- apiVersion: v1 kind: Pod metadata: name: beta-blog spec: containers: - name: postgres image: docker.io/library/postgres:17-alpine imagePullPolicy: always env: - name: POSTGRES_PASSWORD valueFrom: secretKeyRef: name: beta-blog-secret key: DATABASE_PASSWORD volumeMounts: - name: beta-blog-postgres mountPath: /var/lib/postgresql/data - name: backend image: registry.squidspirit.com/squid/beta-blog-backend:latest imagePullPolicy: always env: - name: DATABASE_PASSWORD valueFrom: secretKeyRef: name: beta-blog-secret key: DATABASE_PASSWORD volumeMounts: - name: beta-blog-localtime mountPath: /etc/localtime readonly: true ports: - hostPort: 10014 hostIP: 127.0.0.1 containerPort: 8080 - name: frontend image: registry.squidspirit.com/squid/beta-blog-frontend:latest imagePullPolicy: always env: - name: PUBLIC_API_BASE_URL value: https://beta.squidspirit.com/api/ volumeMounts: - name: beta-blog-localtime mountPath: /etc/localtime readonly: true ports: - hostPort: 10013 hostIP: 127.0.0.1 containerPort: 3000 volumes: - name: beta-blog-localtime hostPath: path: /etc/localtime - name: beta-blog-postgres persistentVolumeClaim: claimName: beta-blog-postgres ``` ### Package Changes _No response_ ### Screenshots _No response_ ### Reference Resolves #65 ### Checklist - [x] A milestone is set - [x] The related issuse has been linked to this branch Reviewed-on: #66 Co-authored-by: SquidSpirit <squid@squidspirit.com> Co-committed-by: SquidSpirit <squid@squidspirit.com>
Backend
Development
SQL Migration
-
Install sqlx
cargo install sqlx-cli
-
Run migration
sqlx migrate run
Run Project
-
Prepare for sql schema setup
cargo sqlx prepare --workspace
-
Run the server
RUST_LOG=debug cargo run
-
(Optional) Hot restart
-
Install
watchexec
-
Run the server with
watchexec
RUST_LOG=debug watchexec -e rs -r 'cargo run'
-