README.md 2.7 KB
Newer Older
1 2
TACT - Plateforme de Transcription et d'Annotation de Corpus Scientifiques
==========================================================================
Guillou Patrick's avatar
Guillou Patrick committed
3 4


Guillou Patrick's avatar
Guillou Patrick committed
5
### Install (DEV - localhost)
Guillou Patrick's avatar
Guillou Patrick committed
6 7

```bash
Arnaud Bey's avatar
Arnaud Bey committed
8 9
git clone [thisrepository]
cd tact
Arnaud Bey's avatar
Arnaud Bey committed
10
cp .env.dist .env
Arnaud Bey's avatar
Arnaud Bey committed
11 12 13 14 15
# définition des comptes/bases mysql pour qu'ils soient générés par docker.
vi|nano|emacs .env
cp ./application/.env.dist ./application/.env
# répercussion pour Symfony des comptes/bases précédemment créés
vi|nano|emacs ./application/.env
Guillou Patrick's avatar
Guillou Patrick committed
16 17
```

Arnaud Bey's avatar
Arnaud Bey committed
18
### Install (production env.)
Guillou Patrick's avatar
Guillou Patrick committed
19 20 21 22 23 24 25 26 27 28 29 30 31
- copy your ssl certificate(s) and key into `docker-files/certs` folder
- edit `docker-files/Dockerfile`

```
# For local dev -> in production comment those lines
ADD ./certs/server.crt /etc/ssl/certs/server.crt
ADD ./certs/server.key /etc/ssl/private/server.key

# For production uncomment those lines
# ADD ./certs/star_demarre-shs_fr.crt /etc/ssl/certs/server.crt
# ADD ./certs/demarre-shs.fr.key /etc/ssl/private/server.key

```
Arnaud Bey's avatar
Arnaud Bey committed
32
- we use apache and reverseproxy to target multiple applications in various docker containers. See this apache conf. example.
Guillou Patrick's avatar
Guillou Patrick committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49

```
<IfModule mod_ssl.c>
 <VirtualHost *:443>
     ServerName tact.demarre-shs.fr
     SSLEngine on
     SSLProxyEngine on
     ProxyPreserveHost On
         ProxyPass / https://localhost:8443/
         ProxyPassReverse / https://localhost:8443/

     SSLCertificateFile /etc/ssl/certs/star_demarre-shs_fr.crt
     SSLCertificateKeyFile /etc/ssl/private/demarre-shs.fr.key
     SSLCertificateChainFile /etc/ssl/certs/DigiCertCA.crt
 </VirtualHost>
</IfModule>
```
Guillou Patrick's avatar
Guillou Patrick committed
50 51 52 53

### Run containers and install dependencies

```bash
Arnaud Bey's avatar
Arnaud Bey committed
54
# lance les services en mode daemon (et les build si besoin la première fois)
Guillou Patrick's avatar
Guillou Patrick committed
55
docker-compose up -d
Arnaud Bey's avatar
Arnaud Bey committed
56
# lance le make init présent dans ./application/Makefile
57
docker-compose exec apache make init
Guillou Patrick's avatar
Guillou Patrick committed
58 59 60
```

- symfony app should be available @ http://localhost:8082/
61
- adminer should be available @ http://localhost:8088/
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80

### Usefull commands

> all this commands should be run inside docker container

- create a new user (use `-a` if you want to create an admin user)
`bin/console app:create-user [-a]`

- create a new project status (public / private are created via data fixtures)
`bin/console app:create-project-status`

- create a new user status (manager / transcriber / validator are created via data fixtures)
`bin/console app:create-user-status`

- update exposed routes
`make routes`

- load fixtures
`make fixtures`
81 82

- other usefull commands can be found in `application/Makefile`
Arnaud Bey's avatar
Arnaud Bey committed
83 84 85 86 87

### Tagging
- vX.Y.Z
X incremented for major changes
Y incremented for new feature
Arnaud Bey's avatar
Arnaud Bey committed
88
Z incremented for bug fix or really minor change
Arnaud Bey's avatar
Arnaud Bey committed
89 90 91

### Thanks
Myriam EL HELOU & Sami BOUHOUCHE for their [useful work](https://github.com/elheloum/TEI2JSON) not implemented in this app yet.