Compare commits

..

No commits in common. "5fe1b8f28572593b28ac54b47650920bec7837e2" and "60939f14ea7893f3ffbd1da814c21c304c6753ac" have entirely different histories.

3 changed files with 4 additions and 62 deletions

View File

@ -1,28 +0,0 @@
name: Deploy Canina
on:
push:
branches: [main]
jobs:
deploy:
runs-on: ubuntu-latest
defaults:
run:
shell: sh
steps:
- name: Install SSH client
run: |
V=$(cut -d'.' -f1-2 /etc/alpine-release)
echo "https://dl-cdn.alpinelinux.org/alpine/v$V/main" > /etc/apk/repositories
echo "https://dl-cdn.alpinelinux.org/alpine/v$V/community" >> /etc/apk/repositories
apk add --no-cache openssh-client
- name: Setup SSH key
env:
SSH_KEY: ${{ secrets.DEPLOY_KEY }}
run: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keyscan -p 2234 -H 172.17.0.1 >> ~/.ssh/known_hosts
- name: Deploy
run: ssh -p 2234 devops@172.17.0.1 'bash /opt/services/scripts/depcanina.sh main'

View File

@ -1,5 +1,3 @@
@import "tailwindcss";
@font-face { @font-face {
font-family: 'Vazirmatn'; font-family: 'Vazirmatn';
src: url('/fonts/vazirmatn-v33.003/fonts/webfonts/Vazirmatn[wght].woff2') format('woff2-variations'), src: url('/fonts/vazirmatn-v33.003/fonts/webfonts/Vazirmatn[wght].woff2') format('woff2-variations'),
@ -11,7 +9,7 @@
@font-face { @font-face {
font-family: 'Shabnam'; font-family: 'Shabnam';
src: url('/fonts/shabnam-font-v33.003/fonts/webfonts/Shabnam.woff2') format('woff2'); src: url('/fonts/shabnam-font-v5.0.1/Shabnam.woff2') format('woff2');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
font-display: swap; font-display: swap;
@ -25,6 +23,8 @@
font-display: swap; font-display: swap;
} }
@import "tailwindcss";
@theme { @theme {
--font-sans: "Vazirmatn", sans-serif; --font-sans: "Vazirmatn", sans-serif;
--font-vazir: "Vazirmatn", sans-serif; --font-vazir: "Vazirmatn", sans-serif;

View File

@ -1,6 +1,6 @@
server { server {
listen 8080; listen 8080;
server_name canina.parsaaghayi.ir; server_name localhost;
root /usr/share/nginx/html; root /usr/share/nginx/html;
index index.html; index index.html;
@ -27,33 +27,3 @@ server {
proxy_cache_bypass $http_upgrade; proxy_cache_bypass $http_upgrade;
} }
} }
server {
listen 8080;
server_name admin.canina.parsaaghayi.ir;
root /usr/share/nginx/html/admin;
index index.html;
# Security Headers
server_tokens off;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-XSS-Protection "1; mode=block" always;
add_header X-Content-Type-Options "nosniff" always;
add_header Referrer-Policy "no-referrer-when-downgrade" always;
add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline' 'unsafe-eval' https://images.unsplash.com https://canina.de;" always;
# Support for SPA routing
location / {
try_files $uri $uri/ /index.html;
}
# Proxy API requests to backend
location /api {
proxy_pass http://backend:3000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}