romaninsh / dokku-alt-manager

dokku-alt Web Manager App (LOOKING FOR CO-MAINTAINER)
100 stars 19 forks source link

Custom buildpack failing #5

Closed digitalsadhu closed 9 years ago

digitalsadhu commented 9 years ago

As per readme instructions, using custom php buildpack. I get the following:

-----> Installing ENV in build environment ...
       Fetching custom buildpack
       PHP (composer.json) app detected
remote: /build/buildpacks/custom/bin/compile: line 258: /root/bin/jq: No such file or directory
romaninsh commented 9 years ago

I have updated build instructions to more explicitly request that this requires "dokku-alt" on your node. Also added some instructions how to run this app on a classic LAMP installation.

Can you confirm that you're using it with dokku-alt ?

digitalsadhu commented 9 years ago

Ah, ok so yes I'm using dokku-alt but no I'm not using dokku-alt-beta.

What beta feature does this depend on?

romaninsh commented 9 years ago

Technically it should work with regular dokku-alt also, but I haven't tested it much. I'll try this with stable instance in the evening, meanwhile, can you confirm that this works with beta ?

romaninsh commented 9 years ago

To answer your question - installation instruction use "create" command, which is probably the only one from BETA.

Also the app itself manages access / deploy keys, which has been in beta.

digitalsadhu commented 9 years ago

I just updated to latest stable dokku-alt which includes the create command.

Couple things:

The following doesn't work for me:

ssh dokku@$HOST config:set dam BUILDPACK_URL=https://github.com/romaninsh/heroku-buildpack-php.git#development

unless I quote the value like:

ssh dokku@$HOST config:set dam BUILDPACK_URL='https://github.com/romaninsh/heroku-buildpack-php.git#development'

More importantly it seems I have broken the mariadb dokku-alt setup. I can no longer run

dokku mariadb:create <app>

as it just errors

ERROR 2003 (HY000): Can't connect to MySQL server on 'mariadb' (111)

So I will have to come back to this once I have solved that problem!

romaninsh commented 9 years ago

Thanks for feedback !

digitalsadhu commented 9 years ago

Ok, well I fixed mariadb finally and managed to get it linked to dam and tried a fresh deploy with the same result as before:

...
remote: -----> Building dam using buildstep...
remote: -----> Installing ENV in build environment ...
remote:        Fetching custom buildpack
remote:        PHP (composer.json) app detected
remote: /build/buildpacks/custom/bin/compile: line 258: /root/bin/jq: No such file or directory
To dokku@msapp.co.nz:dam
 ! [remote rejected] master -> master (pre-receive hook declined)
romaninsh commented 9 years ago

Can you try deploying just an empty php app?

  1. create new folder
  2. git init
  3. create file index.php
  4. git add
  5. git commit
  6. git remote add
  7. git push

No need to set custom build pack on this, just let's see if it works.

digitalsadhu commented 9 years ago

yes, no problem: http://test-php.msapp.co.nz

romaninsh commented 9 years ago

Can you create a repository and allow deploy from this key:

ssh-dss AAAAB3NzaC1kc3MAAACBAMR093V5AczUe8ZkyL3O0xlbBEhvRN/xKfmt661m+PRszeIDDXInxz79g4xMLhg/OUu/ttYp/J+wvDGF4wiGu3ezjF4WvxHMTH0mXzSyo4lUXSlmHsd0GtRv9ZoGu9WKbg+brR/KpaLV65U4CqhMKmllfoP1nzITFhGPVbe75iTzAAAAFQDws6mEtwoWv4b5u6wesRg/d70XuQAAAIB0R2QAmiiuG5BAulkPXY9GztBMKKjysgF0aX5agq38JyHx7Ktopa1ennhFyu1h9q3i8H8YSNwS0xr4rCDsYCgPEf4Xb1cgXxwmYhXHOu1x9YbZXqtAzUEp+un9JBEg+Y5auwvy5kBCReKePfNEOJQ11pretinMOCP+sFQE8AGgAQAAAIB8UaXLcjS51YdHn0Yh/spsHaTmHoq5M8wZCWxPS9S2+Hl5vtbnq8pGQQqkH7OwTD9k1a4FfMvF42oVW94vo0zgPzOYHtOeUlL+7R9i4M7N5Lo2DPyjM8MPbIidQs3hvmJoAzm/ibbcKr16IUf/JpLD0G8OEWoBTJXThF7Ve9IeXw== romans

