Skip to content

Instantly share code, notes, and snippets.

@ibayazit
Created October 3, 2022 10:46
Show Gist options
  • Save ibayazit/39493c7246efbe762822746b70395bfc to your computer and use it in GitHub Desktop.
Save ibayazit/39493c7246efbe762822746b70395bfc to your computer and use it in GitHub Desktop.
Bitbucker Deploy to Heroku
# Template PHP Build
# This template allows you to validate your PHP application.
# The workflow allows running tests and code linting on the default branch.
image: composer:2.0
definitions:
services:
mysql:
image: mysql
variables:
MYSQL_DATABASE: 'DATABASENAME'
MYSQL_ROOT_PASSWORD: 'PASSWORD'
mongodb:
image: mongo
pipelines:
branches:
master:
- step:
name: Deploy to production
deployment: production
script:
- git archive --format=tar.gz master -o application.tar.gz
- pipe: atlassian/heroku-deploy:0.1.1
variables:
HEROKU_API_KEY: $HEROKU_API_KEY
HEROKU_APP_NAME: $HEROKU_APP_NAME
ZIP_FILE : "application.tar.gz"
services:
- mysql
- mongodb
web: vendor/bin/heroku-php-apache2 public/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment