feat(deploy): build + serve worker and admin as static nginx images
All checks were successful
Build and Push Docker Image / build (push) Successful in 53s
All checks were successful
Build and Push Docker Image / build (push) Successful in 53s
- per-app Dockerfiles (vite build → nginx) + SPA nginx.conf - Gitea workflow pushes 3 images; frontends bake VITE_API_URL - docker-compose.prod.yml (registry images, solelog_network) + .env.prod.example - docker-compose.yml runs the full stack locally; add .dockerignore
This commit is contained in:
23
apps/worker/nginx.conf
Normal file
23
apps/worker/nginx.conf
Normal file
@@ -0,0 +1,23 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
root /usr/share/nginx/html;
|
||||
index index.html;
|
||||
|
||||
gzip on;
|
||||
gzip_types text/css application/javascript application/json image/svg+xml;
|
||||
|
||||
# Hashed build assets are immutable — cache them hard.
|
||||
location /assets/ {
|
||||
expires 1y;
|
||||
add_header Cache-Control "public, immutable";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
# SPA fallback: any unknown path serves index.html so React Router can
|
||||
# handle it client-side (deep links and refreshes work). Never cache the shell.
|
||||
location / {
|
||||
try_files $uri $uri/ /index.html;
|
||||
add_header Cache-Control "no-cache";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user