-
-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix or improve client build docs #32
Comments
The server build should be relatively simple since it only requires typescript compilation (no bundling, and no Rust dependencies). Try building the server directly first:
At that point it's a standard node.js server which you can run via:
|
Thanks for this. These commands do (now) work, and it turns out at least part of my problem was that I was trying to build inside a repo directory that was bind-mounted from my Mac. This led to the ERR_PNPM_LINKING_FAILED error. Additionally, I found that building from source on an overlay filesystem (e.g. inside a plain docker container) can cause node-gyp build to fail. Building inside a fresh copy of the repo in a Docker volume inside a container, or using I've also managed to launch my sync server behind https and resync my local chat.prompta.dev storage to it. So far so good! I also managed to build and load the client, but had to add I think you can close this issue, but I suggest modifying Dockerfile and docs to add It would be neat if the sync server could also serve the static client, so that everything can be built and run off one IP and port. In the meantime here is a FROM node:20 as builder
RUN apt-get update; apt install -y curl python-is-python3 pkg-config build-essential
RUN mkdir /app
WORKDIR /app
COPY . .
RUN npm install -g pnpm
RUN pnpm install
RUN sed -r -i.bak 's!https://prompta-production.up.railway.app!http://localhost:8081!' src/lib/sync/vlcn.ts
RUN pnpm run build:server
RUN NODE_OPTIONS="--max-old-space-size=2048" pnpm run ui:build
EXPOSE 8080
EXPOSE 8081
CMD [ "bash", "-c", "PORT=8081 node ./dist-server/server.js & pnpm run preview --host 0.0.0.0 --port 8080" ] |
I am trying to build my own client talking to its own sync server.
I have built the sync server using
docker build -t prompta .
and run it usingdocker run --name=prompta -p 8080:8080 prompta
.To use it, I understand I have to serve the client over http to allow it to access the server on http://0.0.0.0:8080/.
Dockerfile
I get this error:The text was updated successfully, but these errors were encountered: