diff --git a/.env.development b/.env.development index fdf5ec38fe0..c5359a2ad2c 100644 --- a/.env.development +++ b/.env.development @@ -106,10 +106,11 @@ VITE_FEATURE_SWAPPER_FIAT_RAMPS=true # Webservices VITE_FEATURE_NOTIFICATIONS_WEBSERVICES=true +# Remote dev servers (default - works for all developers) VITE_SWAPS_SERVER_URL=https://dev-api.swap-service.shapeshift.com VITE_USER_SERVER_URL=https://dev-api.user-service.shapeshift.com VITE_NOTIFICATIONS_SERVER_URL=https://dev-api.notifications-service.shapeshift.com -# Turn those on if you use local development instead of our railway instance +# Local development via Vite proxy (uncomment to use localhost backend) # VITE_SWAPS_SERVER_URL=/swaps-api # VITE_USER_SERVER_URL=/user-api # VITE_NOTIFICATIONS_SERVER_URL=/notifications-api diff --git a/packages/affiliate-dashboard/Dockerfile b/packages/affiliate-dashboard/Dockerfile new file mode 100644 index 00000000000..9af907da7b7 --- /dev/null +++ b/packages/affiliate-dashboard/Dockerfile @@ -0,0 +1,32 @@ +FROM node:22-alpine AS builder +WORKDIR /app + +COPY packages/affiliate-dashboard/package.json ./ +RUN npm install + +COPY packages/affiliate-dashboard/index.html packages/affiliate-dashboard/tsconfig.json packages/affiliate-dashboard/tsconfig.node.json packages/affiliate-dashboard/vite.config.ts ./ +COPY packages/affiliate-dashboard/src/ ./src/ + +RUN npx vite build + +FROM nginx:stable-alpine AS runner +COPY --from=builder /app/dist /usr/share/nginx/html +RUN printf 'server {\n\ + listen 8080;\n\ + server_name _;\n\ + root /usr/share/nginx/html;\n\ + index index.html;\n\ + location /v1/ {\n\ + proxy_pass ${API_URL}/v1/;\n\ + proxy_http_version 1.1;\n\ + proxy_set_header Host $host;\n\ + proxy_set_header X-Real-IP $remote_addr;\n\ + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n\ + proxy_set_header X-Forwarded-Proto $scheme;\n\ + }\n\ + location / {\n\ + try_files $uri $uri/ /index.html;\n\ + }\n\ +}\n' > /tmp/default.conf.template +EXPOSE 8080 +CMD ["/bin/sh", "-c", "envsubst '${API_URL}' < /tmp/default.conf.template > /etc/nginx/conf.d/default.conf && exec nginx -g 'daemon off;'"] diff --git a/packages/affiliate-dashboard/index.html b/packages/affiliate-dashboard/index.html new file mode 100644 index 00000000000..ac8925b4785 --- /dev/null +++ b/packages/affiliate-dashboard/index.html @@ -0,0 +1,14 @@ + + +
+ + + +Track your affiliate performance and earnings
++ Enter an affiliate address above to view performance stats. +
+