How to run locally?
anishkny opened this issue · 7 comments
Hey this is an awesome repo! especially now that rawgit.com is going away.
I was trying to run this repo locally:
docker build -t rawgithack .
docker run -p 8080:80 rawgithack &
[1] 70585
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
7742acb7107c rawgithack "nginx -g 'daemon of…" 3 seconds ago Up 2 seconds 0.0.0.0:8080->80/tcp gracious_lovelace
Then I see this at localhost:8080:
But how do test it out locally?
Thanks!
Well, the service itself need to be changed a bit to allow seamless local development (i. e. support of custom domains). Currently I am simply adding raw.githack.com as an alias of 127.0.0.1
in /etc/hosts
of the host machine.
Ok. I am complete nginx
noob. I tried adding this to /etc/hosts
inside the container:
# cat hosts
127.0.0.1 localhost
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
172.17.0.2 f52093c62453
127.0.0.1 raw.githack.com. # <---- added
but not sure how that helps run locally.
No, you need to add those lines locally, on your host machine
I assume everything is fine right now
However, I’d rather leave it open until the correct way to run the project locally will be implemented
Yeah I actually didn't get a chance to try it out. It would be cool to see a noob-friendly way to run this locally. ✌️
The proposed solution is the way to go, I actually do use it in development.