Skip to content

cas-107 Delay proposal start by 1 hour in production env (UI ONLY)#138

Merged
germanurrus merged 10 commits intomainfrom
cas-107
Jul 22, 2022
Merged

cas-107 Delay proposal start by 1 hour in production env (UI ONLY)#138
germanurrus merged 10 commits intomainfrom
cas-107

Conversation

@CJamesKeller
Copy link
Copy Markdown
Contributor

if (cutOffDate) {
const nowDate = new Date();
const nowDate =
process.env.NODE_ENV === 'production'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to introduce a new environment variable like APP_ENV because staging uses NODE_ENV=production

https://github.com/DapperCollectives/CAST/blob/main/frontend/Dockerfile.stage#L11

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked with Fer, and now using APP_ENV, which is also used in the backend.

Copy link
Copy Markdown
Contributor

@germanurrus germanurrus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Waiting for confirmation for APP env

process.env.APP_ENV === 'PRODUCTION'
? new Date(Date.now() + 60 * 60 * 1000) // delay by an hour in prod env
: new Date();
nowDate.setSeconds(0);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@fersan1985 I've checked on this file

ENV NODE_ENV=production
and APP_ENV is not set in the docker build process. I do see NODE_ENV I think that's we should use instead.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added APP_ENV on Dockerfile.stage file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also APP_ENV added in prod build by @fersan1985

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App env added

CAST/frontend/Dockerfile

Lines 12 to 13 in c96756d

#ENVS FOR PROD FRONTEND
ENV APP_ENV "production"

@germanurrus germanurrus requested review from fersan1985 and removed request for germanurrus July 18, 2022 19:24
@germanurrus
Copy link
Copy Markdown
Contributor

@dbslone updates done, this is ready for new review now

@dbslone dbslone requested a review from mannynotfound July 21, 2022 07:35
@sarahy-Dapper sarahy-Dapper self-requested a review July 22, 2022 14:14
Copy link
Copy Markdown
Contributor

@sarahy-Dapper sarahy-Dapper left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

REACT_APP_APP_ENV env variable is working as expected for development and production.

@germanurrus germanurrus requested review from dbslone and germanurrus and removed request for dbslone July 22, 2022 14:24
@germanurrus germanurrus dismissed dbslone’s stale review July 22, 2022 15:04

changes done on this PR

@germanurrus germanurrus merged commit 696463b into main Jul 22, 2022
@germanurrus germanurrus deleted the cas-107 branch July 22, 2022 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants