monicahq / monica

Personal CRM. Remember everything about your friends, family and business relationships.
https://beta.monicahq.com
GNU Affero General Public License v3.0
21.47k stars 2.14k forks source link

Provide a drop-in Zipfile without the need of compiling or installing #30

Open bensbox opened 7 years ago

bensbox commented 7 years ago

Tldr: Please provide a drop-in Zipfile of the project (including a basic installer), which is useable in a simple php webhosting environment with nothing more than a sftp upload and a single mysql database (no node.js or composer available). That way it is very easy for the project to gain a wider audience.

A possible way could be to compile everything needed by hand and zip it or by an CI job as suggested by @adrum below:

As far as releases go, we could add a TravisCI build to automatically fetch/build all the dependencies and place them where they need to build. The .tar.gz or zip would then be available in the releases section of the repo.


old description which started the whole discussion :) Hi!

This is a really nice project - i was totally excited and eager to test it out, until ....i read the setup procedures... I am a professional php developer for years. I am able to create complex network and server setups inside and outside of the "cloud" and i am using most of your mentioned tools on a daily basis for quite some time - i am one of those people, who are able to setup this project without a problem.

I just don't see why small and promising projects like this one need to choke themselves on compiling css, having nodejs installed, setting up virtual machines or (soon(tm) ..pls not) providing docker stuff.

How about just simple php and css? Lamp stack anyone? Please make it fancy and please go ahead and use composer - maybe with a tarball, where all the composer files are already provided. Just think about all the people out there with a limited php hosting package or a toyserver/raspberry at home with a spare-time-understanding of setting up stuff like wordpress. They will be eager to use it - that's why wordpress is so successful.

Thanks alot and keep up the good work!

ocdtrekkie commented 7 years ago

I can definitely agree here that this is something to work on. The setup instructions assume you're using Homestead. But what if I'm not? What does the setup require from Homestead to install without it?

bensbox commented 7 years ago

@ocdtrekkie : You don't need Homestead - it will work with a standard LAMP stack, but you need to tinker a bit.

What i did:

  1. As requirements, you need the following php packages: php-mbstring, php-dom, php-intl, php-mysql
  2. Follow the instructions until the first "php artisan" command. The command will fail, because the APP_KEY in the .env file is too short. Just replace it with some 32 char long key. After that execute "php artisan key:generate" and it will replace your key with a random base64 encoded string. After that you can continue with the setup.
  3. After the setup, you need to add a .htacess file into the public folder and enable the "rewrite" module of apache2 (i just assume you use the lamp stack :) ). The content for it is provided in the "web.config" file in the public folder, if you want to have it perfect - i just use the following standard set:

    RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ index.php [L,QSA]

Thats it :)

I want to package it for another web server and try it out - first obstacle is the "storage" softlink in the "public" folder. You can recreate it with "ln -s ../storage/app/public/ storage"

djaiss commented 7 years ago

You don't need Homestead if you don't want to. It's just simpler.

Laravel requires Nodes by default to compile SCSS for instance. I think Laravel is one of the simplest framework out there. Composer is massively used actually here.

I do understand now though the importance of making this simpler to install. Sorry about that.

underyx commented 7 years ago

or (soon(tm) ..pls not) providing docker stuff.

I have no idea why OP would include this in the issue. the only thing I'm waiting for is for a Dockerfile to be included, it will be so much easier to deploy the project.

djaiss commented 7 years ago

@underyx unfortunately this can't come from me at this point, I'm not good enough technically to provide a Dockerfile for now.

bensbox commented 7 years ago

The Docker image can and will be provided (imho) by a third-party if desperately needed. There are a huge amount of great apache/nginx/mysql/postgresql docker images out there, are simple to set up and djaiss doesn't need to worry if some update broke it.

@djaiss : No worries - just wanted to point out, that keeping it simple will help alot to make this project fly :)

underyx commented 7 years ago

