Skip to content

Commit

Permalink
Fix Makefile (#117)
Browse files Browse the repository at this point in the history
* Add the `PROJECT` variable to the .env file configurations and make the Makefile completely hermetic by removing the environment reading option which I previously missed.

* Update README.md to show the new `.env` file default configurations.
  • Loading branch information
veritas9872 authored Apr 10, 2023
1 parent cc549d9 commit 01c6c5f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ COMMAND = /bin/zsh
# Specify `PROJECT` for the `make` command if this is the case.
_PROJECT = "${SERVICE}-${USR}"
# The `COMPOSE_PROJECT_NAME` variable must be lowercase.
PROJECT ?= $(shell echo ${_PROJECT} | tr "[:upper:]" "[:lower:]")
PROJECT = $(shell echo ${_PROJECT} | tr "[:upper:]" "[:lower:]")
PROJECT_ROOT = /opt/project

# Creates a `.env` file in PWD if it does not exist.
Expand Down Expand Up @@ -45,6 +45,7 @@ GID=${GID}\n$\
UID=${UID}\n$\
GRP=${GRP}\n$\
USR=${USR}\n$\
PROJECT=${PROJECT}\n$\
SERVICE=${SERVICE}\n$\
COMMAND=${COMMAND}\n$\
HOST_NAME=${SERVICE}\n$\
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,12 @@ GID=1000
UID=1000
GRP=GROUPNAME
USR=USERNAME
PROJECT=train-username # `PROJECT` must be in lowercase.
SERVICE=train
COMMAND=/bin/zsh # Command to execute on starting the container.
HOST_NAME=train
IMAGE_NAME=cresset:train-USERNAME
PROJECT_ROOT=/opt/project
# [[Optional]]: Fill in these configurations manually if the defaults do not suffice.
Expand Down

0 comments on commit 01c6c5f

Please sign in to comment.