-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Website feature removed #768
Comments
You don't need to host the frontend anymore, you can use your own instance on cobalt.tools. |
Ah lol. Thanks for the tip. Unfortunately, I only have one problem: I don't have a public (static) IP address. That means that the entire local docker setup is pointless now. Which is a shame. |
How do you enable it without web interface ? |
enable what? (selfhosted) cobalt? by 'enable' do you mean 'use'? |
Yes, web interface disappear between version 7 and 10. After update, i can't reach my self hosted website |
you can use your api instance with main frontend instance: https://cobalt.tools/settings/instances#community |
Thanks i read it a bit more up in this discussion, but it's that part i don't understand what to do with |
just paste the instance url there |
Just go it. I paste my URL there For the moment i let api.cobalt.tools but i only see that when i load my URL |
yes, you have to replace it or else tunnels (youtube & etc) won’t work |
Ok, i replace API URL with my domain name. I'm also under a reverse proxy, i uncomment line 127.0.0.1:9000:9000 and comment 9000:9000/tcp but it leads me to a bad gateway 502 error |
I managed to build and serve both the website and API with minor tweaks to the It's probably still a better idea to just replace the instance in https://cobalt.tools/, but hey, if really wants to host the frontend, see below (requires two arguments FROM node:23-alpine AS base
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
FROM base AS build
WORKDIR /app
COPY . /app
RUN corepack enable && pnpm add -g serve
RUN apk add --no-cache python3 alpine-sdk
# Build backend (cobalt-api)
FROM build AS build-api
WORKDIR /app
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
pnpm install --prod --frozen-lockfile
RUN pnpm deploy --filter=@imput/cobalt-api --prod /prod/api
# Build frontend (cobalt-web)
FROM build AS build-web
WORKDIR /app/web
RUN --mount=type=cache,id=pnpm-web,target=/pnpm/store \
pnpm install --prod=false --frozen-lockfile
ARG WEB_HOST
ARG WEB_DEFAULT_API
ENV WEB_HOST=${WEB_HOST}
ENV WEB_DEFAULT_API=${WEB_DEFAULT_API}
RUN pnpm run build
# Merge api+web results
FROM base AS final
WORKDIR /app
RUN apk add --no-cache python3
COPY --from=build-api --chown=node:node /prod/api /app
COPY --from=build-web --chown=node:node /app/web /app/web
COPY .git /app/.git
USER node
EXPOSE 9000
EXPOSE 9001
CMD [ "sh", "-c", "python3 -m http.server 9001 --directory /app/web/build & node src/cobalt" ] For those using docker-compose here's the an example services:
cobalt:
container_name: cobalt
build:
context: ./cobalt
dockerfile: Dockerfile
args:
WEB_HOST: "https://cobalt.example.com/"
WEB_DEFAULT_API: "https://cobalt-api.example.com/"
init: true
read_only: true
restart: unless-stopped
ports:
- 127.0.0.1:8000:9000 # api
- 127.0.0.1:8001:9001 # web
environment:
API_URL: "https://cobalt-api.example.com/"
API_AUTH_REQUIRED: 0
DURATION_LIMIT: 86400 # 24 hours Not very elegant, but does its job. |
That's not how it works. If someone decides to bring up their own instance, there are reasons why they don't want to use the official site |
what are the reasons though? and they're still able to host it just fine, just without docker because it's a static build: https://github.com/imputnet/cobalt/tree/main/web |
Developers can change the code of the official web page at will and these changes will not be public, for example metrics for commercial purposes. And some just physically can not use selfhosted backend, because they are behind NAT. I could also mention the problem of foreign sites being blocked in Russia, which can accidentally cause another site to be blocked (once all sites hosted on Hetzner didn't work), but I think that's a local problem |
you can't use cobalt for commercial purposes (see https://github.com/imputnet/cobalt/blob/main/web/LICENSE) |
Another thread to track that feature suggestion: #1095 |
problem description
I recently did a complete reinstall on my Respberry Pi and wanted to reinstall Cobalt via Docker compose.
After the installation, I noticed that the website no longer exists and the image URL no longer exists in docker-compose.yml.
How can I fix this?
Many thanks in advance.
your instance configuration
The text was updated successfully, but these errors were encountered: