Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make nginx use env for maelstro backend #47

Merged
merged 3 commits into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docker-compose-solo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ services:
timeout: 10s
volumes:
- ./config/:/etc/maelstro/:ro
environment:
MAELSTRO_BACK_HOST: maelstro-back
ports:
- "8080:8080"

Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ services:
ports: []
environment:
CUSTOM_SCRIPTS_DIRECTORY: /etc/georchestra/maelstro/scripts
MAELSTRO_BACK_HOST: maelstro-back
depends_on:
envsubst:
condition: service_completed_successfully
Expand Down
2 changes: 1 addition & 1 deletion frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ FROM nginxinc/nginx-unprivileged:1.27-alpine

ENV CUSTOM_SCRIPTS_DIRECTORY ""
COPY --from=builder --chown=nginx /app/dist /app
COPY nginx-default.conf /etc/nginx/conf.d/default.conf
COPY nginx-default.conf.template /etc/nginx/templates/nginx-default.conf.template
COPY ./docker-entrypoint.sh /
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ server {
}

location /maelstro-backend {
proxy_pass http://maelstro-back:8000;
proxy_pass http://${MAELSTRO_BACK_HOST}:8000;
add_header Cache-Control "public, max-age=0, s-maxage=0, must-revalidate" always;
}

Expand Down