restructure: all-in-one deploy dir — www/ for frontend, context: . for builds

This commit is contained in:
Ada
2026-04-06 10:02:51 -04:00
parent a077bffb08
commit c9e2c91a6b
5 changed files with 5 additions and 27 deletions

View File

@@ -1,2 +1,2 @@
FROM nginx:alpine FROM nginx:alpine
COPY . /usr/share/nginx/html COPY www /usr/share/nginx/html

View File

@@ -1,8 +1,8 @@
services: services:
backend: backend:
build: build:
context: ../backend context: .
dockerfile: ../deploy/Dockerfile dockerfile: Dockerfile
container_name: project-tracker-api container_name: project-tracker-api
restart: unless-stopped restart: unless-stopped
volumes: volumes:
@@ -15,8 +15,8 @@ services:
nginx: nginx:
build: build:
context: ../frontend context: .
dockerfile: ../deploy/Dockerfile.nginx dockerfile: Dockerfile.nginx
container_name: project-tracker-nginx container_name: project-tracker-nginx
restart: unless-stopped restart: unless-stopped
ports: ports:

View File

@@ -1,22 +0,0 @@
server {
listen 80;
server_name _;
# Serve frontend static files
root /usr/share/nginx/html;
index index.html;
# API proxy to Node backend
location /api/ {
proxy_pass http://backend:3000/api/;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
# Static files - SPA fallback
location / {
try_files $uri $uri/ /index.html;
}
}

BIN
deploy/www/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 99 KiB