Adding docker actions for database migrations.
This commit is contained in:
parent
3faef6da5e
commit
9d3fdf5bb7
@ -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
|
||||
|
||||
|
2
install_docker.sh
Normal file
2
install_docker.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
sudo docker exec LasTresDocker bash -c 'source ~/.profile && perl /var/lib/las_tres/LasTres/script/install.pl'
|
2
prepare_docker.sh
Normal file
2
prepare_docker.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
sudo docker exec LasTresDocker bash -c 'source ~/.profile && perl /var/lib/las_tres/LasTres/script/prepare.pl'
|
2
upgrade_docker.sh
Normal file
2
upgrade_docker.sh
Normal file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
sudo docker exec LasTresDocker bash -c 'source ~/.profile && perl /var/lib/las_tres/LasTres/script/upgrade.pl'
|
Loading…
x
Reference in New Issue
Block a user