sandstorm/heroku

Integration of Flow and Neos based projects with Heroku or Dokku PAAS Platform

Installs: 5 491

Dependents: 0

Suggesters: 0

Security: 0

Stars: 7

Watchers: 12

Forks: 3

Open Issues: 0

Type:neos-package

2.0.1 2018-05-23 09:02 UTC

This package is auto-updated.

Last update: 2024-10-09 05:18:06 UTC


README

We at sandstorm|media use Dokku to deploy applications quickly and easily to our server. Nevertheless, it is often time-consuming to manually make applications ready for the deployment with Dokku or Heroku. Thus, we created this package to minimize your effort of making TYPO3 Flow and Neos based projects ready for deployment in a few seconds.

Prerequisites

A Flow version greater or equal to 3.0 is mandatory.

Compatibility and Maintenance

This package is currently being maintained for Neos 2.3 LTS and Neos 3.x.

Usage

  1. When using composer, you can conveniently add this package to your application by typing the following command in your command line:
    composer require sandstorm/heroku
  2. After adding this package to your application, make your project ready for Dokku with this command:
    ./flow heroku:addToProject composer update
  3. Add the base URI placeholder to your Settings.yaml
Neos: #For Neos 2.3 LTS, the top-level key must be TYPO3 instead of Neos
  Flow:
    http:
      baseUri: %env:BASE_URI%

Deployment on Dokku

Execute the following steps to deploy the App to Dokku (commands below):

  1. create your Dokku App
  2. make Data/Persistent persistent over updates
  3. create a database
  4. link the database with the App
  5. add domain to App
  6. set the baseUri
  7. set flow context
  8. set database config
  9. add dokku as git remote
  10. push your project to Dokku
  11. (optional) access your project with ssh to configure your Flow instance
dokku create your-app
dokku storage:mount your-app /home/dokku/your-app/DATA/app/Data/Persistent:/app/Data/Persistent
dokku mariadb:create your-app
dokku mariadb:link your-app your-app
dokku domains:add your-app your-domain-to-the-app.de
dokku config:set your-app BASE_URI=http://your-domain-to-the-app.de/
dokku config:set your-app FLOW_CONTEXT=Production/Heroku
dokku config:set your-app DB_NAME=your-app-db DB_USER=mariadb DB_PASSWORD=super-secret DB_HOST=dokku-mariadb-your-app-db DB_PORT=3306
git remote add dokku dokku@your-dokku-domain.de:your-app
git push dokku master
dokku enter your-app

Prune and Import Site-Package on every Deploy

Careful: This deletes all content on every redeploy. Don't use in staging environments where customers work.

dokku config:set your-app PRUNE_AND_IMPORT_SITE=Package.Key

Debugging and Trouble-Shooting

check status of App

dokku ls

Access database

If you want to access the database for debugging run:

dokku mariadb:expose your-app
dokku mariadb:info your-app

Access with SequelPro

  • Connection Type SSH
  • MySQL Host: 127.0.0.1
  • Username: username from mariadb:info
  • Password: password from mariadb:info
  • Port: port from mariadb:expose
  • SSH Host: dokku.your-domain.de
  • SSH User: you@dokku.your-domain.de

Increase Memory Limit of Container

By default, the memory limit is 512 MB. To increase it, do the following:

  • copy Resources/Private/fpm_custom.conf to your own repository, e.g. into ./Heroku/fpm_custom.conf and adjust the memory limit.
  • copy Resources/Private/heroku-start.sh to your own repository, e.g. into ./Heroku/heroku-start.sh and in the last command, adjust the path to the fpm_custom.conf you have just copied.
  • In Procfile of your distribution, reference your custom start script instead of the default one.

TODOs

  • support for gerrit_update.php and gerrit.json