diff --git a/deploy/Dockerfile.nginx b/deploy/Dockerfile.nginx index 6e8acef..99a254e 100644 --- a/deploy/Dockerfile.nginx +++ b/deploy/Dockerfile.nginx @@ -1,2 +1,2 @@ FROM nginx:alpine -COPY . /usr/share/nginx/html +COPY www /usr/share/nginx/html diff --git a/deploy/docker-compose.yml b/deploy/docker-compose.yml index 38a03c5..cb5fc1a 100644 --- a/deploy/docker-compose.yml +++ b/deploy/docker-compose.yml @@ -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: diff --git a/deploy/nginx.conf b/deploy/nginx.conf deleted file mode 100644 index fe1c4d3..0000000 --- a/deploy/nginx.conf +++ /dev/null @@ -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; - } -} diff --git a/deploy/www/favicon.png b/deploy/www/favicon.png new file mode 100644 index 0000000..bff6233 Binary files /dev/null and b/deploy/www/favicon.png differ diff --git a/deploy/frontend/index.html b/deploy/www/index.html similarity index 100% rename from deploy/frontend/index.html rename to deploy/www/index.html