https://github.com/thenets/heroku-docker
https://github.com/thenets/heroku-docker
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/thenets/heroku-docker
- Owner: thenets
- Created: 2020-04-05T08:10:06.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-04-05T19:26:36.000Z (about 6 years ago)
- Last Synced: 2025-02-14T21:46:55.964Z (over 1 year ago)
- Language: PHP
- Size: 2.93 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Heroku + Docker
How to integrate Heroku automated build + Docker.
## Heroku config file
Add the `heroku.yml` to the repository root. That file declares where the Dockerfile is located:
```yaml
build:
docker:
web: Dockerfile
```
## Customizable server port
The Heroku container support requires a non fixed port. Heroku will define an environment variable called `$PORT` that may change on every deployment. So your application needs to be flexible to have this support.
In this project you can find the use of this variable at `entrypoint.sh`:
```bash
#!/bin/bash
cd /app
php -S 0.0.0.0:${PORT}
```
## Set application stack for container
```bash
heroku stack:set container -a
```