Docker
Stoobly Scaffold Docker Runtime - Questions & Answers
This document covers Docker-specific customization options for Stoobly scaffold. For general customization topics, see README.md. For local runtime customization, see local.md.
Docker Runtime Structure
Q: Which files are created for Docker runtime only?
A: Docker runtime creates build/, entrypoint/, and gateway/ service directories with Docker Compose configurations.
Example:
# Docker-only services:
.stoobly/services/
├── build/ # Docker only
├── entrypoint/ # Docker only
├── gateway/ # Docker only
└── stoobly-ui/ # Both Docker and localUnderstanding the Entrypoint Service
Q: What is the entrypoint service?
A: The entrypoint service is the main container that runs your application or test code within the Docker network. It's where your actual service or test scripts execute.
Example:
Q: What is the purpose of the entrypoint service?
A: The entrypoint service provides a containerized environment where your application runs and makes HTTP requests that get intercepted by Stoobly's proxy through the gateway.
Example:
Q: When is the entrypoint service used?
A: The entrypoint service is used in Docker runtime workflows to run your application code, test suites, or any process that makes HTTP requests you want to intercept.
Example:
Q: How do I customize the entrypoint service?
A: Edit the docker-compose.yml file in the entrypoint workflow directory to add your application container, environment variables, or volumes.
Example:
Q: What's the difference between configure and init scripts in the entrypoint?
A: The configure script runs before services start to set up Stoobly configuration, while init scripts run during container initialization.
Example:
Understanding Docker Core Services
Q: What is the build service?
A: The build service creates the Docker image for Stoobly agent with your application's context, ensuring consistent environments across workflows.
Example:
Q: What is the gateway service?
A: The gateway service runs Traefik reverse proxy that routes HTTP traffic from your services through Stoobly's proxy for interception.
Example:
Docker-Specific Customization
Q: How do I add my application to the entrypoint service?
A: Edit the entrypoint docker-compose.yml to include your application container.
Example:
Q: How do I run my test suite in the entrypoint?
A: Configure the entrypoint service with your test command and ensure it uses the proxy.
Example:
Q: How do I add environment variables to my Docker service?
A: Add environment variables in the docker-compose.yml file for your service.
Example:
Q: How do I mount volumes for my Docker service?
A: Add volume mounts in the docker-compose.yml to share files between host and container.
Example:
Q: What is the docker-compose.yml file used for?
A: The docker-compose.yml defines the service container, its dependencies, networks, environment variables, and how it connects to other services.
Example:
Q: How do I use a custom context directory?
A: Set the STOOBLY_CONTEXT_DIR environment variable to your desired context directory before running Makefile commands.
Example:
Q: How do I run workflows with custom namespaces?
A: Use the namespace variable to specify a custom workflow namespace when running Makefile commands.
Example:
Q: How do I run workflows in dry-run mode?
A: Use the --dry-run flag with the CLI command to see what commands would be executed without running them.
Example:
Advanced Configuration
Q: How do I increase logging verbosity?
A: Use the make logs command with options to control logging verbosity. You can also set the workflow_log_extra_options variable to pass additional options.
Example:
Q: How do I follow workflow logs in real-time?
A: Use the make logs command with the --follow option to stream logs continuously.
Example:
Docker Troubleshooting
Q: How do I view Docker logs for my services?
A: Use docker-compose logs to view container output.
Example:
Q: What is the run.sh script?
A: The run.sh script is auto-generated by the scaffold workflow up command and contains the Docker Compose commands to start the workflow.
Example:
Last updated
Was this helpful?