INSTALL.md 2.44 KB
Newer Older
Mathieu Loiseau's avatar
Mathieu Loiseau committed
1 2 3 4 5
Installation & configuration
============================

Requirements
------------
Mathieu Loiseau's avatar
Mathieu Loiseau committed
6 7 8 9
* docker-ce :
   * https://docs.docker.com/install/linux/docker-ce/ubuntu/
   * https://docs.docker.com/install/linux/docker-ce/debian/
   * When installing docker-ce, if you are using a ubuntu based distro (such as Mint), in step 4 of the ubuntu/debian install replace  ```$(lsb_release -cs) \``` with the actual name of the ubuntu/debian distro your OS is based upon (For [Mint Tessa](https://linuxmint.com/download_all.php), it would be bionic, for [bunsen hydrogen](https://www.bunsenlabs.org/repositories.html), it would be jessie)
arnaudbey's avatar
arnaudbey committed
10 11
* docker-compose

Mathieu Loiseau's avatar
Mathieu Loiseau committed
12 13
Installation
--------------
arnaudbey's avatar
arnaudbey committed
14
```
arnaudbey's avatar
install  
arnaudbey committed
15
git clone https://gricad-gitlab.univ-grenoble-alpes.fr/lzbk/MagicWord.git
arnaudbey's avatar
arnaudbey committed
16 17 18
cd MagicWord
cp .env.dist .env
vi .env
Arnaud Bey's avatar
misc.  
Arnaud Bey committed
19 20
#vi or any other text editor, this will allow you to set the DB name & password
#these informations will be asked during the install
arnaudbey's avatar
misc  
arnaudbey committed
21
sudo docker-compose up --build -d
22
sudo docker-compose exec apache bash
23
make install
arnaudbey's avatar
arnaudbey committed
24
```
arnaudbey's avatar
arnaudbey committed
25

Mathieu Loiseau's avatar
Mathieu Loiseau committed
26 27
Notes
-----
28 29 30
* During the last docker command, you should be able to leave the default value for every parameter by pressing ```enter```, except for:
  * the ```database_password``` which should match the one you entered in .env file and in the PWD var
  * the ```secret``` phrase, which should be changed
Arnaud Bey's avatar
Arnaud Bey committed
31
* if you let default values, MW should be available at localhost:666 and the adminer at localhost:667
arnaudbey's avatar
arnaudbey committed
32
* You'd better leave default values, some stuff is hardcoded...
arnaudbey's avatar
arnaudbey committed
33

34
* Once application installed, you can generate some grid with these commands in the php container. It will generates 10 grids in french and english with at least 150 (and 250 for french) foundable forms.
35
```
Arnaud Bey's avatar
Arnaud Bey committed
36 37
php bin/console magicword:generate-grid english 10 150 0
php bin/console magicword:generate-grid french 10 250 0
38
```
39

Mathieu Loiseau's avatar
Mathieu Loiseau committed
40 41
Update
------
arnaudbey's avatar
arnaudbey committed
42 43
```
git pull origin master
44
sudo docker-compose up --build -d
arnaudbey's avatar
arnaudbey committed
45 46 47
sudo docker-compose exec php bash
make update
```
Mathieu Loiseau's avatar
Mathieu Loiseau committed
48

Arnaud Bey's avatar
Arnaud Bey committed
49 50 51 52 53 54 55 56
Import lexicon
------
copy `lexicon.tsv` and `spec.txt` in a new folder in `application/data/lexicons`
```
sudo docker-compose exec php bash
console lexicon:import FOLDERNAME
```

Mathieu Loiseau's avatar
Mathieu Loiseau committed
57 58 59 60 61 62
Create Administrator
--------------------
To have an administrator of your Magic Word instance,
1. you first need to create an account on the site, like any other account.
2. then launch php container `sudo docker-compose exec php bash`
3. in that container type `php bin/console fos:user:promote`
Mathieu Loiseau's avatar
Mathieu Loiseau committed
63 64
    1. enter the screen name of the account to promote
    1. submit the role `ROLE_ADMIN`