Restarting Vidjil: Difference between revisions

From CPB Wiki
Jump to navigation Jump to search
(fix code tag)
(English prose.)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Sometimes a Vidjil instance needs to be restarted, such as when the application is down or when you need to reload it for some reason. Another important aspect of performing a restart is whether or not the Vidjil instance in question is the production server. As such, below are presented two sets of instructions on how to perform this task, one for the production server and one for test servers in general.
Sometimes a Vidjil instance needs to be restarted, such as when the application went down for unforeseen reasons or when you need to reload it. Another important aspect of performing a restart is whether or not the Vidjil instance in question is the production server. Therefore, we present below two sets of instructions on how to perform this task, one for the production server and one for test servers in general.


To restart the production Vidjil instance (https://vidjil.boldrini.org.br/):
== Restarting the Vidjil production instance ==
* send an email to the users to let them know Vidjil will be undergoing a brief maintenance. User emails can be obtained by going to the users tab in the web application.
* send an email to the users to let them know Vidjil will be undergoing a brief maintenance. User emails can be obtained by going to the users tab in the web application (https://vidjil.boldrini.org.br/).
* access via <code>ssh</code> the Vidjil production server (<code>vidjil.boldrini.org.br</code>).
* access the Vidjil production server (<code>vidjil.boldrini.org.br</code>) via <code>ssh</code>.
* go to the Vidjil Docker directory:  
* go to the Vidjil Docker directory:
<blockquote>
<code>cd ~vidjil/code/2020-vidjil/docker</code>
<code>cd ~vidjil/code/2020-vidjil/docker</code>
</blockquote>
* check the status of the Docker containers. Vidjil is composed by 5 containers, and when the application is down, usually at least one of the containers will also be down.
* check the status of the Docker containers. Vidjil is composed by 5 containers, and when the application is down, usually at least one of the containers will also be down.
<blockquote>
<code>docker-compose ps</code>
<code>docker-compose ps</code>
</blockquote>
* shut down the 5 containers:
* shut down the 5 containers:
<blockquote>
<code>docker-compose -f docker-compose-wrapper.yml down</code>
<code>docker-compose -f docker-compose-wrapper.yml down</code>
</blockquote>
* after the shut down is finished, restart the containers:
* after the shut down is finished, restart the containers:
<blockquote>
<code>docker-compose -f docker-compose-wrapper.yml up -d</code>
<code>docker-compose -f docker-compose-wrapper.yml up -d</code>
</blockquote>
* after the containers finish restarting, check if the service is indeed back online both by running <code>docker-compose ps</code> (all containers must be up) and by accessing the web application.
* after the containers finish restarting, check if the service is indeed back online both by running <code>docker-compose ps</code> (all containers must be up) and by accessing the web application.
* send another email to the users, letting them now that the maintenance is finished and that Vidjil is back online.
* send another email to the users, letting them know that the maintenance is finished and that Vidjil is back online.


To restart a generic Vidjil instance:
== Restarting a generic Vidjil instance ==
* access your Vidjil server.
* access your Vidjil server.
* go to the Vidjil Docker directory.  
* go to the Vidjil Docker directory.  
<blockquote>
<code>cd <path/to/vidjil>/docker</code>
<code>cd <path/to/vidjil>/docker</code>
</blockquote>
* check the status of the Docker containers. Vidjil is composed by 5 containers, and when the application is down, usually at least one of the containers will also be down.
* check the status of the Docker containers. Vidjil is composed by 5 containers, and when the application is down, usually at least one of the containers will also be down.
<blockquote>
<code>docker-compose ps</code>
<code>docker-compose ps</code>
</blockquote>
* shut down the 5 containers:
* shut down the 5 containers:
<blockquote>
<code>docker-compose -f docker-compose-wrapper.yml down</code>
<code>docker-compose -f docker-compose-wrapper.yml down</code>
</blockquote>
* after the shut down is finished, restart the containers:
* after the shut down is finished, restart the containers:
<blockquote>
<code>docker-compose -f docker-compose-wrapper.yml up -d</code>
<code>docker-compose -f docker-compose-wrapper.yml up -d</code>
* after the containers finish restarting, check if the service is indeed back online both by running <code>docker-compose ps</docker> (all containers must be up) and by accessing the web application.
</blockquote>
* after the containers finish restarting, check if the service is indeed back online both by running <code>docker-compose ps</code> (all containers must be up) and by accessing the web application.

Latest revision as of 11:00, 28 December 2023

Sometimes a Vidjil instance needs to be restarted, such as when the application went down for unforeseen reasons or when you need to reload it. Another important aspect of performing a restart is whether or not the Vidjil instance in question is the production server. Therefore, we present below two sets of instructions on how to perform this task, one for the production server and one for test servers in general.

Restarting the Vidjil production instance

  • send an email to the users to let them know Vidjil will be undergoing a brief maintenance. User emails can be obtained by going to the users tab in the web application (https://vidjil.boldrini.org.br/).
  • access the Vidjil production server (vidjil.boldrini.org.br) via ssh.
  • go to the Vidjil Docker directory:

cd ~vidjil/code/2020-vidjil/docker

  • check the status of the Docker containers. Vidjil is composed by 5 containers, and when the application is down, usually at least one of the containers will also be down.

docker-compose ps

  • shut down the 5 containers:

docker-compose -f docker-compose-wrapper.yml down

  • after the shut down is finished, restart the containers:

docker-compose -f docker-compose-wrapper.yml up -d

  • after the containers finish restarting, check if the service is indeed back online both by running docker-compose ps (all containers must be up) and by accessing the web application.
  • send another email to the users, letting them know that the maintenance is finished and that Vidjil is back online.

Restarting a generic Vidjil instance

  • access your Vidjil server.
  • go to the Vidjil Docker directory.

cd <path/to/vidjil>/docker

  • check the status of the Docker containers. Vidjil is composed by 5 containers, and when the application is down, usually at least one of the containers will also be down.

docker-compose ps

  • shut down the 5 containers:

docker-compose -f docker-compose-wrapper.yml down

  • after the shut down is finished, restart the containers:

docker-compose -f docker-compose-wrapper.yml up -d

  • after the containers finish restarting, check if the service is indeed back online both by running docker-compose ps (all containers must be up) and by accessing the web application.