purton-tech / rust-on-nails

Full stack web architecture for Rust
https://rust-on-nails.com
MIT License
363 stars 33 forks source link

Issue running Dev Container #39

Closed farazfazli closed 1 year ago

farazfazli commented 1 year ago

Hi Ian,

I am facing the following intermittent issue while trying to run the Dev Container: WebSocket Protocol Error: Unable to parse WebSocket key.

System Details: Ubuntu 22.10 w/ AMD Ryzen Processor

Command run, after ensuring Git submodules are updated cd rust-on-nails.com && zs

Terminal terminal

Ports ports

Sometimes it works and sometimes it doesn't. Please let me know if you need any additional details from my end.

Thanks, Faraz

9876691 commented 1 year ago

I'm also on Ubuntu on a ryzen processor. I've only been using this setup for a few days so we'll see if I get this issue too.

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 22.10
Release:    22.10
Codename:   kinetic

This issue could be that when you run zola it creates a websocket connection back to the server to wait for updates. Then it automatically refreshes when it sees that update.

I couldn't find a way to disable this.

farazfazli commented 1 year ago

Oh okay, no worries. Sounds good.

9876691 commented 1 year ago

So I fix the version of Zola at 0.15.3, this is because that's the version that cloudflare supports.

You may have better luck with a later version

ARG ZOLA_VERSION=0.15.3
RUN sudo curl -OL https://github.com/getzola/zola/releases/download/v$ZOLA_VERSION/zola-v$ZOLA_VERSION-x86_64-unknown-linux-gnu.tar.gz \
    && sudo tar -xvf zola-v$ZOLA_VERSION-x86_64-unknown-linux-gnu.tar.gz \
    && sudo mv zola /usr/bin/zola \
    && sudo chmod +x /usr/bin/zola
farazfazli commented 1 year ago

Looks like it's working now, thank you!