Closed SimardeepSingh-zsh closed 11 months ago
The latest updates on your projects. Learn more about Vercel for Git βοΈ
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
before-i-die-achievements | β Ready (Inspect) | Visit Preview | π¬ Add feedback | Sep 26, 2023 6:18pm |
git add Dockerfile git commit -m "Add Dockerfile for containerization" git push origin main
docker build -t beforeidieachievements .
docker run -p 3000:3000 beforeidieachievements
Excellent @SimardeepSingh-zsh!
I went ahead and tested it out on your branch and got it to work from running docker compose up
! Do you know how to add the ability for the developer server to automatically open up for a user? This is new to me, and after doing a search I have found that potentailly on a macOS and windows system you would have to set-up a script and additional files. Curious if you know how to add the ability for the localhost: 3000 to automatically open up after running docker compose up
?
docker-compose up -d
Make this script executable (e.g., chmod +x start.sh) and then run it instead of directly running docker-compose up. It will start your containers and open a browser tab for you.
Windows doesn't have a built-in command like open on macOS, but you can use PowerShell or other scripting languages to achieve a similar result.
docker-compose up -d
Start-Process -FilePath "http://localhost:3000"
Save this script with a .ps1 extension (e.g., start.ps1) and run it instead of running docker-compose up.
Wonderful! Everything makes sense. I was thinking, is it possible to automatically open the dev local server with just one command? However, this would depend on the user's operating system. As you mentioned, the user still needs to run chmod +x start.sh
. Thank you for your valuable input. We will continue to improve this docker file as the project becomes more complex and add documentation to guide contributors on setting up the local dev server using docker. Simardeep, thank you for your assistance with the docker file and for sharing your expertise.
Thank you for your time! We will now go ahead with merging into the main branch. Please continue to contribute wherever you see fit. Additionally, I am planning to use the members feature on GitHub to organize Before I Die Code organization better and enable discussions. This will enhance our ability to collaborate with other contributors on the code. Have a great day and later on you will receive a request to become a member of the organization on GitHub once it is set-up ππ»
This closes issue #46
Issue Addressed
Proposed Changes and Benefits
Screenshots
Notes to Reviewers
Checklist
keyword: brief description of change
format, using one of the following keywords:Feature
- adds new or amends existing user-facing behavior.Chore
- changes that have no user-facing value, refactors, dependency bumps, etc.Fix
- bug fixes.Docs
- fixing typos and adding new content.