Add local-first SPA architecture and containerized production deploy.
Move data access to use-cases and IndexedDB repositories with optional remote fallback, changelog/sync ports, and encrypted local backup. Add production Docker Compose (nginx frontend + optional backend) and Apache host proxy configuration for deployment. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# Прокси на хосте → контейнеры Docker.
|
||||
# Скопировать:
|
||||
# sudo cp deploy/apache/social-graph.conf /etc/apache2/sites-available/social-graph.conf
|
||||
#
|
||||
# Перед включением поднимите контейнеры:
|
||||
# docker compose -f docker-compose.prod.yml --env-file deploy/.env.prod up -d frontend
|
||||
# # при remote: ... --profile with-backend up -d
|
||||
#
|
||||
# sudo a2enmod proxy proxy_http headers rewrite
|
||||
# sudo a2ensite social-graph.conf
|
||||
# sudo apache2ctl configtest && sudo systemctl reload apache2
|
||||
|
||||
<VirtualHost *:80>
|
||||
ServerName your-domain.com
|
||||
ServerAlias www.your-domain.com
|
||||
|
||||
ProxyPreserveHost On
|
||||
RequestHeader set X-Forwarded-Proto "http"
|
||||
RequestHeader set X-Forwarded-For %{REMOTE_ADDR}s
|
||||
|
||||
# Backend API (раскомментируйте при VITE_DATA_MODE=remote и profile with-backend)
|
||||
# ProxyPass /api http://127.0.0.1:8000/api
|
||||
# ProxyPassReverse /api http://127.0.0.1:8000/api
|
||||
|
||||
# Frontend SPA (nginx в контейнере sg_frontend)
|
||||
ProxyPass / http://127.0.0.1:8080/
|
||||
ProxyPassReverse / http://127.0.0.1:8080/
|
||||
|
||||
ErrorLog ${APACHE_LOG_DIR}/social-graph-error.log
|
||||
CustomLog ${APACHE_LOG_DIR}/social-graph-access.log combined
|
||||
</VirtualHost>
|
||||
Reference in New Issue
Block a user