Skip to content

Instantly share code, notes, and snippets.

@tlwr
Last active April 10, 2019 17:17
Show Gist options
  • Save tlwr/574813752b35ed50722942eabe2567df to your computer and use it in GitHub Desktop.
Save tlwr/574813752b35ed50722942eabe2567df to your computer and use it in GitHub Desktop.
Horrible local Concourse
version: '3.1'
services:
socat:
image: alpine/socat:1.0.3
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- 1234:1234
command:
- TCP-LISTEN:1234,fork
- UNIX-CONNECT:/var/run/docker.sock
concourse-db:
image: postgres:9.6
environment:
POSTGRES_DB: concourse
POSTGRES_PASSWORD: concourse_pass
POSTGRES_USER: concourse_user
PGDATA: /database
concourse:
image: concourse/concourse:4.2.3
privileged: true
depends_on: [concourse-db, socat]
ports: ["8080:8080"]
environment:
CONCOURSE_POSTGRES_HOST: concourse-db
CONCOURSE_POSTGRES_USER: concourse_user
CONCOURSE_POSTGRES_PASSWORD: concourse_pass
CONCOURSE_POSTGRES_DATABASE: concourse
CONCOURSE_EXTERNAL_URL: 'http://localhost:8080'
command: quickstart --add-local-user=test:test --main-team-local-user=test
# you may have to run this a couple of times to get things to start up nicely
docker-compose up
# in a separate window run this
fly -t local login -c http://localhost:8080 -b
fly -t local set-pipeline -p horrible -c pipeline.yml
fly -t local unpause-pipeline -p horrible
fly -t local trigger-job -j horrible/deploy-a-thing
jobs:
- name: deploy-a-thing
serial: true
plan:
- task: deploy-a-thing-using-docker
config:
platform: linux
image_resource:
type: docker-image
source:
repository: docker
tag: latest
run:
path: docker
args:
- -H
- socat:1234
- run
- --rm
- -d
- -p
- 8081:80
- nginx:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment