Fix undefined PROJECT_NAME variable, remove deprecated compose version, and update restart policy#3
Open
gschaer wants to merge 1 commit intomage-ai:masterfrom
Open
Fix undefined PROJECT_NAME variable, remove deprecated compose version, and update restart policy#3gschaer wants to merge 1 commit intomage-ai:masterfrom
gschaer wants to merge 1 commit intomage-ai:masterfrom
Conversation
…n, and update restart policy - Declare ARG PROJECT_NAME in the Dockerfile to resolve an undefined variable warning. - Remove deprecated 'version: "3"' from docker-compose.yml. - Update the container restart policy from "on-failure:5" to "unless-stopped" for more robust behavior.
This file contains hidden or 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
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.
Summary
This PR addresses three issues:
Undefined
PROJECT_NAMEVariable:The Dockerfile referenced
${PROJECT_NAME}in the default value ofUSER_CODE_PATHwithout declaring it as a build argument, which caused a warning during the build process.Deprecated Compose File Version:
Removed the
version: '3'key from docker-compose.yml since specifying the version is deprecated in current Docker Compose files.Restart Policy Update:
Changed the container restart policy from
on-failure:5tounless-stopped. This update ensures that the container will restart unless explicitly stopped, which can provide more predictable behavior in various runtime environments.Changes Made
Dockerfile:
ARG PROJECT_NAMEbefore using it in the default value forUSER_CODE_PATH.docker-compose.yml:
version: '3'line.PROJECT_NAMEso its value is passed during the build.unless-stopped.Testing
docker compose up --force-recreate --build -dto verify that:version: '3'does not affect the compose functionality.Impact
These changes ensure that:
PROJECT_NAMEvariable correctly.unless-stoppedpolicy.