murph-doc/docs/install.md

45 lines
1.7 KiB
Markdown
Raw Normal View History

2021-05-30 20:36:00 +02:00
# Installation
## Technical Requirements
2022-01-23 23:48:47 +01:00
* Install PHP 8.0 or higher and these PHP extensions (which are installed and enabled by default in most PHP 8 installations): Ctype, iconv, JSON, PCRE, Session, SimpleXML, and Tokenizer;
2021-05-30 20:36:00 +02:00
* [Install Composer](https://getcomposer.org/download/), which is used to install PHP packages.
2022-02-21 16:42:55 +01:00
* [Install NodeJS](https://nodejs.org/en/download/) 16 or higher, [Yarn](https://classic.yarnpkg.com/en/docs/install/#debian-stable) and [Webpack](https://webpack.js.org/guides/installation/)
2021-05-30 20:36:00 +02:00
* A created database (MySQL, PostgreSQL or SQLite)
* build-essential to run `make`
## Setting up the skeleton
Depending of you environment, PHP and composer could be located in specific paths.
Defines theme with environment vars:
```
2022-01-25 09:10:24 +01:00
export PHP_BIN=/path/to/php
export COMPOSER_BIN=/path/to/composer
2021-05-30 20:36:00 +02:00
```
Create your project:
```
2022-01-25 09:37:41 +01:00
"$COMPOSER_BIN" create-project murph/murph-skeleton my_project ^1
2021-05-30 20:36:00 +02:00
```
An error occured because of the unconfigured database.
* Copy `.env` into `.env.local`
* Edit `.env.local` ([documentation](https://symfony.com/doc/current/configuration.html#configuring-environment-variables-in-env-files))
2022-01-25 09:12:30 +01:00
* Run `"$PHP_BIN" bin/doctrine-migrate` (or `make doctrine-migrate`)
2021-05-30 20:36:00 +02:00
And finally, build assets with `make asset`.
## Create an admin user
2022-01-25 09:12:30 +01:00
Run `"$PHP_BIN" bin/console murph:user:create` and answer questions.
2021-05-30 20:36:00 +02:00
## Configure a web server
Read the documentation of Symfony to [configure a web server](https://symfony.com/doc/current/setup/web_server_configuration.html).
In case of a local server, you can use the [Symfony Local Web Server](https://symfony.com/doc/current/setup/symfony_server.html).
Then go to [https://127.0.0.1:8000/admin](https://127.0.0.1:8000/admin).