Skip to content
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

Dockerfile #147

Open
coutouly opened this issue Nov 16, 2023 · 8 comments
Open

Dockerfile #147

coutouly opened this issue Nov 16, 2023 · 8 comments
Labels
enhancement New feature or request

Comments

@coutouly
Copy link

coutouly commented Nov 16, 2023

Describe the bug
here is a working dockerfile maybe you help me improve it

To Reproduce

FROM archlinux

RUN pacman -Sy --needed git xorg-server-xvfb base-devel webkit2gtk rust npm nodejs --noconfirm


WORKDIR /app
RUN git clone https://github.com/StarlaneStudios/Surrealist.git

WORKDIR /app/Surrealist
RUN npm i  pnpm
RUN sed -i '/port: 1420/i\    host: true,' vite.config.ts
CMD ["xvfb-run", "npm", "run", "tauri:dev"]
EXPOSE  1420

Expected behavior
docker build .
docker run

Environment (you can view the current version under Settings):

@coutouly coutouly added the bug Something isn't working label Nov 16, 2023
@ravensorb
Copy link

Would be great to see a standard docker image that could be used to deploy along with SurrealDb for development purposes.

@macjuul
Copy link
Contributor

macjuul commented Apr 26, 2024

I'm struggling to see the necessity of a docker image considering Surrealist can already be accessed universally as a web app (surrealist.app), or installed locally as desktop app. Which benefits will a docker image provide over the existing deployment targets?

@macjuul macjuul added the awaiting response Waiting for a reply from submitter label Apr 26, 2024
@OmanF
Copy link

OmanF commented Apr 28, 2024

@macjuul, while I haven't tried the Docker approach yet, I can think of a couple of reasons:

  • Web UI - The SurrealDB team themselves, on the official documentation, admit the web UI has several setbacks, security-wise, that make it inferior to the installed app.
  • That, in itself, pushing you towards an installed app, is something I don't like, especially as the installed app is native, i.e. not one of the condensed platforms (Flatpak, AppImage, etc.)
  • Also, as the issue board shows, the web UI has several outstanding showstopper issues at the moment, making using it nearly impossible.
  • Installed app - As the issue board itself shows, the installed native app is also nearly useless on some platforms - seems the only platform that doesn't have issues is macOS (how very surprising</endCynicism>).
  • As I mentioned earlier, if forced to have a local instance, I'd rather have it in one of the condensed, writing-limited-to-its-sandbox, app formats, not one that has access to every bit, literally, of my machine.

I'm not arguing these reasons are valid enough to merit an official Docker image, but if I were part of SurrealDB team, I would not dismiss it out of hand, either.

Unfortunately, for a production-ready app, Surrealist, on all platforms but macOS is... not.
Having an official, working, Docker image will go a long way towards SurrealDB, and Surrealist's image, pun intended, which at the moment is not great... and I'm saying this as someone who is following the whole Surreal* ecosystem since it was v0.9.

@Zercerium
Copy link

It would be a benefit to deploy your own instance, so that you don't have to rely on the web app and you have the control about what is running. Also not everyone need to install a separate app and keep it updated.

I would be nice to have something like pgadmin for surrealDB, which could be surrealist.

@coutouly
Copy link
Author

Hello
I saw the site surrealist.app and i want to install the same as you did.
I cant use surréaliste.app because i work behind firewall.

@macjuul macjuul removed the awaiting response Waiting for a reply from submitter label Apr 29, 2024
@macjuul
Copy link
Contributor

macjuul commented Apr 29, 2024

Thanks for the feedback everyone! I hear you, and will spend some time researching the viability of publishing an official docker image in the near future

@macjuul macjuul added enhancement New feature or request and removed bug Something isn't working labels May 2, 2024
@ivs
Copy link

ivs commented May 11, 2024

This one for webapp hosting:

FROM node

RUN npm i -g pnpm

WORKDIR /app
COPY . /app

RUN pnpm install && pnpm run build

EXPOSE 1420

ENTRYPOINT [ "pnpm", "run", "start", "--host" ]

And compose like this(with traefik)

  surrealdb:
    image: surrealdb/surrealdb:latest
    command: start --auth -u root -p root tikv:https://pd:2379
    depends_on:
      - "tikv"
    labels:
      - traefik.http.routers.surrealdb.rule=Host(`surrealdb.domain`)
      - traefik.http.services.surrealdb.loadbalancer.server.port=8000
      - traefik.http.routers.surrealdb.entrypoints=websecure
      - traefik.http.routers.surrealdb.tls=true

  surrealist:
    image: surrealist
    labels:
      - traefik.http.routers.surrealist.rule=Host(`surrealist.domain`)
      - traefik.http.services.surrealist.loadbalancer.server.port=1420
      - traefik.http.routers.surrealist.entrypoints=websecure
      - traefik.http.routers.surrealist.tls=true
      - traefik.http.routers.portainer.middlewares=auth

It seems that surrealist access db thru a browser, doesn't work for compose hosts.

@Sandros94
Copy link

Hi, I'm the author of the nuxt-surrealdb, a Nuxt's Module with the goal of simplifying the DX when using SurrealDB in a Nuxt project.

Nuxt has something called DevTools that expose a number of Nuxt utilities for managing the current project during development. I had plans to add Surrealist to a dedicated tab of this DevTools, thus letting developers both manage their project and database in one window. But since this requires iframes it is currently not possible with the official surrealist.app (although understandable).

A self-hosted Surrealist image would let developers opt-in and simplify their work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

7 participants