Concourse CI
Container-based continuous integration and delivery.
Overview
Concourse CI is a container-native continuous integration and delivery platform that treats pipelines as first-class resources defined in YAML. Unlike traditional CI/CD systems that rely on plugins and complex configurations, Concourse embraces immutable infrastructure principles where every build runs in isolated containers, ensuring reproducible and reliable automation workflows. The platform separates compute resources (workers) from coordination logic (web interface), enabling horizontal scaling and distributed build execution.
This deployment consists of three interconnected services: concourse-db provides PostgreSQL database storage for pipeline definitions, build history, and authentication data; concourse-web serves the web interface, API, and pipeline orchestration on port 8080; and concourse-worker handles actual job execution with privileged container access for Docker-in-Docker operations. The web component communicates with workers through an internal TSA (SSH-based) connection on port 2222, while shared volumes ensure cryptographic keys are available across services.
This configuration targets development teams and DevOps engineers who need a robust, scalable CI/CD solution that can handle complex pipeline dependencies, parallel job execution, and resource management. The container-based approach makes it particularly valuable for organizations already invested in containerized infrastructure, offering native Docker support and the ability to run any toolchain within isolated build environments.
Key Features
- Pipeline-as-Code with YAML definitions stored in version control alongside application code
- Resource-based pipeline modeling where inputs/outputs are explicit dependencies between jobs
- Container-native job execution with automatic Docker image pulling and cleanup
- Distributed worker architecture supporting horizontal scaling across multiple nodes
- Built-in authentication with local users and external provider integration
- Fly CLI for pipeline management, job triggering, and build log streaming from command line
- Automatic build triggering based on resource changes like Git commits or Docker image updates
- Visual pipeline interface showing real-time job status and resource flow dependencies
Common Use Cases
- 1Multi-stage application delivery pipelines with testing, building, and deployment phases
- 2Infrastructure-as-Code validation and deployment using Terraform, Ansible, or Kubernetes manifests
- 3Microservices CI/CD with parallel builds and coordinated deployment orchestration
- 4Security scanning workflows integrating vulnerability assessment and compliance checking
- 5Automated testing environments with database seeding, integration tests, and cleanup
- 6Release management with approval gates, rollback capabilities, and environment promotion
- 7Development team onboarding with standardized build environments and consistent tooling
Prerequisites
- Minimum 2GB RAM recommended for PostgreSQL database and concurrent pipeline execution
- Docker host with privileged container support for concourse-worker build isolation
- Port 8080 available for web interface access and API communication
- Basic YAML knowledge for pipeline definition and job configuration
- Understanding of CI/CD concepts including resources, jobs, and task dependencies
- Fly CLI installation for pipeline management and build interaction from development machines
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 concourse-db: 3 image: postgres:15-alpine4 container_name: concourse-db5 restart: unless-stopped6 environment: 7 POSTGRES_DB: concourse8 POSTGRES_USER: concourse9 POSTGRES_PASSWORD: ${DB_PASSWORD}10 volumes: 11 - concourse_db:/var/lib/postgresql/data1213 concourse-web: 14 image: concourse/concourse:latest15 container_name: concourse-web16 command: web17 restart: unless-stopped18 depends_on: 19 - concourse-db20 environment: 21 CONCOURSE_POSTGRES_HOST: concourse-db22 CONCOURSE_POSTGRES_DATABASE: concourse23 CONCOURSE_POSTGRES_USER: concourse24 CONCOURSE_POSTGRES_PASSWORD: ${DB_PASSWORD}25 CONCOURSE_EXTERNAL_URL: http://localhost:808026 CONCOURSE_ADD_LOCAL_USER: admin:${ADMIN_PASSWORD}27 CONCOURSE_MAIN_TEAM_LOCAL_USER: admin28 CONCOURSE_CLUSTER_NAME: dev29 ports: 30 - "8080:8080"31 volumes: 32 - concourse_keys:/concourse-keys3334 concourse-worker: 35 image: concourse/concourse:latest36 container_name: concourse-worker37 command: worker38 privileged: true39 restart: unless-stopped40 depends_on: 41 - concourse-web42 environment: 43 CONCOURSE_TSA_HOST: concourse-web:222244 volumes: 45 - concourse_keys:/concourse-keys4647volumes: 48 concourse_db: 49 concourse_keys: .env Template
.env
1DB_PASSWORD=changeme2ADMIN_PASSWORD=changemeUsage Notes
- 1Docs: https://concourse-ci.org/docs.html
- 2Access at http://localhost:8080 - login with admin/ADMIN_PASSWORD
- 3Install fly CLI: download from http://localhost:8080/api/v1/cli
- 4Login: fly -t main login -c http://localhost:8080 -u admin -p PASSWORD
- 5Set pipeline: fly -t main set-pipeline -p my-pipeline -c pipeline.yml
- 6Resources, jobs, and tasks define pipelines in YAML
Individual Services(3 services)
Copy individual services to mix and match with your existing compose files.
concourse-db
concourse-db:
image: postgres:15-alpine
container_name: concourse-db
restart: unless-stopped
environment:
POSTGRES_DB: concourse
POSTGRES_USER: concourse
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- concourse_db:/var/lib/postgresql/data
concourse-web
concourse-web:
image: concourse/concourse:latest
container_name: concourse-web
command: web
restart: unless-stopped
depends_on:
- concourse-db
environment:
CONCOURSE_POSTGRES_HOST: concourse-db
CONCOURSE_POSTGRES_DATABASE: concourse
CONCOURSE_POSTGRES_USER: concourse
CONCOURSE_POSTGRES_PASSWORD: ${DB_PASSWORD}
CONCOURSE_EXTERNAL_URL: http://localhost:8080
CONCOURSE_ADD_LOCAL_USER: admin:${ADMIN_PASSWORD}
CONCOURSE_MAIN_TEAM_LOCAL_USER: admin
CONCOURSE_CLUSTER_NAME: dev
ports:
- "8080:8080"
volumes:
- concourse_keys:/concourse-keys
concourse-worker
concourse-worker:
image: concourse/concourse:latest
container_name: concourse-worker
command: worker
privileged: true
restart: unless-stopped
depends_on:
- concourse-web
environment:
CONCOURSE_TSA_HOST: concourse-web:2222
volumes:
- concourse_keys:/concourse-keys
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 concourse-db:5 image: postgres:15-alpine6 container_name: concourse-db7 restart: unless-stopped8 environment:9 POSTGRES_DB: concourse10 POSTGRES_USER: concourse11 POSTGRES_PASSWORD: ${DB_PASSWORD}12 volumes:13 - concourse_db:/var/lib/postgresql/data1415 concourse-web:16 image: concourse/concourse:latest17 container_name: concourse-web18 command: web19 restart: unless-stopped20 depends_on:21 - concourse-db22 environment:23 CONCOURSE_POSTGRES_HOST: concourse-db24 CONCOURSE_POSTGRES_DATABASE: concourse25 CONCOURSE_POSTGRES_USER: concourse26 CONCOURSE_POSTGRES_PASSWORD: ${DB_PASSWORD}27 CONCOURSE_EXTERNAL_URL: http://localhost:808028 CONCOURSE_ADD_LOCAL_USER: admin:${ADMIN_PASSWORD}29 CONCOURSE_MAIN_TEAM_LOCAL_USER: admin30 CONCOURSE_CLUSTER_NAME: dev31 ports:32 - "8080:8080"33 volumes:34 - concourse_keys:/concourse-keys3536 concourse-worker:37 image: concourse/concourse:latest38 container_name: concourse-worker39 command: worker40 privileged: true41 restart: unless-stopped42 depends_on:43 - concourse-web44 environment:45 CONCOURSE_TSA_HOST: concourse-web:222246 volumes:47 - concourse_keys:/concourse-keys4849volumes:50 concourse_db:51 concourse_keys:52EOF5354# 2. Create the .env file55cat > .env << 'EOF'56DB_PASSWORD=changeme57ADMIN_PASSWORD=changeme58EOF5960# 3. Start the services61docker compose up -d6263# 4. View logs64docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/concourse-ci/run | bashTroubleshooting
- concourse-web fails to start with database connection errors: Verify DB_PASSWORD environment variable matches between concourse-db and concourse-web services
- concourse-worker shows 'failed to register with ATC' errors: Check that concourse-web is fully started and accessible before worker attempts registration
- Pipeline jobs fail with 'no workers available' message: Ensure concourse-worker container has privileged: true and can communicate with concourse-web on port 2222
- Web interface shows 503 errors during startup: Wait for PostgreSQL database initialization to complete before concourse-web attempts schema creation
- Fly CLI login fails with certificate errors: Use -k flag to skip SSL verification when connecting to http://localhost:8080 in development environments
- Build containers fail with permission errors: Verify Docker socket access and privileged mode settings for concourse-worker container
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Components
concourse-webconcourse-workerpostgresql
Tags
#concourse#ci#cd#pipelines
Category
DevOps & CI/CDAd Space
Shortcuts: C CopyF FavoriteD Download