Services Overview
Every Playspec defines one or more services — the individual containers that make up your development environment. Services are classified into two types that determine how they are built, run, and managed.
Service Types
Static Services
A static service runs a pre-built Docker image without any source code mounting.
| Feature | Static Service |
|---|---|
| Source code mounting | ❌ No |
| Auto-sync (git pull) | ❌ No |
| Production mode toggle | ❌ No |
| Requires a Playzone | ❌ No |
Use for: Databases, caches, message brokers, and other infrastructure components that run unchanged Docker images.
Examples: postgres:16, redis:7, rabbitmq:3-management, elasticsearch:8
Dynamic Services
A dynamic service is backed by source code from a Playzone. It supports two runtime modes:
Dev Mode (Default)
| Feature | Dev Mode |
|---|---|
| Source code mounting | ✅ Yes — code is mounted into the container at the configured working directory |
| Auto-sync (git pull) | ✅ Yes — Playguard pulls new commits when the working tree is clean |
| Git operations | ✅ Yes — commit, push, pull directly from the container terminal |
Production Mode
| Feature | Production Mode |
|---|---|
| Source code mounting | ❌ No — the service runs from a built Docker image |
| Auto-sync (git pull) | ❌ No |
| Automatic rebuild | ❌ No — manual re-creation required when new commits land |
See Advanced Configuration for details on toggling production mode.
Service Classification Flow
When you provide a Docker Compose YAML to create a Playspec, the platform:
- Parses the YAML and extracts all service definitions
- Presents each service for classification
- Requires you to mark each service as either
staticordynamic - Validates dynamic services have a linked Playzone, Dockerfile path, and working directory
- Validates static services have an image specified
Container Mapping
The platform maps each service name in your Compose YAML to a Docker container. The resulting containers follow Docker Compose naming conventions under the Playground's compose project name:
{compose_project}_{service_name}_1
For example, a service named web in a Playground with project pg-42-my-app would run as pg-42-my-app_web_1.
Services communicate with each other using standard Docker Compose networking — use the service name as the hostname for internal communication (e.g., db, redis, web).