@djaiss that's not a problem at all, I understand; maybe I'll find the time someday, or someone else could

@bensbox you might have the wrong concept about docker; while you can use it to build up an application yourself from a bunch of components and manually juggling source code volumes, I'm talking about being able to just copy-paste a docker-compose.yml's contents into my Rancher instance and having it running 10 seconds later.

sergiotapia commented 7 years ago

For my project Magnetissimo, I spent a lot of time trying to make it easy to run locally. I think this is definitely an area with room for improvement.

https://github.com/sergiotapia/magnetissimo/wiki/Usage:-Local

ppanthony commented 7 years ago

I'm not using Homestead, and had the project up and running really quickly from the docs. Granted I've already setup composer etc. As for getting a local server up and running, I just used the built in

php artisan serve

and was up and running quickly. I do think there should be a change to the APP_KEY in the .env file, as my install also choked on that.

arendtio commented 7 years ago

I did not even try to set it up when I saw the procedure. What I would like to have is a simple Zip File which I can extract to some webspace, a list of required PHP packages/extensions and some instructions about how to configure the database access (if the software has no dialog for that).

What I do NOT want is

Please don't get me wrong, this reads a little like a rant and I understand that those tools are very valuable for developers (I use the whole npm/gulp/sass/uglifr stack my self every day). Some might say they want a docker container, granted, but for me it is just overkill for a simple PHP application.

Please do not make any tools a requirement for the installation/deployment.

irufus commented 7 years ago

I did not think the original author's audience was to target those who love WordPress.

sergiotapia commented 7 years ago

True but steps should be taken to make the setup as frictionless as possible. The easier it is to get running the more popular it will become. It's a nice win-win for everybody involved.

kstrauser commented 7 years ago

BTW, I almost have a Dockerfile working. I'll PR it when it's suitably straightforward.

adrum commented 7 years ago

Good work @kstrauser! A Dockerfile would definitely ease jumping into development for some people. I think the tools are fine for development.

As far as releases go, we could add a TravisCI build to automatically fetch/build all the dependencies and place them where they need to build. The .tar.gz or zip would then be available in the releases section of the repo.

This setup would get this project a lot closer to a build for people to self host. We would probably need some sort of way to tackle database migrations and provide some documentation for first-time setup when using this method of installation.

https://docs.travis-ci.com/user/deployment/releases/

What do you guys think?

underyx commented 7 years ago

I'm against this issue. I value developers' time enough to have some patience (and perhaps even learn something, why not) while deploying their work if it makes it easier for them to develop. And in the 2010s, I don't think it's reasonable to get mad at a project for having dependencies managed by a package manager. Just because the project is written in PHP doesn't need to mean it's for people who are stuck with following 00's PHP paradigms.

kstrauser commented 7 years ago

I agree with @underyx. While I totally sympathize with @bensbox, it would require an enormous amount of not-invented-here to have all the extra functionality that the Node stuff provides. The days of HTML+CSS and calling it good are long past.

arendtio commented 7 years ago

@underyx while your comment sounds more like a personal assault than a reasonable argument, I like adrum's suggestion.

@kstrauser I did not say you should not use the node tools. I said please provide a zip while which contains the compiled output of the tools so that not everyone who wants to deploy the software has to install the tools too.

underyx commented 7 years ago

@arendtio sorry if it came off that way, I'm dealing with plenty of trauma here, related to people stuck in the good old days of classic 'see what sticks'-style PHP development. 👯‍♂️

kstrauser commented 7 years ago

@arendtio I understand the appeal. Truly, I do! I'm working on the Docker stuff so it can be that zip file, because I haven't written PHP in decades and the Node stuff intimidates me a bit. I don't think it's reasonable or desirable to provide a zip file directly, though, because that would quickly turn into a giant binary object that's going to change every time someone looks at it sideways.

adrum commented 7 years ago

