Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to install ? #16

Closed
ildyria opened this issue Dec 30, 2018 · 7 comments
Closed

How to install ? #16

ildyria opened this issue Dec 30, 2018 · 7 comments
Assignees
Labels
Documentation Missing documents and help
Milestone

Comments

@ildyria
Copy link
Member

ildyria commented Dec 30, 2018

It would be nice if we document the following processes:

  • installing Lychee-Laravel
  • migrating from Lychee to Lychee-Laravel
@ildyria ildyria added the Documentation Missing documents and help label Dec 30, 2018
@ildyria ildyria added this to the v4.0.0 milestone Dec 30, 2018
@bennettscience
Copy link
Contributor

Do we want to add wiki pages to this repo? Or commit them to the lychee main repo as a PR?

@erdmenchen
Copy link

There is currently no documentation at all for this project.

At least provide some details about the steps, how to get it running:

  • download or clone the repo
  • run 'composer install --no-dev'
  • copy .env.example to .env
  • run 'php artisan key:generate'
  • edit .env and add all necessary settings (which are necessary beside the DB settings?!)
  • run 'php artisan migrate'
  • run 'php artisan serve'

Point your browser to the running server and enjoy Lychee ;-)

@bennettscience
Copy link
Contributor

bennettscience commented Jan 3, 2019 via email

@ildyria
Copy link
Member Author

ildyria commented Jan 3, 2019

@erdmenchen actually I recommend against the php artisan server this is just if you don't have a web server, normally you should just point your normal server to /whatever/path/you/chose/Lychee-Laravel/public/. :)

(which are necessary beside the DB settings?!)

Some settings are related to HSTS

@erdmenchen
Copy link

yes, but my described steps are all dev related.
A "normal" user should not have to run these. A simple zip file and an installer (like wordpress) should be the general approach...

@ildyria
Copy link
Member Author

ildyria commented Jan 3, 2019

Right, this is why the release process on Lychee (classic) requires us to upload the zip file. :)

As for creating an installer... this is a slightly more annoying problem as some of our users do not have ssh access to their server. Thus editing the .env is a bit more complex...

@ildyria
Copy link
Member Author

ildyria commented Jan 3, 2019

Base dependencies (debian testing):

apt install libapache2-mod-php7.3
apt install git
apt install php7.3-mysql
apt install php7.3-imagick
apt install php7.3-mbstring
apt install php7.3-json
apt install php7.3-gd
apt install php7.3-xml
apt install php7.3-zip
apt install mariadb-server
apt install composer

access the server.

mysql

create the database and users:

create database lychee;
CREATE USER lychee@localhost IDENTIFIED BY 'password';
GRANT ALL ON *.* TO lychee@localhost WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit;

Clone the repo

cd /var/www/html
git clone --recurse-submodules https://github.com/LycheeOrg/Lychee-Laravel.git

Set things up:

cd Lychee-Laravel
cp .env.example .env
# edit .env to match the parameters

# install php libraries.
composer install --no-dev

# generate the key (to make sure that cookies cannot be decrypted etc)
./artisan key:generate

# migrate the database
./artisan migrate

Laravel requires mode rewrite to be enabled:

a2enmod rewrite

add to /etc/apache2/apache2.conf

<Directory /var/www/html/Lychee-Laravel>
	Options Indexes FollowSymLinks
	AllowOverride All
	Require all granted
</Directory>

create example.com.conf in /etc/apache2/site-available/

<VirtualHost *:80>
	ServerName example.com

	DocumentRoot /var/www/html/Lychee-Laravel/public

	ErrorLog ${APACHE_LOG_DIR}/error.log
	CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

enable the site:

a2ensite `example.com.conf`

Restart apache2:

systemctl restart apache2

Use your favorite browser and access your Lychee server (e.g. via http://localhost/Lychee-Laravel/public or example.com).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Missing documents and help
Projects
None yet
Development

No branches or pull requests

3 participants