feat: deploy infrastructure + disk/drive, calendar, presentation, workspaces, onboarding, demo user
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
JWT_KEY=$(openssl rand -hex 64)
|
||||
JWT_RESET_KEY=$(openssl rand -hex 64)
|
||||
ENC_KEY=$(openssl rand -hex 32)
|
||||
DB_PASS=$(openssl rand -hex 16)
|
||||
|
||||
cat << EOF
|
||||
JWT_SECRET_KEY=$JWT_KEY
|
||||
JWT_RESET_SECRET_KEY=$JWT_RESET_KEY
|
||||
ENCRYPTION_KEY=$ENC_KEY
|
||||
DB_PASS=$DB_PASS
|
||||
EOF
|
||||
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
TOKEN="2608ab5b7a8965190ab4d8503a8197a47b75b42c"
|
||||
GITEA_URL="http://localhost:3000"
|
||||
|
||||
echo "Creating repository 'voidea' in Gitea..."
|
||||
|
||||
RESPONSE=$(curl -s -X POST "$GITEA_URL/api/v1/user/repos" \
|
||||
-H "Content-Type: application/json" \
|
||||
-H "Authorization: token $TOKEN" \
|
||||
-d '{
|
||||
"name": "voidea",
|
||||
"description": "VoIdeaAI - voice-first AI idea assistant",
|
||||
"private": false,
|
||||
"auto_init": false,
|
||||
"default_branch": "master"
|
||||
}')
|
||||
|
||||
echo "Response: $RESPONSE"
|
||||
|
||||
if echo "$RESPONSE" | grep -q '"id"'; then
|
||||
echo "Repository created successfully!"
|
||||
echo "Clone URL: http://localhost:3000/angel/voidea.git"
|
||||
echo "Web URL: http://git.voideaai.ru/angel/voidea"
|
||||
else
|
||||
echo "Failed to create repository."
|
||||
fi
|
||||
@@ -0,0 +1,40 @@
|
||||
services:
|
||||
db:
|
||||
image: postgres:16-alpine
|
||||
network_mode: host
|
||||
environment:
|
||||
POSTGRES_DB: gitea
|
||||
POSTGRES_USER: gitea
|
||||
POSTGRES_PASSWORD: ${GITEA_DB_PASS:-gitea_pass}
|
||||
command: -p 5433
|
||||
volumes:
|
||||
- gitea-db:/var/lib/postgresql/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "pg_isready -U gitea -h localhost -p 5433"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
|
||||
gitea:
|
||||
image: gitea/gitea:latest-rootless
|
||||
network_mode: host
|
||||
environment:
|
||||
GITEA__database__DB_TYPE: postgres
|
||||
GITEA__database__HOST: localhost:5433
|
||||
GITEA__database__NAME: gitea
|
||||
GITEA__database__USER: gitea
|
||||
GITEA__database__PASSWD: ${GITEA_DB_PASS:-gitea_pass}
|
||||
GITEA__server__DOMAIN: git.voideaai.ru
|
||||
GITEA__server__HTTP_PORT: 3000
|
||||
GITEA__server__ROOT_URL: http://git.voideaai.ru:3000
|
||||
GITEA__server__SSH_DOMAIN: git.voideaai.ru
|
||||
GITEA__server__SSH_PORT: 22
|
||||
volumes:
|
||||
- gitea-data:/var/lib/gitea
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
volumes:
|
||||
gitea-db:
|
||||
gitea-data:
|
||||
@@ -0,0 +1,33 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name git.voideaai.ru;
|
||||
|
||||
client_max_body_size 512M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
http2 on;
|
||||
server_name git.voideaai.ru;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/live/git.voideaai.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/live/git.voideaai.ru/privkey.pem;
|
||||
|
||||
client_max_body_size 512M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
# git.voideaai.ru -> Gitea (shared instance with git.aegisone.ru)
|
||||
server {
|
||||
listen 80;
|
||||
server_name git.voideaai.ru;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
client_max_body_size 512M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
http2 on;
|
||||
server_name git.voideaai.ru;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/live/voideaai.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/live/voideaai.ru/privkey.pem;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
client_max_body_size 512M;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:3000;
|
||||
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;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
echo "Copying nginx configs..."
|
||||
sudo cp /home/angel/voideaai.ru.conf /opt/projects/nginx-proxy/conf.d/
|
||||
sudo cp /home/angel/git.voideaai.ru.conf /opt/projects/nginx-proxy/conf.d/
|
||||
echo "Configs copied."
|
||||
|
||||
echo "Testing nginx config..."
|
||||
docker compose -p nginx-proxy exec nginx nginx -t
|
||||
|
||||
echo "Reloading nginx..."
|
||||
docker compose -p nginx-proxy exec nginx nginx -s reload
|
||||
echo "Nginx reloaded successfully."
|
||||
@@ -0,0 +1,85 @@
|
||||
# voideaai.ru -> VoIdeaAI FastAPI
|
||||
server {
|
||||
listen 80;
|
||||
server_name voideaai.ru www.voideaai.ru;
|
||||
|
||||
location /.well-known/acme-challenge/ {
|
||||
root /usr/share/nginx/html;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8020;
|
||||
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;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
http2 on;
|
||||
server_name voideaai.ru www.voideaai.ru;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/live/voideaai.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/live/voideaai.ru/privkey.pem;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "DENY" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
location /assets/ {
|
||||
proxy_pass http://localhost:8020;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_cache_valid 200 365d;
|
||||
expires 365d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location /icons/ {
|
||||
proxy_pass http://localhost:8020;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_cache_valid 200 365d;
|
||||
expires 365d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://localhost:8020;
|
||||
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;
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
}
|
||||
|
||||
location /ws/ {
|
||||
proxy_pass http://localhost:8020;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8020;
|
||||
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;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name voideaai.ru www.voideaai.ru;
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8020;
|
||||
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;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl;
|
||||
http2 on;
|
||||
server_name voideaai.ru www.voideaai.ru;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/live/voideaai.ru/fullchain.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/live/voideaai.ru/privkey.pem;
|
||||
|
||||
add_header Strict-Transport-Security "max-age=63072000" always;
|
||||
add_header X-Content-Type-Options "nosniff" always;
|
||||
add_header X-Frame-Options "DENY" always;
|
||||
add_header X-XSS-Protection "1; mode=block" always;
|
||||
|
||||
location /assets/ {
|
||||
proxy_pass http://localhost:8020;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_cache_valid 200 365d;
|
||||
expires 365d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location /icons/ {
|
||||
proxy_pass http://localhost:8020;
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_cache_valid 200 365d;
|
||||
expires 365d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location /api/ {
|
||||
proxy_pass http://localhost:8020;
|
||||
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;
|
||||
proxy_buffering off;
|
||||
proxy_cache off;
|
||||
}
|
||||
|
||||
location /ws/ {
|
||||
proxy_pass http://localhost:8020;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
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;
|
||||
proxy_buffering off;
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://localhost:8020;
|
||||
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;
|
||||
proxy_buffering off;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user