SciencesPoDRIS / archelec4

https://archelec.sciencespo.fr
1 stars 2 forks source link

= Project Archelec

== How to install with docker

=== Requirements

To be able to install the application on your server, you will need :

On debian like system, you can install them with the following command : apt-get install git docker docker-compose

=== Process

$>git clone https://github.com/SciencesPoDRIS/archelec4 /opt/archelec4

$>useradd archelec -d /opt/archelec/ -M -r -s /bin/bash

$> usermod -aG docker archelec

$>chown -R archelec:archelec /opt/archelec

[source,bash]

$> cd /etc/systemd/system/ $> vi archelec.service [Unit] Description=archelec Requires=docker.service

After=docker.service [Service] Restart=always User=archelec Group=archelec WorkingDirectory=/opt/archelec/docker

Shutdown container (if running) when unit is started

ExecStartPre=docker-compose -f docker-compose.yml down

Start container when unit is started

ExecStart=docker-compose -f docker-compose.yml up

Stop container when unit is stopped

ExecStop=docker-compose -f docker-compose.yml down

[Install] WantedBy=multi-user.target $> sudo systemctl enable archelec.service

TIP: You can check the log of the process with the command journalctl -u archelec.service

Wait some minutes (the build of the docker stack can takes ~10min), and open your favorite browser on http://localchost (you can replace localhost by the name/ip of your server)

include::./docker/README.adoc[leveloffset=+1]

include::./frontend/README.adoc[leveloffset=+1]

include::./backend/README.adoc[leveloffset=+1]