digitalsadhu commented 9 years ago

ok, I've created an app called romaninsh and piped your key into dokku deploy:allow romaninsh the remote is dokku@msapp.co.nz:romaninsh

romaninsh commented 9 years ago

Thanks - testing...

romaninsh commented 9 years ago

Deployed with default build pack:

Counting objects: 238, done. Delta compression using up to 8 threads. Compressing objects: 100% (200/200), done. Writing objects: 100% (238/238), 476.97 KiB | 0 bytes/s, done. Total 238 (delta 82), reused 0 (delta 0) remote: Cloning into '/tmp/tmp.GvE03PrYKS'... remote: warning: You appear to have cloned an empty repository. remote: done. remote: HEAD is now at 280b274... updated readme file remote: -----> Building romaninsh using buildstep... remote: -----> Installing ENV in build environment ... remote: PHP app detected remote: -----> No runtime requirements in composer.json, defaulting to PHP 5.6.0. remote: -----> Installing system packages... remote: - PHP 5.6.0 remote: - Apache 2.4.10 remote: - Nginx 1.6.0 remote: -----> Installing PHP extensions... remote: - zend-opcache (automatic; bundled, using 'ext-zend-opcache.ini') remote: -----> Installing dependencies... remote: Composer version b33da336ecb7f1c9b15a57285e5a9f09cf5f3dd2 2014-09-30 15:28:01 remote: Loading composer repositories with package information remote: Installing dependencies from lock file remote: - Installing atk4/atk4 (4.3.x-dev origin/4.3) remote: Downloading: 100% remote:
remote: - Installing educoder/pest (1.0.0) remote: Downloading: 100% remote:
remote: - Installing opauth/opauth (0.4.4) remote: Downloading: 100% remote:
remote: - Installing opauth/oauth (dev-master 0b569de) remote: Downloading: 100% remote:
remote: - Installing phpseclib/phpseclib (dev-master 7696cbf) remote: Downloading: 100% remote:
remote: Generating optimized autoload files remote: -----> Preparing runtime environment... remote: NOTICE: No Procfile, defaulting to 'web: vendor/bin/heroku-php-apache2' remote: -----> Discovering process types remote: Procfile declares types -> web remote: Default process types for PHP -> web remote: Sending build context to Docker daemon 2.048 kB remote: Sending build context to Docker daemon remote: Step 0 : FROM dokku/romaninsh:build remote: ---> 12640528da34 remote: Step 1 : ENV GIT_REV 280b274c57fd63a37e900c4cb8f372db69b139b0 remote: ---> Running in 8fba8d46f26e remote: ---> 10ec8943ff63 remote: Removing intermediate container 8fba8d46f26e remote: Successfully built 10ec8943ff63 remote: -----> Releasing romaninsh ... remote: -----> Deploying romaninsh ... remote: -----> Shutting down old containers remote: =====> Application deployed: remote: http://romaninsh.msapp.co.nz remote: -----> Cleaning up ... To dokku@msapp.co.nz:romaninsh

Here is the URL: http://romaninsh.msapp.co.nz/admin/public/

I don't think it respects heiroku section in composer.json file.

digitalsadhu commented 9 years ago

Nice! Yea, so the main problem with the standard heroku build pack is that it doesn't respect the heroku settings in composer.json?

Weird?

romaninsh commented 9 years ago

https://github.com/romaninsh/heroku-buildpack-php/compare/development - see Files Changed.

I'll have to try and convert this app to use a default build pack or custom Dockerfile.

mingder78 commented 9 years ago

Hi, like to have an UI for dokku-alt management like this. But I also encountered the same problem for using the custom buildpack. Anyone know how to fix it?

romaninsh commented 9 years ago

HI, I have rewrote this repository using Dockerfile and it will not use build pack at all.