@arendtio @kstrauser I think it would be useful to provide built zip files/artifacts every so often. It would be completely unnecessary to build and archive on every commit. Maybe the author could group a series of fixes and implement versioning into the project. Basically, only build & archive on tagged commits.

kstrauser commented 7 years ago

@adrum Dockerfile stuff is in #133.

bensbox commented 7 years ago

@underyx : I am not mad at the project, because it is using common sense tools, to develop. I am actually not mad at all - just to clarify :) I just wanted to warn @djaiss and the other (future) contributors to create another great project, which sole audience is going to be developers, because these are the only ones that are able to install it (including those stuck in the 00's ..or born there).

I wonder how you guys (@irufus, @underyx) are able to know, which audience is the best for this project?

Personal Relationship Manager - a CRM to manage your friends and family.

Quite a target group.

Consider, that the majority of the people, that are able to unzip tarballs on a php enabled webspace have no clue, what composer is. But they really like to help themselves remembering information about their family and friends by dropping this project on their synology nas.

Long story short: I love @adrum 's suggestion and appreciate @kstrauser contribution. The best way to keep such work from @djaiss, to be able to focus on the explosion of tickets due to HN ;)

Kovah commented 7 years ago

I totally support @bensbox. I maintain another open source project and if I wouldn't offer pre-build packages that have everything prepared, compiled and whatsoever I would lose many potential users. And some people here seem to ignore this.

A setup like Wordpress offers is a must-have feature for any kind of software whose audience is "normal people" and not developers or any enterprise businesses. However, providing a setup does not mean that there can't be a Dockerfile so devs can easily deploy Monica to their DO droplets. And this seems to be the point of this discussion. We can have both.

It shouldn't be that hard to prepare all the stuff that is needed, adding a build script, run it after merging some pull requests and then upload the zip to a release.

erdmenchen commented 7 years ago

Maybe something like https://github.com/bestmomo/laravel5-3-installer is a step towards a Wordpress-experience...

irufus commented 7 years ago

I wonder how you guys (@irufus, @underyx) are able to know, which audience is the best for this project?

I suggest everyone check out this cool site called https://monicahq.com/

This is the reason why I'm on the same boat as @underyx. If someone wants to get down and dirty they could learn a lot here. Nevertheless, I'm not against the concept of creating a docker but any one of us could provide that. That doesn't have to be up to the author.

djaiss commented 7 years ago

Thanks a lot for the healthy discussion there.

The project was not made for developers. I've created this project for regular people, with no technical skills whatsoever, who wants to strengthen their relationships with their loved ones. And as a side bonus, I decided to open source the code and let people install it on their own servers if they want to, or contribute. I didn't provide any other mechanism of installation than what I've already provided - not because I didn't want to, but because I don't know how to do it and much more importantly, because two days ago, I had no idea that people even wanted this tool at all.

I'm not an expert developer, I'm actually an amateur and I'm looking to keep the codebase being extremely simple on purpose. I don't know how to do a Dockerfile or simple instructions on Heroku.

That being said, this project is super young. There is a lot of things to be done. I want this project to be extremely simple to install for anyone, on any platform. We are just not there yet, but we'll get there.

On the technical side, this project will always have dependencies, will always require compilation of some kind, will still have unit tests etc... This is just the current best way to ship a good project.

We are talking about two different things here:

We need to work on those two aspects - separately.

Oh god this is overwhelming and I don't know where to even start doing all this 😄 Thanks all for your patience while we figure all this out.

arendtio commented 7 years ago

@djaiss thanks for the clarification and open sourcing monica in the first place. I do not think the packaging is something which has to be solved immediately. I mean it is more important to fix the largest application issues before packaging an easy installation. Nevertheless, I am really looking forward to that zip-file installtion :-)

Btw. would you mind writing a blog entry some day about, how you came to choosing laravel for your project and what you difficulties you had to overcome during development, how long it took, etc? I would love to read that.

djaiss commented 7 years ago

@arendtio I think the zip-file installation can be solved quickly. I'll take a look.

