mkaczanowski / pastebin

Simple, fast, standalone pastebin service
MIT License
155 stars 27 forks source link

Improve deployment process #3

Closed Sparkenstein closed 4 years ago

Sparkenstein commented 4 years ago

Thanks for this awesome tool in rust. unfortunately I could not use it. Been working on installation by all given means but nothing worked for me. my preferred way is docker, I tried given commands

docker pull mkaczanowski/pastebin:latest
docker run mkaczanowski/pastebin --address localhost --port 8000

but I couldn't visit localhost:8000 neither in browser nor via curl.

I also tried opening ports like

docker run -p 8000:8000 --detach --name pastebin mkaczanowski/pastebin --address localhost --port 8000

The container runs, but can't connect to server anyhow. there are no logs in server console, just normal rocket stuff:

❯ docker logs ecffb
Configured for production.
    => address: localhost
    => port: 8000
    => log: normal
    => workers: 8
    => secret key: generated
    => limits: forms = 32KiB
    => keep-alive: 5s
    => tls: disabled
Warning: environment is 'production', but no `secret_key` is configured
Mounting /:
    => GET / (index)
    => POST /?<lang>&<ttl>&<burn>&<encrypted> (create)
    => DELETE /<id> (remove)
    => GET /<id>?<lang> (get)
    => GET /new?<id>&<level>&<msg>&<glyph>&<url> (get_new)
    => GET /raw/<id> (get_raw)
    => GET /download/<id> (get_binary)
    => GET /static/<resource> (get_static)
Rocket has launched from http://localhost:8000

The local build was taking too long as I don't really have a powerful PC. Can you check if docker commands given in readme needs to be fixed? also it will be helpful if you release the binaries on github as well so that I can just download the binary execute it without worrying any build/installation process.

mkaczanowski commented 4 years ago

Hey,

you need to specify the network (where to bind the port to):

docker run --network host mkaczanowski/pastebin --address localhost --port 8000

^^ that should work for you

Sparkenstein commented 4 years ago

+1 adding network fixed the issue.

PS: do you have any plans for upgrading to latest rocket version (upcoming 0.5) which runs on stable rust. I tried making quick changes but it was not easy.

mkaczanowski commented 4 years ago

do you have any plans for upgrading to latest rocket version (upcoming 0.5) which runs on stable rust tbh I haven't looked at this yet, maybe on weekend :+1: