dev/README.md
author ymh <ymh.work@gmail.com>
Fri, 16 Mar 2018 12:29:12 +0100
changeset 687 53fee689f666
parent 686 385e3a12ee27
child 690 5b6102a80205
permissions -rw-r--r--
Dockerfile correction and add a way to save/load the docker images.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
686
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     1
# HDALab Docker images
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
     2
687
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
     3
L'application HDALab a été conteneurisée en 5 services dont 2 nécessite la construction d'une image.
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
     4
Les services sont orchestrés avec l'application `docker-compose`.
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
     5
L'ensemble expose les ports suivant sur l'ordinateur hôte:
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
     6
  - port 8080 : l'interface web HDALab
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
     7
  - port 8025 : Accès à l'interface de consultation [mailhog](https://github.com/mailhog/MailHog).
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
     8
  - port 5432 : port serveur postgresql
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
     9
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    10
## Mise place des images conteneurs docker
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    11
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    12
Deux possibilités existent pour mettre en place les images docker :
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    13
  - construire les images
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    14
  - import des images
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    15
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    16
### Construction des images
686
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    17
687
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    18
Les commandes suivantes permettent de construire les images. Ces commandes sont à lancer dans le même répertoire que le fichier `docker-compose.yml`.
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    19
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    20
```
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    21
$ ./prepare_docker_build.sh
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    22
$ docker-compose -p hdalab build
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    23
```
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    24
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    25
### Import des images
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    26
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    27
Lancer cette commande pour charger les images du projet.
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    28
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    29
```
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    30
$ docker load -i <chemin/vers/fichier/archives/images>
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    31
```
686
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    32
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    33
## Comment construire les container HDALab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    34
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    35
Toutes les commandes suivantes sont à effectuer dans le répertoire contenant le fichier `docker-compose.yml`.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    36
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    37
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    38
$ docker-compose -p hdalab up -d
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    39
$ docker-compose -p hdalab exec hdalab django-admin collectstatic --noinput
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    40
$ docker-compose -p hdalab exec hdalab django-admin migrate --noinput
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    41
$ docker-compose -p hdalab exec hdalab supervisorctl restart all
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    42
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    43
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    44
Le site est consultable à l'adresse suivante : [http://127.0.0.1:8080](http://127.0.0.1:8080)
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    45
Le système est fonctionnel mais avec une bases de donnée vide.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    46
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    47
### Création d'un "superuser"
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    48
Cette commande permet la creation d'un utilisateur administeur de l'application.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    49
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    50
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    51
$ docker-compose -p hdalab exec hdalab django-admin createsuperuser
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    52
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    53
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    54
### Import des données issues de l'export HDA
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    55
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    56
Cette commande importe les données RDF exportées à partir de l'application HDA.
687
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
    57
