Quickstart
Last updated:
This guide will help you get started with the Tyk AI Studio using Docker Compose.
Prerequisites
- Docker and Docker Compose installed on your system
Setup
-
Create a new directory for your project:
mkdir midsommar && cd midsommar
-
Create a
compose
directory and add the following Docker Compose file:mkdir compose && cd compose
-
Create a
compose.yaml
file with the following content:version: "3" services: ai-sudio: image: tykio/midsommar:latest volumes: - ./confs/.env:/app/.env environment: - DATABASE_URL=postgres://postgres:postgres@postgres:5432/postgres - DATABASE_TYPE=postgres depends_on: - postgres ports: - 8080:8080 # Main application port - 9090:9090 # Management API port postgres: image: postgres:latest environment: - POSTGRES_USER=postgres - POSTGRES_PASSWORD=postgres - POSTGRES_DB=postgres
-
Create a configuration directory and environment file:
mkdir -p confs touch confs/.env
-
Add your configuration to the
.env
file (example):# SMTP_SERVER=smtp.sendgrid.net # SMTP_PORT=587 # SMTP_USER=apikey # SMTP_PASS= ALLOW_REGISTRATIONS=true ADMIN_EMAIL=[email protected] SITE_URL=http://localhost:3000 FROM_EMAIL=[email protected] DATABASE_URL=midsommar.db DATABASE_TYPE=sqlite TYK_AI_SECRET_KEY=a35b3f7b0fb4dd3a048ba4fc6e9fe0a8cb804d7884c62b6b2ea09c99612c4405 FILTER_SIGNUP_DOMAINS=tyk.io TYK_AI_LICENSE=XXXX
Starting the Service
-
Start the services using Docker Compose:
docker compose up -d
-
Verify that the services are running:
docker compose ps
Accessing the Portal
Once the services are running:
- Access the AI Portal interface at:
http://localhost:8080
- Access the Gateway at:
http://localhost:9090
Monitoring Logs
To view the logs from the services:
docker compose logs -f
Stopping the Service
To stop and remove the containers:
docker compose down
Service Components
The Docker Compose setup includes:
-
Tyk AI Studio Service: The main AI Portal application
- Runs on ports 8080 (web interface) and 9090 (management API)
- Connects to PostgreSQL for data storage
- Uses environment variables for configuration
-
PostgreSQL Database:
- Stores application data
- Uses default credentials (configurable via environment variables)
Troubleshooting
If you encounter issues:
- Check that all required ports (8080, 9090) are available
- Ensure your
.env
file contains valid API keys - Verify that Docker and Docker Compose are properly installed
- Check the logs for any error messages:
docker compose logs -f