One-Click Services¶
GoForge provides a catalog of pre-configured services that can be deployed with a single click.
Docker Required
Service deployment requires GoForge to have access to the Docker daemon (via Docker socket). This is available when running via docker-compose, not when running locally with make dev.
Available Services¶
PostgreSQL¶
A relational database management system.
| Setting | Default | Description |
|---|---|---|
| Version | 16 | PostgreSQL major version |
| Port | 5432 | Container port |
| Database | app | Default database name |
| Username | postgres | Admin username |
| Password | Auto-generated | Admin password |
| Storage | Docker volume | Persistent data storage |
Redis¶
An in-memory data store for caching, sessions, and message queues.
| Setting | Default | Description |
|---|---|---|
| Version | 7 | Redis major version |
| Port | 6379 | Container port |
| Password | Optional | Auth password |
| Persistence | AOF + RDB | Data persistence mode |
Deploying a Service¶
- Navigate to Services in the sidebar
- Browse the service catalog
- Click Deploy on the desired service
- Configure any options (version, credentials, etc.)
- Click Confirm
GoForge will:
- Pull the Docker image
- Create a container with the appropriate configuration
- Set up persistent volumes for data
- Configure health checks
- Display connection information
Managing Services¶
Service Actions¶
| Action | Description |
|---|---|
| Restart | Restart the service container |
| Delete | Stop and remove the service and its data |
Connection Information¶
After deploying a service, GoForge displays connection details:
- Host: Container name or internal IP
- Port: Service port
- Credentials: Username and password
- Connection string: Ready-to-use connection URL
Connecting from deployed apps
Applications deployed through GoForge can connect to services using Docker's internal DNS. Use the container name as the hostname (e.g., postgres-abc123:5432).
Service Templates¶
Services are defined by YAML templates in the templates/ directory. Each template specifies:
name: postgres
display_name: PostgreSQL
description: The world's most advanced open source relational database.
icon: postgres
category: database
versions:
- "16"
- "15"
- "14"
default_version: "16"
config:
- name: database
label: Database Name
type: text
default: "app"
required: true
- name: username
label: Username
type: text
default: "postgres"
required: true
- name: password
label: Password
type: password
generate: true
required: true
resources:
cpu: "0.5"
memory: "512m"
docker:
image: "postgres:{{ .Version }}"
ports:
- container: 5432
protocol: tcp
environment:
POSTGRES_DB: "{{ .Config.database }}"
POSTGRES_USER: "{{ .Config.username }}"
POSTGRES_PASSWORD: "{{ .Config.password }}"
volumes:
- name: data
path: /var/lib/postgresql/data
health_check:
test: ["CMD-SHELL", "pg_isready -U {{ .Config.username }}"]
interval: 10s
timeout: 5s
retries: 5
connection:
internal: "postgres://{{ .Config.username }}:{{ .Config.password }}@{{ .ContainerName }}:5432/{{ .Config.database }}"
Key differences from a flat structure:
versionsis a simple string array, with a separatedefault_versionfieldconfigdefines user-facing input fields (name, label, type, default, generate, required)dockernests all Docker-specific settings:image,ports,environment,volumes,health_checkresourcesspecifies CPU and memory limitsconnectionprovides a Go template for connection strings- Template values use Go template syntax (e.g.,
{{ .Version }},{{ .Config.database }},{{ .ContainerName }})
Adding Custom Service Templates¶
To add a new service to the catalog:
- Create a YAML file in the
templates/directory (or your configuredTEMPLATES_DIR) - Follow the template schema shown above, with
configfor user inputs anddockerfor container settings - Restart GoForge or reload templates
The template will appear in the service catalog automatically.
See Service Templates Reference for the complete template specification.