feat: add place gate population scripts, map style assets, automated cron sync tasks, and expand dashboard and landing applications
This commit is contained in:
@@ -1,21 +1,13 @@
|
||||
FROM node:22-alpine AS build
|
||||
WORKDIR /app
|
||||
COPY apps/dashboard/package*.json ./
|
||||
RUN npm ci
|
||||
COPY apps/dashboard/ ./
|
||||
RUN npm run build
|
||||
|
||||
FROM nginx:alpine
|
||||
|
||||
# Remove default nginx static assets
|
||||
RUN rm -rf /usr/share/nginx/html/*
|
||||
|
||||
# Copy static assets into nginx
|
||||
COPY apps/dashboard/*.html /usr/share/nginx/html/
|
||||
COPY apps/dashboard/js /usr/share/nginx/html/js/
|
||||
COPY apps/dashboard/css /usr/share/nginx/html/css/
|
||||
COPY apps/dashboard/assets /usr/share/nginx/html/assets/
|
||||
COPY apps/dashboard/uruk /usr/share/nginx/html/uruk/
|
||||
COPY apps/dashboard/data /usr/share/nginx/html/data/
|
||||
|
||||
# Fix networking issues by adding a simple redirect for spa if needed
|
||||
# But for hash-based routing, default index.html is enough.
|
||||
# We also need to handle the API proxy if we want to avoid CORS issues
|
||||
# However, the user's docker-compose has the API and Dashboard on different ports.
|
||||
# In a real production, we'd use Nginx to proxy /api to the backend.
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
|
||||
COPY infrastructure/docker/dashboard/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
|
||||
@@ -16,6 +16,15 @@ server {
|
||||
try_files $uri $uri/ $uri.html /index.html;
|
||||
}
|
||||
|
||||
# Proxy Swagger documentation directly
|
||||
location /docs {
|
||||
proxy_pass http://api:3200/docs;
|
||||
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;
|
||||
}
|
||||
|
||||
# Proxy API requests to the api service in docker
|
||||
location /api/ {
|
||||
limit_req zone=api_limit burst=20 nodelay;
|
||||
|
||||
Reference in New Issue
Block a user