Update frontend Dockerfile for contour with relative paths and adjust docker-compose.yaml to use contour-specific image.
This commit is contained in:
parent
4d9b1807bf
commit
75c47e932f
@ -324,7 +324,7 @@ services:
|
||||
condition: service_completed_successfully
|
||||
|
||||
frontend:
|
||||
image: ${SAREX_FRONTEND_IMAGE:-cr.yandex/crp3ccidau046kdj8g9q/sarex-frontend-dev:latest}
|
||||
image: ${SAREX_FRONTEND_IMAGE:-cr.yandex/crp3ccidau046kdj8g9q/frontend:contour_42138486}
|
||||
container_name: sarex-frontend
|
||||
restart: unless-stopped
|
||||
ports:
|
||||
|
||||
9
frontend/Dockerfile
Normal file
9
frontend/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
# Патч прод-образа фронтенда под contour: вырезаем абсолютные хосты в бандле,
|
||||
# чтобы запросы шли относительными путями (same-origin, через наш nginx).
|
||||
FROM cr.yandex/crp3ccidau046kdj8g9q/frontend:production_42138486
|
||||
|
||||
ENV DIST_PATH=/opt/react_client/static
|
||||
|
||||
RUN find $DIST_PATH -type f -name "*.js" -exec sed -i 's|https://api.sarex.io||g' {} + ; \
|
||||
find $DIST_PATH -type f -name "*.js" -exec sed -i 's|https://lk.sarex.io||g' {} + ; \
|
||||
find $DIST_PATH -type f -name "*.js" -exec sed -i 's|https://modules.sarex.io||g' {} +
|
||||
Loading…
Reference in New Issue
Block a user