Attention cette commande peut être longue (plusieurs heures).
686
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    58
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    59
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    60
$ docker-compose -p hdalab exec hdalab /usr/local/sbin/import_hda_rdf.sh /etc/hdalab/data /var/lib/hdalab http://data.culture.fr/entrepot/HDA/export.tgz
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    61
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    62
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    63
### Import d'un dump de l'application
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    64
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    65
#### Import d'un dump de la base de donnée
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    66
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    67
Le fichier de dump de base de données doit être décompressé.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    68
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    69
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    70
$ docker-compose -p hdalab stop hdalab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    71
$ docker exec -i hdalab_pg_1 psql -U iri postgres < </chemin/du/fichier/dump/sql.bckp>
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    72
$ docker-compose -p hdalab start hdalab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    73
$ docker-compose -p hdalab exec hdalab django-admin migrate --noinput
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    74
$ echo "from django.contrib.sites.models import Site; site=Site.objects.all()[0]; site.domain='127.0.0.1:8080'; site.name='HDALab'; site.save()" | docker exec -i hdalab_hdalab_1 django-admin shell
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    75
$ docker-compose -p hdalab exec hdalab django-admin changepassword admin
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    76
$ docker-compose -p hdalab exec hdalab django-admin rebuild_index --noinput
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    77
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    78
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    79
#### Import des miniatures renkan
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    80
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    81
Ces commandes supposent que le service `hdalab` est actif.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    82
L'archive comprenant l'export des miniatures doit être décompressé.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    83
Cette archive contient le répertoire `media` à la racine
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    84
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    85
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    86
$ docker cp ./media/. hdalab_hdalab_1:/var/lib/hdalab/static/media
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    87
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    88
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    89
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    90
# Commandes utiles
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    91
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    92
## liste des services
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    93
Les services suivants sont définis dans le fichier `docker-compose.yml`:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    94
 - pg : La base de donnée postgresql
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    95
 - es : ElasticSearch
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    96
 - mail : Mailhog, fourni un serveur smtp de test
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    97
 - front : Le serveur web (nginx)
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    98
 - hdalab : application hdalab comprenant l'application web elle-même et les services associés (envoi de mail et calcul des preevisualisations Renkan)
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
    99
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   100
## Démarrage des services
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   101
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   102
Les services se contrôlent avec la commande `docker-compose`.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   103
La ligne de commande typique est la suivante:
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   104
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   105
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   106
$ docker-compose [-f </path/to/docker-compose.yml>] -p hdalab [COMMAND] [ARGS...]
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   107
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   108
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   109
Il faut bien noter l'utilisation systématique de l'option `-p hdalab` qui spécifie le nom du projet.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   110
Si la commande est lancée dans le même répertoire que celui du fichier `docker-compose.yml` l'option `-f` peut être ignorée.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   111
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   112
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   113
## Construction des images des conteneurs
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   114
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   115
$ docker-compose [-f </path/to/docker-compose.yml>] -p hdalab build [SERVICE...]
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   116
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   117
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   118
## création et lancement des services
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   119
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   120
$ docker-compose [-f </path/to/docker-compose.yml>] -p hdalab up -d [SERVICE...]
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   121
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   122
A noter l'option `-d` qui mettent les services en tache de fond.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   123
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   124
## lancement des services
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   125
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   126
$ docker-compose [-f </path/to/docker-compose.yml>] -p hdalab run SERVICE [COMMAND] [ARGS...]
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   127
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   128
Cette commande lance un service.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   129
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   130
## Execution d'une commande sur un service lancé
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   131
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   132
$ docker-compose [-f </path/to/docker-compose.yml>] -p hdalab exec SERVICE COMMAND [ARGS...]
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   133
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   134
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   135
## arrêt des services
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   136
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   137
$ docker-compose [-f </path/to/docker-compose.yml>] -p hdalab stop [SERVICE...]
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   138
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   139
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   140
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   141
## consulter la sortie des containers
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   142
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   143
$ docker-compose [-f </path/to/docker-compose.yml>] -p hdalab logs [-f] [SERVICE...]
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   144
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   145
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   146
## effacement et recréation de la base de donnée vide
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   147
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   148
Attention, toutes les données de la base seront définitivement supprimées.
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   149
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   150
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   151
$ docker-compose [-f </path/to/docker-compose.yml>] -p hdalab stop hdalab
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   152
$ echo "drop database hdalab;\ncreate database hdalab owner iri encoding 'utf-8';" | docker exec -i hdalab_pg_1 psql -U iri postgres
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   153
```
385e3a12ee27 Containerization and various corrections to make it work
ymh <ymh.work@gmail.com>
parents:
diff changeset
   154
687
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
   155
## Accès à la base de donnée
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
   156
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
   157
Le port postgresql 5432 est ouvert sur l'ordinateur hôte.
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
   158
La base utilisée par l'application est `hdalab`.
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
   159
L'utilisateur et mot de passe pour y accéder sont :
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
   160
  - utilisateur: `iri`
53fee689f666 Dockerfile correction and add a way to save/load the docker images.
ymh <ymh.work@gmail.com>
parents: 686
diff changeset
   161
  - mot de passe: `iri`