Skip to content

Commit

Permalink
Rename env var
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristophNiehoff committed Aug 3, 2023
1 parent a085c5c commit 628c4f0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 10 deletions.
8 changes: 2 additions & 6 deletions docker/client.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,12 @@ COPY ./.eslintrc.cjs ./.eslintrc.cjs
COPY ./.prettierignore ./.prettierignore
COPY ./.prettierrc.cjs ./.prettierc.cjs
COPY ./src ./src
ENV EOP_IMPRINT=$EOP_IMPRINT
ENV EOP_PRIVACY=$EOP_PRIVACY
ENV REACT_APP_EOP_IMPRINT=$EOP_IMPRINT
ENV REACT_APP_EOP_PRIVACY=$EOP_PRIVACY
RUN env
RUN npm run build:client

FROM nginxinc/nginx-unprivileged:1.20.1-alpine
ARG EOP_IMPRINT
ARG EOP_PRIVACY
ENV EOP_IMPRINT=$EOP_IMPRINT
ENV EOP_PRIVACY=$EOP_PRIVACY
COPY docker/files/etc/nginx/nginx.conf /etc/nginx/nginx.conf
COPY docker/files/etc/nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
COPY --from=builder /usr/src/app/build /usr/share/nginx/html/
Expand Down
4 changes: 2 additions & 2 deletions src/client/components/footer/imprint.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react';
import type { FC } from 'react';

const Imprint: FC = () => {
if (process.env.EOP_IMPRINT) {
if (process.env.REACT_APP_EOP_IMPRINT) {
return (
<a href={process.env.EOP_IMPRINT}>Imprint</a>
<a href={process.env.REACT_APP_EOP_IMPRINT}>Imprint</a>
);
}
return (<></>);
Expand Down
4 changes: 2 additions & 2 deletions src/client/components/footer/privacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import React from 'react';
import type { FC } from 'react';

const Privacy: FC = () => {
if (process.env.EOP_PRIVACY) {
if (process.env.REACT_APP_EOP_PRIVACY) {
return (
<a href={process.env.EOP_PRIVACY}>Privacy2</a>
<a href={process.env.REACT_APP_EOP_PRIVACY}>Privacy2</a>
);
}
return (<></>);
Expand Down

0 comments on commit 628c4f0

Please sign in to comment.