BartoszJarocki / cv

Print-friendly, minimalist CV page
https://cv.jarocki.me
MIT License
8.79k stars 934 forks source link

dockerized #20

Closed davidhfrankelcodes closed 7 months ago

davidhfrankelcodes commented 7 months ago

Hello there! Your app is cool! I made a Dockerfile and corresponding docker-compose.yaml file for this!

Just run

# build the image with...
docker compose build
# Start the container with...
docker compose up 
# or run in detached mode like...
docker compose up -d
# bring it back down with
docker compose down
vercel[bot] commented 7 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
cv ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2023 5:12pm
OmitNomis commented 7 months ago

Hey, could you please explain to me when you'd use this? I've never actually used docker aside from when i need to host stuff on a VPS, and this his hosted on vercel.

And, maybe you could also add the instructions to run/build/stop the container in the readme file

davidhfrankelcodes commented 7 months ago

Hey, could you please explain to me when you'd use this? I've never actually used docker aside from when i need to host stuff on a VPS, and this his hosted on vercel.

And, maybe you could also add the instructions to run/build/stop the container in the readme file

I Added the docker instructions to the README.

You can use this to run the app if for example you don't have node installed on your machine. This also starts a daemon that restarts when you reboot the machine, so it's also a deployment (don't need systemd or whatever to run it).

OmitNomis commented 7 months ago

Oh cool, I didn't know using it restarts even when rebooting the system. Thanks.

davidhfrankelcodes commented 7 months ago

Oh cool, I didn't know using it restarts even when rebooting the system. Thanks.

lol it would do this if I actually put in the restart instructions!

I just made another commit with restart instructions. Now, when the container is created the first time it will restart on reboot.

OmitNomis commented 7 months ago

Ohh, okay that makes sense. Thanks, it's great learning new stuff :>

BartoszJarocki commented 7 months ago

I guess this would trigger people on twitter but hey, let's make it possible to deploy it outside of vercel. here's an official example of dockerfile - https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile. would you mind checking what can be improved in this PR to make it possible to deploy outside of vercel?

davidhfrankelcodes commented 7 months ago

ould you mind checking what can be improved in this PR to make it possible to deploy outside of vercel?

Already possible to run outside of vercel as is. That's the point of the PR as is. Don't need to do anything else.