teamcity-data:
    image: busybox
    tty: true
    volumes:
        - /var/lib/teamcity

teamcity-server:
    image: sjoerdmulder/teamcity:latest
    ports:
        - ${http_port}:8111
    links:
        - postgres:${postgress_container}
    environment:
        http_proxy: ${http_proxy}
        https_proxy: ${https_proxy}
    labels:
        io.rancher.sidekicks: teamcity-data
    volumes_from:
        - teamcity-data        

postgres-data:
    image: busybox
    tty: true
    volumes:
        - ${postgres_data}

postgres:
    image: postgres:latest
    ports:
        - ${postgress_port}:5432
    environment:
        PGDATA: ${postgres_data}
        POSTGRES_DB: ${postgres_db}
        POSTGRES_USER: ${postgres_user}
        POSTGRES_PASSWORD: ${postgres_password}
    tty: true
    stdin_open: true
    labels:
        io.rancher.sidekicks: postgres-data
    volumes_from:
        - postgres-data

teamcity-agent:
    image: sjoerdmulder/teamcity-agent:latest
    links:
        - teamcity-server:teamcity-server
    environment:
        TEAMCITY_SERVER: http://teamcity-server:8111

