Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sue445/dockerfile-heroku-cli
Dockerfile for heroku deployment
https://github.com/sue445/dockerfile-heroku-cli
dockerfile heroku
Last synced: 27 days ago
JSON representation
Dockerfile for heroku deployment
- Host: GitHub
- URL: https://github.com/sue445/dockerfile-heroku-cli
- Owner: sue445
- License: mit
- Created: 2018-02-08T13:24:01.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2024-11-11T19:05:05.000Z (about 1 month ago)
- Last Synced: 2024-11-11T20:18:48.751Z (about 1 month ago)
- Topics: dockerfile, heroku
- Language: Dockerfile
- Homepage: https://hub.docker.com/r/sue445/heroku-cli/
- Size: 171 KB
- Stars: 6
- Watchers: 3
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sue445/heroku-cli
Dockerfile for heroku deployment[![Build Status](https://github.com/sue445/dockerfile-heroku-cli/workflows/build/badge.svg?branch=master)](https://github.com/sue445/dockerfile-heroku-cli/actions?query=workflow%3Abuild)
[![Build Status](https://github.com/sue445/dockerfile-heroku-cli/workflows/update_version/badge.svg?branch=master)](https://github.com/sue445/dockerfile-heroku-cli/actions?query=workflow%3Aupdate_version)
[![CircleCI](https://circleci.com/gh/sue445/dockerfile-heroku-cli/tree/master.svg?style=svg)](https://circleci.com/gh/sue445/dockerfile-heroku-cli/tree/master)* https://hub.docker.com/r/sue445/heroku-cli/
* https://github.com/sue445/dockerfile-heroku-cli## Build
```bash
docker build --rm -t heroku-cli .
```## Running
```bash
docker run -it --rm sue445/heroku-cli bash
```## Example
### CircleCI 2.1+
Use https://circleci.com/orbs/registry/orb/circleci/heroku`sue445/heroku-cli` is unnecessary
### CircleCI 2.0 (deprecated)
The following are deprecated.```yml
# .circleci/config.yml
version: 2jobs:
deploy:
docker:
- image: sue445/heroku-cli
working_directory: /home/circleci/appsteps:
- run:
name: Setup Heroku
command: |-
cat > ~/.netrc << EOF
machine git.heroku.com
login $HEROKU_LOGIN
password $HEROKU_API_KEY
EOFmkdir -m 700 -p ~/.ssh/
cat >> ~/.ssh/config << EOF
StrictHostKeyChecking no
EOF- checkout
- add_ssh_keys:
fingerprints:
- "xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx"- run:
name: Deploy to Heroku
command: |-
heroku config:add BUNDLE_WITHOUT="test:development" --app $HEROKU_APP_NAME
heroku git:remote -a $HEROKU_APP_NAMEgit push heroku $CIRCLE_SHA1:refs/heads/master
heroku run rake db:migrate --app $HEROKU_APP_NAME
workflows:
version: 2build-and-deploy:
jobs:
- deploy:
filters:
branches:
only: master
```### GitLab CI
```yml
# .gitlab-ci.yml
stages:
- deploydeploy:
stage: deployimage: sue445/heroku-cli
resource_group: heroku
script:
- heroku config:add BUNDLE_WITHOUT="test:development" --app ${HEROKU_APP_NAME}
- git push https://heroku:${HEROKU_API_KEY}@git.heroku.com/${HEROKU_APP_NAME}.git ${CI_COMMIT_SHA}:master
- heroku run rake db:migrate --app ${HEROKU_APP_NAME}only:
- master
```