Skip Navigation

I want to create my own self-hosted Typst web editor using Code-server. But I'm struggling to get preview to work.

Can you help me with these steps?

I created Dockerfile & docker-compose.yaml to spin up a docker container with which I can just docker compose up -d --build.

Steps to recreate:

  1. Set up a docker ready machine
  2. create a folder e.g. typst-server
  3. Create and put Dockerfile & docker-compose.yaml inside of the folder
  4. docker compose up -d --build
  5. Go to http://your-ip:8443/
  6. Install Tinymist Extension for real time preview
  7. You can see that the preview shows nothing except gray background.

Dockerfile

 
    
FROM lscr.io/linuxserver/code-server:latest

RUN apt update && apt install -y \
    git \
    curl \
    wget \
    tar \
    xz-utils \
    python3\
    && apt clean \
    && rm -rf /var/lib/apt/lists/*

RUN wget -qO typst.tar.xz https://github.com/typst/typst/releases/latest/download/typst-x86_64-unknown-linux-musl.tar.xz
RUN tar xf typst.tar.xz --strip-components=1 -C /usr/local/bin typst-x86_64-unknown-linux-musl/typst



  

docker-compose.yaml

 
    
services:
  code-server:
    build:
      context: .
    ports:
      - "8443:8443"
    volumes:
      - "./data:/home/coder/project"
    environment:
      PASSWORD: "mypasswordhere"

    restart: unless-stopped

  
0 comments

No comments