udpates on the dockerfile and nginx changes regarding secret key
This commit is contained in:
@@ -18,6 +18,9 @@ RUN npm run build
|
||||
# Stage 2: Serve the application with Nginx
|
||||
FROM nginx:alpine
|
||||
|
||||
# Set the default Hasura admin secret (can be overridden at runtime)
|
||||
ENV HASURA_ADMIN_SECRET="nearle-admin-secret"
|
||||
|
||||
# Move to Nginx's public folder
|
||||
WORKDIR /usr/share/nginx/html
|
||||
|
||||
@@ -27,8 +30,8 @@ RUN rm -rf ./*
|
||||
# Copy the compiled static assets FROM THE BUILDER STAGE
|
||||
COPY --from=builder /app/dist/ .
|
||||
|
||||
# Copy the Nginx configuration as a template so env variables (like HASURA_ADMIN_SECRET) are substituted at runtime
|
||||
COPY nginx.conf /etc/nginx/templates/default.conf.template
|
||||
# Copy your custom Nginx configuration into the conf.d directory so it gets included properly
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ server {
|
||||
# Proxy /hasura to the live API, exactly like Vite dev server does
|
||||
location /hasura/ {
|
||||
proxy_pass https://api.workolik.com/api/rest/;
|
||||
proxy_set_header x-hasura-admin-secret "${HASURA_ADMIN_SECRET}";
|
||||
proxy_set_header x-hasura-admin-secret "nearle-admin-secret";
|
||||
proxy_ssl_server_name on;
|
||||
|
||||
# Pass standard proxy headers
|
||||
|
||||
Reference in New Issue
Block a user