Open farhadhf opened 8 months ago
Hi,
The redirect to app.explorer.[domain] is expected if you are trying to access an explorer that hasn't been setup yet. When opening app.explorer.[domain], you should get a signin/signup screen. You need to create an account first, and then once you are in the dashboard, go to "Public Explorers" to do the setup.
You are saying you are having a redirect issue when opening app.explorer.[domain]. Where does it take you exactly?
Hi, thanks for the quick response! It gets the 400 error from /api/explorers/search?domain=app.explorer.[domain]
and redirects back to https://app.explorer.[domain]
.
Yes, I meant to say that this is expected in my previous message.
What do you see on app.explorer.[domain], an auth page?
Sorry for not being clear before, app.explorer.[domain]
is just a white screen, reloading forever. The screenshot in my previous comment is from app.explorer.[domain] - it gets the 400 error and reloads the same page.
Ah I see! Actually, it looks like there is a missing env variable in the .env.prod example. Can you add APP_DOMAIN=explorer.[domain], rebuild the image and try again? (sorry lot of redundancy in those variables, I need to clean up some legacy code)
Thanks, that was it, it's working now. I tried syncing past block from the server side and I'm getting "You are not allowed to use server side sync. If you'd like to, please reach out at contact@tryethernal.com" (along with quite a bit of console.log messages for request and response objects).
Did you set up the explorer using the "Public explorers" page?
I have, but it says "This explorer is not active. To activate it, start a subscription." on the public explorer page, and under the sync section it says "Synchronization will become available once a subscription has been started". Do I need to purchase a subscription for the self-hosted version as well?
No you don't need. I haven't updated the Dockerfile for self hosted with the latest env variables, and it's missing another one.
After line 6 on the Dockerfile, can you add ENV VUE_APP_ENABLE_BILLING=false
? And rebuild the image. It shouldn't ask you for a subscription after that.
@antoinedc Thanks for the help - I think I'm still missing some config or ENV variable related to memory limit for docker build
.
I'm running docker build -t ethernal -m 6g .
in the same directory as Dockerfile
, and I've added ENV NODE_OPTIONS=--max_old_space_size=6144
to a few places in the Dockerfile
but I'm still getting
Killed
error Command failed with exit code 137.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
The command '/bin/sh -c yarn build' returned a non-zero code: 137
Will adding more swap or even get a bigger machine fix this? How much memory does ethernal need to get built?
Sorry for the delayed answer here. I usually allocate 8g when building it and it works. Can you give it a try?
I tried it all till this point. Is there a solution to this yet? Would a previous version work?
I tried it all till this point. Is there a solution to this yet? Would a previous version work?
You're also having the 137 error from yarn?
Sorry for the late reply - I got around the 137 error by increasing the memory to 8GB. Now I'm getting this error:
Step 55/66 : COPY ethernal-95a14-19f78a7e26cc.json ./ethernal-95a14-19f78a7e26cc.json
COPY failed: file not found in build context or excluded by .dockerignore: stat ethernal-95a14-19f78a7e26cc.json: file does not exist
Update: I removed the line trying to copy ethernal-95a14-19f78a7e26cc.json
. As suggested above, I've added ENV VUE_APP_ENABLE_BILLING=false
to the Dockerfile and then ran docker build -t ethernal
.
FROM node:16 AS front
WORKDIR /client
ENV VUE_APP_NODE_ENV=production
ENV VUE_APP_API_ROOT=https://app.VUE_APP_MAIN_DOMAIN_PLACEHOLDER
ENV VUE_APP_MAIN_DOMAIN=VUE_APP_MAIN_DOMAIN_PLACEHOLDER
ENV VUE_APP_PUSHER_KEY=VUE_APP_PUSHER_KEY_PLACEHOLDER
ENV VUE_APP_ENABLE_BILLING=false
ENV NODE_OPTIONS=--max_old_space_size=8192
COPY public/ ./public/
COPY src/ ./src/
COPY babel.config.js .firebaserc package.json yarn.lock vue.config.js _redirects ./
RUN yarn install --network-timeout 100000
RUN yarn build
...
It successfully got built. I've also editted docker-compose.prod.yml
and changed the image
of the backend
service to ethernal:latest
:
web: &backend
networks:
- ethernal
container_name: web
depends_on:
- postgres
- redis
pull_policy: always
restart: always
ports:
- '8888:8888'
image: ethernal:latest
command: /bin/sh ./web_entrypoint.sh
env_file: .env.prod
links:
- postgres
- redis
Did docker-compose -f docker-compose.prod.yml down
and then docker-compose -f docker-compose.prod.yml up -d
to restart Ethernal. It's up and running, but I still see the Billing than in /settings?tab=billing
and running ethernal sync
throws the same error about not being allowed to run server side sync.
data: "You are not allowed to use server side sync. If you'd like to, please reach out at contact@tryethernal.com"
Any ideas?
I've installed the self-hosted version following the guide on https://doc.tryethernal.com/getting-started/self-hosted#web-app-setup (skipped the context setup). Here's the URL
.env.production
config:The output of
docker-compose -f docker-compose.prod.yml ps
:I have a Nginx reverse proxy set up to proxy the requests on
explorer.[domain]
andapp.explorer.[domain]
to127.0.0.1:8888
upstream.The issue is that whenever I open
https://explorer.[domain]
it redirects tohttps://app.explorer.[domain]
and then gets a 400 error while trying to GEThttps://app.explorer.[domain]/api/explorers/search?domain=app.explorer.[domain]
and redirects tohttps://app.explorer.[domain]
again. Same redirect issue happens when I directly openhttps://app.explorer.[domain]
in my browser. I looked at the code and it seems like the 400 error is happening here https://github.com/tryethernal/ethernal/blob/develop/run/api/explorers.js#L427 and the redirect happens here https://github.com/tryethernal/ethernal/blob/develop/src/main.js#L42Output from
docker-compose -f docker-compose-prod.yml logs
:Not sure where to go from here - do I need to somehow seed the database with an initial explorer?