sanjib-sen / WebLaTex

A complete alternative for Overleaf with VSCode + Web + Git Integration + Copilot + Grammar & Spell Checker + Live Collaboration Support. Based on GitHub Codespace and Dev container.
https://github.com/sanjib-sen/weblatex/generate
MIT License
979 stars 277 forks source link

self-hosted version #22

Open rica01 opened 9 months ago

rica01 commented 9 months ago

Hello. This is a great piece of work. Thank you for all your work.

Do you think it would be possible to have a self-hosted version?

sanjib-sen commented 9 months ago

Yes absolutely.

Do you have Docker installed in your system? If yes, create this Dockerfile file in the .devcontainer directory of this repo,

#.devcontainer/Dockerfile

FROM texlive/texlive:latest-full
RUN apt-get update && apt-get install -y \
    git perl \
    && rm -rf /var/lib/apt/lists/* \
    && apt-get clean \
    && apt-get autoremove -y \
    && rm -rf /var/lib/apt/lists/* \
    && rm -rf /tmp/* \
    && echo welcome to WebLaTeX

Then in your .devcontainer/devcontainer.json file, replace "image": "sanjibsen/weblatex:latest", with "build": { "dockerfile": "Dockerfile" }, (in line 5)

You are good to go. Let me know if you need any help. I can create another example repository which you can just clone if you want?

References:

  1. https://code.visualstudio.com/docs/devcontainers/create-dev-container#_dockerfile
  2. https://github.com/sanjib-sen/weblatex-docker/blob/main/Dockerfile