-
Notifications
You must be signed in to change notification settings - Fork 25
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
#99/chore/update docker compose yaml #102
Merged
YoshikiKubotani
merged 15 commits into
develop
from
#99/chore/update-docker-compose-yaml
May 1, 2024
Merged
#99/chore/update docker compose yaml #102
YoshikiKubotani
merged 15 commits into
develop
from
#99/chore/update-docker-compose-yaml
May 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YoshikiKubotani
changed the base branch from
develop
to
#95/chore/check-new-linter-ruff
April 27, 2024 11:22
YoshikiKubotani
changed the base branch from
#95/chore/check-new-linter-ruff
to
develop
April 27, 2024 11:23
gatheluck
reviewed
Apr 30, 2024
gatheluck
reviewed
Apr 30, 2024
gatheluck
requested changes
Apr 30, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@YoshikiKubotani
Thank you for your PR! I added comments. Could you take a look?
gatheluck
approved these changes
May 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your update! LGTM!!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue URL
close #99, close #82
Change overview
.env
files to use dynamic interpolation indocker-compose.yaml
(See also Note for reviewers)envs.env.sample
for users to use environment variables inside containers (See also Note for reviewers)docker-compose.yaml
to set the project name [link]README.md
to add optional steps and additional FAQ.How to test
~/environments/cpu$ docker compose down [+] Running 2/2 ✔ Container cpu-ascender-core-1 Removed 0.4s ✔ Network cpu-ascender_default Removed
PROJECT_NAME_ENV
inenvironments/cpu/.env
environments/envs.env
~/environments/cpu$ docker compose up -d [+] Running 2/2 ✔ Network cpu-test_default Created 0.0s ✔ Container cpu-test-core-1 Started
Note for reviewers
Note
Although it is not mentioned in Docker's official documentation, it appears that
.env
files and files specified inenv_files
serve different purposes in Docker.In the
docker-compose.yaml
file, environment variables specified in the shell can be dynamically loaded and used. Additionally, if a.env
file exists in the same directory level as the docker-compose.yaml file, the environment variables defined in that file are also loaded. [link]This
.env
file must be named exactly ".env" and placed in the same location as thedocker-compose.yaml
.On the other hand,
env_files
are used to set environment variables inside containers. [link]Files specified in
env_files
do not have special constraints regarding their names or locations.Therefore, for added changes in this pull request, the
.env
file is used to set the names for directories and containers bound in thedocker-compose.yaml
, whileenv_files
are used to set environment variables inside the containers.See also the answer thread to this question on stack overflow.