restructure: all-in-one deploy dir — www/ for frontend, context: . for builds
This commit is contained in:
@@ -1,2 +1,2 @@
|
||||
FROM nginx:alpine
|
||||
COPY . /usr/share/nginx/html
|
||||
COPY www /usr/share/nginx/html
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
services:
|
||||
backend:
|
||||
build:
|
||||
context: ../backend
|
||||
dockerfile: ../deploy/Dockerfile
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
container_name: project-tracker-api
|
||||
restart: unless-stopped
|
||||
volumes:
|
||||
@@ -15,8 +15,8 @@ services:
|
||||
|
||||
nginx:
|
||||
build:
|
||||
context: ../frontend
|
||||
dockerfile: ../deploy/Dockerfile.nginx
|
||||
context: .
|
||||
dockerfile: Dockerfile.nginx
|
||||
container_name: project-tracker-nginx
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
||||
@@ -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
BIN
deploy/www/favicon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 99 KiB |
Reference in New Issue
Block a user