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

Fixes #1261: docker compose up --build doesn't see .env #1320

Merged
merged 1 commit into from Nov 11, 2020

Conversation

IsabellaDev
Copy link
Contributor

@IsabellaDev IsabellaDev commented Nov 11, 2020

Issue This PR Addresses

Closes #1261

Type of Change

  • Bugfix: Change which fixes an issue
  • New Feature: Change which adds functionality
  • Documentation Update: Change which improves documentation
  • UI: Change which improves UI

Description

This adds the command line COPY .env . right after the package.json file is copied for each service, and removes the command line COPY ./.env ./.env in the Front-end Builder context.
It solves the problem that the error "cannot find .env file" being thrown when doing the docker-compose up --build.

Checklist

  • Quality: This PR builds and passes our npm test and works locally
  • Tests: This PR includes thorough tests or an explanation of why it does not
  • Screenshots: This PR includes screenshots or GIFs of the changes made or an explanation of why it does not (if applicable)
  • Documentation: This PR includes updated/added documentation to user exposed functionality or configuration variables are added/changed or an explanation of why it does not(if applicable)

@c3ho
Copy link
Contributor

c3ho commented Nov 11, 2020

Hi, can I get more context in the title of this PR? Fixed issue #1261 doesn't tell me much. There's no description and you didn't add Fixes #1261 either in Issue this PR addresses so it didn't automatically link the issue

@c3ho c3ho requested a review from raygervais November 11, 2020 16:43
@c3ho
Copy link
Contributor

c3ho commented Nov 11, 2020

@raygervais do we also need the code in line 49?

COPY ./src/frontend ./src/frontend	COPY ./src/frontend ./src/frontend
COPY ./.git ./.git	COPY ./.git ./.git
COPY ./.env ./.env <--- this line

@raygervais
Copy link
Contributor

From what I see, we don't need the second copy because the added line is for the base container, meaning each other container will inherit the .env file

@IsabellaDev
Copy link
Contributor Author

Fixes #1261

@c3ho
Copy link
Contributor

c3ho commented Nov 11, 2020

I mean here
image

@IsabellaDev
Copy link
Contributor Author

IsabellaDev commented Nov 11, 2020

I mean here
image

Oh, I'm so sorry that I didn't notice I can type in those places, should I modify it now?

@c3ho
Copy link
Contributor

c3ho commented Nov 11, 2020

Yeah, if you have questions, look at another PR and try to edit their PR (without actually making changes) to understand how to write/format

@IsabellaDev IsabellaDev changed the title fixed issue #1261 Fixes #1261 Nov 11, 2020
@IsabellaDev IsabellaDev changed the title Fixes #1261 Fixes #1261: docker compose up --build doesn't see .env Nov 11, 2020
@IsabellaDev IsabellaDev merged commit 2fd6d02 into Seneca-CDOT:master Nov 11, 2020
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.

docker compose up --build doesn't seem to see .env
3 participants