Migrate Flask React template into Forge

This commit is contained in:
rob
2026-11-17 19:39:11 +00:00
parent bc6b6d26f1
commit 444406d2fc
109 changed files with 9427 additions and 13 deletions
@@ -0,0 +1,16 @@
# SWAG reverse-proxy integration
The default Compose stack does not require SWAG. If the project chooses this
hosting pattern, combine `docker-compose.yml` with `ops/swag/docker-compose.swag.yml`
after configuring the external network named by `SWAG_NETWORK` (default: `swagnet`). SWAG terminates TLS
and proxies the public hostname to `nginx:80`; the application nginx container
serves the React build and forwards `/api/` to the private API service.
Copy `app.subdomain.conf.sample` into the SWAG `nginx/proxy-confs/` directory,
replace the placeholder domain settings using normal SWAG conventions, and
restart or reload SWAG. The exact SWAG filesystem location is a server concern
and is intentionally not encoded in this repository.
Do not expose MySQL publicly. The loopback API and frontend port mappings exist
for server-local health diagnostics; SWAG should reach the frontend by Docker
service name over the external network.
@@ -0,0 +1,15 @@
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name app.*;
include /config/nginx/ssl.conf;
location / {
include /config/nginx/proxy.conf;
include /config/nginx/resolver.conf;
set $upstream_app nginx;
set $upstream_port 80;
proxy_pass http://$upstream_app:$upstream_port;
}
}
@@ -0,0 +1,11 @@
# Optional overlay. Use only after configuring an external SWAG network.
services:
nginx:
networks:
- internal
- swag
networks:
swag:
external: true
name: ${SWAG_NETWORK:-swagnet}