Open licentiapoetica opened 1 month ago
The issue is because the olm.wasm is expected to be found on /home/olm.wasm but is only being served on /olm.wasm with a custom nginx config this can be fixed by doing something dirty like this
location /home/olm.wasm {
proxy_pass http://localhost:8080/olm.wasm;
}
the proposed workaround didn't work for me, but I tried another method that did fix it for me, though it does also redirect any */olm.wasm
to the wasm file (which appears to be correct based on the netlify.toml
file)
In the container's /etc/nginx/conf.d/default
, I added the following:
location ~ ^/(.*)/olm.wasm {
try_files $uri /olm.wasm;
alias /app;
}
the proposed workaround didn't work for me, but I tried another method that did fix it for me, though it does also redirect any
*/olm.wasm
to the wasm file (which appears to be correct based on thenetlify.toml
file) In the container's/etc/nginx/conf.d/default
, I added the following:location ~ ^/(.*)/olm.wasm { try_files $uri /olm.wasm; alias /app; }
Yeah what I did is add is a new nginx file based on the cinny/contrib/nginx/cinny.domain.tld.conf file:
server {
listen 80;
listen [::]:80;
location / {
root /usr/share/nginx/html;
index index.html;
}
location /home {
rewrite ^/home?$ /index.html break;
}
location ~* ^\/(login|register) {
try_files $uri $uri/ /index.html;
}
# See https://github.com/cinnyapp/cinny/issues/1757#issuecomment-2149010847
location ~ ^/(.*)/olm.wasm {
try_files $uri /olm.wasm;
alias /app;
}
}
Then modify the dockerfile to put this in the place of default/default.conf:
## Builder
FROM node:20.12.2-alpine3.18 AS builder
WORKDIR /src
COPY .npmrc package.json package-lock.json /src/
RUN npm ci
COPY . /src/
ENV NODE_OPTIONS=--max_old_space_size=4096
RUN npm run build
COPY /contrib/nginx/cinny-docker.conf /src/
## App
FROM nginx:1.27.0-alpine
RUN apk --no-cache -U upgrade
COPY --from=builder /src/dist /app
COPY --from=builder /src/cinny-docker.conf /etc/nginx/conf.d/default.conf
RUN rm -rf /usr/share/nginx/html \
&& ln -s /app /usr/share/nginx/html
Describe the bug
After pulling the latest changes and building the docker image I was greeted by "Heating up"![20240602_205901](https://github.com/cinnyapp/cinny/assets/51519051/ee7a8591-6feb-41cf-ab35-3640bea3f028)
It doesn't go further than this.
In my nginx log I found this:
Reproduction
pull the latest repo version follow the steps in the documentation to build the docker image run it go to localhost:8080 and log in wait indefinetly for the heat up
Expected behavior
Login works and I can see cinny chat
Platform and versions
Additional context
No response