Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/TelegramOrg/Telegram-web-k/llms.txt

Use this file to discover all available pages before exploring further.

The repository ships three Dockerfiles inside the .docker/ directory — one for resolving dependencies, one for the development server, and one multi-stage build that produces a lean nginx image ready for production. All three are wired together in docker-compose.yaml, so you can switch between workflows with a single command.
The development workflow uses two services: tweb.dependencies installs node modules into a named volume that tweb.develop then mounts, avoiding a full pnpm install on every container restart.
1

Install dependencies

Run the dependencies service to populate the node_modules volume:
docker-compose up tweb.dependencies
This builds Dockerfile_dependencies (Node 18 base), installs pnpm globally, and runs pnpm install. The node_modules folder is written to the ./node_modules bind mount on your host.
2

Start the development container

docker-compose up tweb.develop
The tweb.develop service mounts your entire project directory into /app inside the container, then starts Vite with:
pnpm start-in-docker
start-in-docker is identical to pnpm start but passes --host so Vite binds to 0.0.0.0 instead of localhost, making it reachable outside the container.
3

Open the app

Navigate to http://localhost:8080 in your browser.Because your source files are bind-mounted, edits on the host trigger Vite’s hot module replacement inside the container with no restart required.
Port mapping: 8080 → 8080Volume mounts:
  • ./node_modules/app/node_modules (dependencies service)
  • .//app (develop service — full project)
Run the dependencies service again whenever you add or update packages in package.json. The develop service does not run pnpm install on its own.

docker-compose.yaml reference

version: "3.8"
services:
  tweb.dependencies:
    container_name: tweb.dependencies
    build:
      context: .
      dockerfile: .docker/Dockerfile_dependencies
    volumes:
      - "./node_modules:/app/node_modules"
    command: pnpm install

  tweb.develop:
    container_name: tweb.develop
    build:
      context: .
      dockerfile: .docker/Dockerfile_develop
    volumes:
      - "./:/app"
    ports:
      - 8080:8080
    command: pnpm start-in-docker

  tweb.production:
    container_name: tweb.production
    build:
      context: .
      dockerfile: .docker/Dockerfile_production
    ports:
      - 80:80
The production Dockerfile copies the entire project context, including any .env.local file present on disk. Make sure your .env.local does not contain secrets you do not want baked into a public image before building.

Build docs developers (and LLMs) love