1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Talos License Server - Docker Compose
#
# Usage:
# Start services: docker compose up -d
# View logs: docker compose logs -f
# Stop services: docker compose down
# Reset database: docker compose down -v
#
# The first startup will create a bootstrap token - check logs:
# docker compose logs talos | grep "BOOTSTRAP TOKEN"
services:
# ==========================================================================
# Talos License Server
# ==========================================================================
talos:
build:
context: .
dockerfile: Dockerfile
args:
# Include all production features
FEATURES: "server,postgres,jwt-auth,admin-api,rate-limiting,background-jobs,openapi"
container_name: talos-server
restart: unless-stopped
ports:
- "8080:8080"
environment:
# Server
TALOS_SERVER_HOST: "0.0.0.0"
TALOS_SERVER_PORT: "8080"
# Database (PostgreSQL)
TALOS_DATABASE_TYPE: "postgres"
TALOS_DATABASE_URL: "postgres://talos:talos_secret@db:5432/talos"
# Authentication
TALOS_AUTH_ENABLED: "true"
TALOS_JWT_SECRET: "${TALOS_JWT_SECRET:-change-this-secret-in-production}"
# Logging
TALOS_LOGGING_ENABLED: "true"
TALOS_LOG_LEVEL: "info"
# License key prefix (customize per product)
TALOS_LICENSE_KEY_PREFIX: "LIC"
depends_on:
db:
condition: service_healthy
healthcheck:
test:
interval: 30s
timeout: 3s
retries: 3
start_period: 10s
volumes:
# Mount config file (optional - env vars take precedence)
- ./config.toml:/app/config.toml:ro
networks:
- talos-network
# ==========================================================================
# PostgreSQL Database
# ==========================================================================
db:
image: postgres:16-alpine
container_name: talos-db
restart: unless-stopped
environment:
POSTGRES_USER: talos
POSTGRES_PASSWORD: talos_secret
POSTGRES_DB: talos
volumes:
# Persist database data
- talos-db-data:/var/lib/postgresql/data
# Initialize schema on first run
- ./scripts/sql/init_postgres.sql:/docker-entrypoint-initdb.d/01-schema.sql:ro
healthcheck:
test:
interval: 10s
timeout: 5s
retries: 5
start_period: 10s
networks:
- talos-network
# ==========================================================================
# Volumes
# ==========================================================================
volumes:
talos-db-data:
driver: local
# ==========================================================================
# Networks
# ==========================================================================
networks:
talos-network:
driver: bridge