diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9713e6..034fc7f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -54,8 +54,29 @@ bash start_docker.sh The first time you execute this the database migrations won't be applied but we are going to solve this soon. -As soon as the application is already listening interrupt -the process and +As soon as the application is already listening open +a new terminal and execute the following command to install +the database migrations. + +```shell +bash install_docker.sh +``` + +It is very important that all the docker actions are +done when the container is started otherwise they +will throw error and do nothing. + +### Creating new migrations. + +```shell +bash prepare_docker.sh +``` + +### Upgrading the database with the new migrations. + +```shell +bash upgrade_docker.sh +``` ## Installing diff --git a/install_docker.sh b/install_docker.sh new file mode 100644 index 0000000..55ff870 --- /dev/null +++ b/install_docker.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo docker exec LasTresDocker bash -c 'source ~/.profile && perl /var/lib/las_tres/LasTres/script/install.pl' diff --git a/prepare_docker.sh b/prepare_docker.sh new file mode 100644 index 0000000..6fa7b85 --- /dev/null +++ b/prepare_docker.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo docker exec LasTresDocker bash -c 'source ~/.profile && perl /var/lib/las_tres/LasTres/script/prepare.pl' diff --git a/upgrade_docker.sh b/upgrade_docker.sh new file mode 100644 index 0000000..149298a --- /dev/null +++ b/upgrade_docker.sh @@ -0,0 +1,2 @@ +#!/bin/bash +sudo docker exec LasTresDocker bash -c 'source ~/.profile && perl /var/lib/las_tres/LasTres/script/upgrade.pl'