ModPhoenix / poker-planning

PokerPlanning.org is perfect for Agile workflows, our tool makes consensus-based estimation simple, fun, and effective.
https://pokerplanning.org/
MIT License
76 stars 20 forks source link

Cannot run inside Docker container #42

Open Archpanda opened 1 year ago

Archpanda commented 1 year ago

Hello,

I tried to build the project inside a Docker container. The process is really straightforward (I'll paste the Dockerfile below). The server starts OK, I can access the welcome page, but then I got this error when trying to create a room : [HPM] Error occurred while proxying request 127.0.0.1:8000// to http://127.0.0.1:8000/ [ECONNREFUSED] (https://nodejs.org/api/errors.html#errors_common_system_errors).

I tried many configuration combinaisons in the .env.local, local.yaml and base.yaml files, along with different port mapping for the container, but I always get the same result.

Also, I didn't understand where to change the default local port, 3000, to something else.

Here is the Dockerfile :

# syntax=docker/dockerfile:1
FROM ubuntu:latest
RUN apt update
RUN apt install -y cargo
RUN apt install -y git
RUN apt install -y curl
RUN curl -sL https://deb.nodesource.com/setup_16.x > setup_16
RUN sh setup_16
RUN apt install -y nodejs
RUN npm -v
RUN apt autoremove
WORKDIR /home
RUN mkdir poker-planning
COPY ./poker-planning /home/poker-planning/
#RUN git clone https://github.com/ModPhoenix/poker-planning.git
WORKDIR /home/poker-planning
RUN cargo install cargo-watch
WORKDIR /home/poker-planning/client
RUN cp .env.local.example .env.local
RUN npm i
ENTRYPOINT ["npm", "start"]
wmtorode commented 2 months ago

its because your not actually running the server, you probably need to switch the entrypoint to a script that starts both the server and run npm