Concerning the blog post, yes I want to start a blog too on the marketing site, to share this kind of experience and details of what's new in the product. Probably next week. If it can help other people, that'd be awesome.

kstrauser commented 7 years ago

With the latest PR in #133, here are the Docker instructions for an end user who wants to host their own instance:

Swader commented 7 years ago

FYI if you use something like Homestead Improved you're up and running in literally 5 minutes (if you have the prerequisite software installed - a one time thing, and an identical process on every operating system).

As someone who writes hundreds of tutorials and has dozens of active projects at any given time, isolated environments are important to me, so I've perfected this box to the level of it being ridiculously easy to use, but while maintaining the professional note of being able to and learning to maintain and manage your own server.

If you need a basic introduction into Vagrant and why it makes sense, for me even beyond Docker, see here.

djaiss commented 7 years ago

Now that we have multiple installation instructions, I will close this issue. Feel free to open a new one if you want to see new features about this.

Kovah commented 7 years ago

@djaiss I think this issue should be kept open for the task of a real setup procedure. The new install steps are fine but in my opinion does not really solve the issue discussed here.

bensbox commented 7 years ago

@djaiss : I have to agree with @Kovah . This issue is resolved as soon as there is a drop-in Zipfile, without any compiling whatsoever (wordpress style :) ).

Nevertheless, i really appreciate the great work about the extended installation instructions - thanks for that @ all!

djaiss commented 7 years ago

Alright, sorry about that - so can you change the title of the issue perhaps, so it's clear what we are trying to achieve here?

The issue title and description are the only source of truth about an issue, so it'll help everyone who click on it to know what we want to do in the specific issue without having to read a 30+ comments discussion 😀

bensbox commented 7 years ago

Done :)

thedanhub commented 6 years ago

I agree with a lot that has been said here so far: I totally agree with the fact that a simpler install procedure could help the project get some more users (especially because nowadays, "5-minute installation procedures" are the norm). On the other hand, I feel that non-technical users, who might struggle already at the installation process, would be better off with the hosted version rather than trying to go the self-hosted route just because it's free; it's not like they don't have an alternative, since there is a hosted free tier available.

Anyway, it's also true that the installation instructions are currently out-of-date (the general server instructions still mention PHP 7.0, for example) or incomplete (nowhere is mentioned how to configure Apache), so it's not surprising that this request surfaced, especially in an installation process that requires so many tools and steps to work.

Long story short, I have taken it upon myself to write a tutorial with step-by-step instructions on how to install Monica on a barebones Ubuntu box, starting from scratch with no prerequisites. For now the tutorial is hosted on my tech blog but I would be happy to update the project's installation instructions too if you think it could be useful.

In addition to this, I have also developed a Vagrantfile and provisioning script to install Monica with vagrant with just a vagrant up command, so you can forget about the installation process entirely. Perhaps this will be more useful to prospective project developers rather than end users, but nonetheless it could take us one step closer to a zip file, as originally requested. Again, I'd be happy to add the Vagrant files to the official Monica repo, but for now you can find them here:

https://github.com/dp87/vagrantfiles/tree/master/Monica

I hope someone will find all of this useful.

djaiss commented 6 years ago

Thanks for sharing @dp87

Anyway, it's also true that the installation instructions are currently out-of-date

Yesterday I've read the documentation again and updated it. It needed some fresh content indeed.

In addition to this, I have also developed a Vagrantfile and provisioning script to install Monica with vagrant with just a vagrant up command

That'd be super interesting to have a document inside docs folder that mention this Vagrantfile as well as detailed instructions on how to make it work.

mgolisch commented 6 years ago

If anyone is interested i made a rancher catalog item for monicahq in my rancher-catalog. https://github.com/mgolisch/rancher-catalog

thedanhub commented 6 years ago

@djaiss I'd be happy to add this document, not a problem. I'll prepare a first draft of it now and then submit a pull request here.

Update: PR created.