This gets OpenCart running enough that we can use the GUI Installer
- Create Heroku project with ClearDB MySQL add-on
- Download OpenCart sources
- Move
./upload/*
to top-level (those are the PHP site files) - Copy zlib.so into
./ext/zlib.so
- Write
extension = /app/www/ext/zlib.so
intophp.ini
- Push
- Open site
Visiting the site opens the installer, make sure the checks are all green and enter the database credentials for your heroku instance.
heroku config | grep DATABASE_URL
- The format is
mysql://user:password@host/database?params
-> input these separately into Installer
This will populate the seed data into mysql and write out appropriate config.php
and admin/config.php
for connecting to said DB BUT those files are written on a Dyno which may or may not last.
Try to copy them down; if not, follow the next section.
- View
./install/cli_install.php
- Find the sections that write out
config.php
andadmin/config.php
- Manually (and annoyingly) create those files yourself
- Push
Check heroku logs, you should get a failure for createimagefromjpeg
not existing. This is because the default buildpack builds PHP without jpeg support.
heroku config:set BUILDPACK_URL='https://github.com/thoughtbot/heroku-buildpack-php
- Push
Site should work now.
If for some reason the above build pack is not around, here's more or less how it was created:
- Fork
heroku/heroku-buildpack-php
on GitHub - Run the script from the README on your dyno, with the following differences:
- Add
--with-jpeg-dir --with-png-dir
to PHP./configure
- Replace
pushd
withcd
andpopd
withcd -
(my dyno didn't have pushd/popd) - Copy the compiled sources somewhere
- Update
bin/compile
to reference those sources - Update
BUILDPACK_URL
to be your repo
using heroku CLI
git add -A
git commit -m "improvement"
git push origin master