C
Coder.com8mo ago
Dilim

workspace for developing react

I have a self hosted coder instance running on my personal server that I access from behind a wireguard vpn. the source code for my workspace is this: when I run the react app using the “npm run dev” command, coder opens another tab that gives me a “bad 502 gateway” error. how can I troubleshoot this?
5 Replies
Codercord
Codercord8mo ago
Category: Help needed What product are you using?
feners4
feners48mo ago
Not seeing your workspace code, but I have gotten a Node dev server to run in my workspace using vscode-web and accessing the port through the Coder workspace dashboard. I run it through the terminal of the workspace container, so I believe it should work with any type of workspace container. Where are you running the dev server?
Dilim
DilimOP8mo ago
the code is this : dockerfile:
FROMI
ubuntu
RUN
apt-get update \
&& apt-get install -y \ curl! git \
nodejs\
npm \
sudo vim \ wget \
&& rm -rf /var/lib/apt/lists/*
ENV HOST=192.168.0.143
ARG USER=coder
RUN useradd --groups sudo --no-create-home - -shell /bin/bash ${USER} && echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers. d/${USER3 \
&& chmod 0440 / etc/sudoers.d/${USER}
USER #{USER?
WORKDIR /home/${USER}
FROMI
ubuntu
RUN
apt-get update \
&& apt-get install -y \ curl! git \
nodejs\
npm \
sudo vim \ wget \
&& rm -rf /var/lib/apt/lists/*
ENV HOST=192.168.0.143
ARG USER=coder
RUN useradd --groups sudo --no-create-home - -shell /bin/bash ${USER} && echo "${USER} ALL=(ALL) NOPASSWD:ALL" >/etc/sudoers. d/${USER3 \
&& chmod 0440 / etc/sudoers.d/${USER}
USER #{USER?
WORKDIR /home/${USER}
main.tf:
Dilim
DilimOP8mo ago
my overlay network is netbird which is a wireguard based vpn for self hosting
feners4
feners48mo ago
Have you tried installing NPM/Node in your container and running the dev server? After you get the server running, you might be able to access the port through the Coder port forwarding in the container dashboard.

Did you find this page helpful?