-
Notifications
You must be signed in to change notification settings - Fork 16
Deploying an application that contains several packages #44
Comments
Thanks for the kind words. Currently, Halcyon doesn’t support apps which aren’t located at the top level of the source directory. This is tracked as mietek/halcyon#11. I’ve now opened a small PR, fixing a few minor packaging issues in your project (lambdacms/lambdacms.org#1). With these changes in place, I’ve successfully built your project on a regular Ubuntu 14.04 machine, then deployed it to Heroku. It’s now running on lambdacms.herokuapp.com. In order to build your app, I first split the project into three repositories, one per package:
Next, I added a number of Halcyon magic files to the base package (https://github.com/mietek/lambdacms.org-base/commit/185bdbd7e71c9d96b2db87ba5d93cee320138c3c):
Each of these files is described in the Halcyon reference. Most importantly, the
Finally, to deploy your app to Heroku, I configured it in the manner required by Yesod, by manually extracting portions of the Heroku Postgres
When deploying to Heroku, Yesod automatically finds the
The three-package split isn’t ideal for a number of reasons. Join |
Thanks for this answer and the fixes. We are going to use this multi-repo setup for now. |
Thanks @mietek for the elaborate reply, and the PR. As @matsrietdijk said we'll move to 1-repo-per-cabal-file and include a HoH-deploy tutorial for the initial release. I'm still interested why you think multi-repos are not ideal. I can come up with some reasons, but I also see reasons in favor of them. |
Oops, just noticed |
The three-package split interacts with Halcyon in a complex fashion. It would be better to explain this in chat, once you have gone through the Halcyon tutorial. |
In short:
Your app is |
Another option is to keep all of the code in a single repo, with your app at the top level, your app’s dependencies as subdirectories, and To sum up, the three-package split adds a lot of complexity, and I haven’t tested such use cases much. I’ll be happy to help you work through any issues, but I can’t guarantee everything will go smoothly. |
Once again thanks for the resourceful reply. We'll reconsider it, in the light of the release we are planning to do in the coming days. |
First: thanks for your open source work, Halcyon, HoH, Cannot, ..., they're all amazing pieces of work.
We are working on a CMS in Haskell (to be publicly announced in the coming week), that we would like to deploy with HoH (and provide a tutorial for others to deploy theirs with HoH).
The CMS recommends to break up features into separate packages, therefor a git repo of a project that uses this CMS contains a subdirectory for each package.
For instance: https://github.com/lambdacms/lambdacms.org
The "base" subfolder is contains the master site, it builds the actual binary that should be hosted. The other subdirectories contain dependencies of the "base" app.
Is it possible to install an app like this with HoH? Or do you have suggestions on how we can make it easier for HoH to install an app like this?
Thanks.
The text was updated successfully, but these errors were encountered: