Skip to content

Automation would help in the bootup process#2

Open
bizmate wants to merge 3 commits intodockersamples:mainfrom
bizmate:automate-with-make
Open

Automation would help in the bootup process#2
bizmate wants to merge 3 commits intodockersamples:mainfrom
bizmate:automate-with-make

Conversation

@bizmate
Copy link

@bizmate bizmate commented Mar 13, 2025

Using Make and a small bash script can help automate the manual steps included in the README such as generation of the env file, replacing the UID etc

Notice : the above might not work on windows and probably keeping the manual steps for that environment is ok even if cygwin should help as added on the README.

bizmate added 3 commits March 13, 2025 14:54
 - add extra argument to sed so it works on Mac
 - force creation of symlinks
 - specify workdir in docker compose file in case docker starts runs from root instead
 - fix step in make file to ensure artisan is present before running key generation commands
Copy link

@Dnzldotexe Dnzldotexe left a comment

Choose a reason for hiding this comment

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

much needed

gid="$( id -g )"

sed "s/UID=1000/UID=$uid/" .env.example > .env
sed -i "" "s/GID=1000/UID=$gid/" .env

Choose a reason for hiding this comment

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

Note: the sed -i "" command, is specific to macOS and causes errors on Linux; to make it portable, adjust the sed command to work across platforms:

sed -i "s/GID=1000/GID=$gid/" .env

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