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

Front env variable #918

Merged
merged 4 commits into from
Oct 13, 2023
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
3 changes: 2 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
REACT_APP_BACKEND_URL=https://localhost:5001/api
REACT_APP_TEMPVAL=tempval
API_URL=https://best.api.ever.com
API_URL=https://best.api.ever.com
REACT_APP_GOOGLE_ANALYTICS=tempval
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ services:
- ./templates:/etc/nginx/templates
- /etc/certbot/www:/var/www/certbot/:ro
- /etc/certbot/conf:/etc/nginx/ssl/:ro

frontend:
image: streetcodeua/streetcode_client:${DOCKER_TAG_FRONTEND}
pull_policy: always
Expand All @@ -29,7 +30,8 @@ services:
retries: 5
environment:
API_URL: ${ENV_API_BACKEND}

REACT_APP_GOOGLE_ANALYTICS: ${ENV_GOOGLE_ANALYTICS}

backend:
image: streetcodeua/streetcode:${DOCKER_TAG_BACKEND}
pull_policy: always
Expand Down Expand Up @@ -65,4 +67,4 @@ networks:
name: backend
frontend:
external:
name: frontend
name: frontend
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-T9ZHBQ5T" height="0" width="0"
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=" + window._env_.REACT_APP_GOOGLE_ANALYTICS height="0" width="0"
style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<noscript>Для коректного функціонування веб-сайту Вам потрібно дозволити JavaScript в своєму браузері.</noscript>
Expand Down
Loading