Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Quickstart Guide

This guide will help you get started with TSM quickly. Follow these steps to set up and run your first service.

1. Install Dependencies

First, install the required dependencies:

tsm install-deps

2. Initialize Configuration

Initialize your configuration with your Docker Compose file:

tsm init-config -f docker-compose.yml

This will create the necessary configuration files in the proxy directory.

3. Configure Certificates

Edit the generated certificate configuration:

vim proxy/cert-config.yml

Then generate your certificates:

tsm generate-certs -c proxy/cert-config.yml

4. Generate Traefik Configuration

Generate the initial Traefik configuration:

tsm generate

For development, you can watch for changes:

tsm generate --watch

5. Launch Services

Start all your services:

tsm up

6. Monitor Services

Check the status of your services:

tsm status

To start auto-scaling monitoring:

tsm monitor

Example Docker Compose File

Here's a basic example of a Docker Compose file that works with TSM:

version: '3'

services:
  traefik:
    image: traefik:v2.10
    ports:
      - "80:80"
      - "443:443"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
      - ./proxy:/etc/traefik
    networks:
      - traefik

  whoami:
    image: traefik/whoami
    labels:
      - "traefik.enable=true"
      - "traefik.http.routers.whoami.rule=Host(`whoami.localhost`)"
    networks:
      - traefik

networks:
  traefik:
    external: true

Next Steps