feat: update Dockerfile and nginx configuration for improved API routing; modify events API response structure
This commit is contained in:
@@ -17,14 +17,8 @@ RUN npm run build
|
||||
FROM nginx:alpine
|
||||
|
||||
COPY --from=build /app/dist /usr/share/nginx/html
|
||||
COPY nginx.conf /etc/nginx/nginx.conf.template
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
# API_URL is the backend's public base URL used by nginx proxy_pass.
|
||||
# Set this at runtime in Coolify, e.g. API_URL=https://api.crowmate.fr
|
||||
ENV API_URL=http://localhost:3000
|
||||
|
||||
# Substitute ${API_URL} in the nginx template at container start, then launch nginx.
|
||||
# The quoted variable list prevents envsubst from replacing nginx variables like $host.
|
||||
CMD ["/bin/sh", "-c", "envsubst '${API_URL}' < /etc/nginx/nginx.conf.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"]
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
||||
|
||||
Reference in New Issue
Block a user