entrypoint script now upgrades
This commit is contained in:
parent
e07af2eb65
commit
c6e7012f56
2 changed files with 6 additions and 3 deletions
|
|
@ -114,11 +114,14 @@ apachectl start
|
||||||
|
|
||||||
WebGUI includes Docker support for easy containerized deployment:
|
WebGUI includes Docker support for easy containerized deployment:
|
||||||
|
|
||||||
```bash
|
|
||||||
# Build Docker image
|
# Build Docker image
|
||||||
|
```bash
|
||||||
docker build -t webgui:latest .
|
docker build -t webgui:latest .
|
||||||
|
```
|
||||||
|
|
||||||
# Run with docker-compose (see distribution/docker-compose.yml)
|
# Run with docker-compose (see distribution/docker-compose.yml)
|
||||||
|
```bash
|
||||||
|
cd distribution
|
||||||
docker-compose up -d
|
docker-compose up -d
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,12 +18,12 @@ for configfile in `perl -Ilib sbin/wgd for-each`;do
|
||||||
code_version=`perl -Ilib -e 'use WebGUI; print $WebGUI::VERSION;'`
|
code_version=`perl -Ilib -e 'use WebGUI; print $WebGUI::VERSION;'`
|
||||||
|
|
||||||
echo "code version $code_version"
|
echo "code version $code_version"
|
||||||
echo "database version $db_version for $configfile"
|
echo "database version $db_version for $configfile with configfile $configfile"
|
||||||
|
|
||||||
if [ "$db_version" != "$code_version" ];then
|
if [ "$db_version" != "$code_version" ];then
|
||||||
echo "Upgrading Webgui from $db_version to $code_version..."
|
echo "Upgrading Webgui from $db_version to $code_version..."
|
||||||
#first we alter the userSession table to make sure that the userId has a default value This is required for the upgrade process to work correctly.
|
#first we alter the userSession table to make sure that the userId has a default value This is required for the upgrade process to work correctly.
|
||||||
`mysql -e 'alter table userSession MODIFY COLUMN userId char(22) NOT NULL DEFAULT "0";' $connection_info ` && break
|
`mysql -e 'alter table userSession MODIFY COLUMN userId char(22) NOT NULL DEFAULT "0";' $connection_info `
|
||||||
|
|
||||||
perl -Ilib sbin/wgd reset --upgrade --verbose --config-file=$configfile --webgui-root=/data/WebGUI/
|
perl -Ilib sbin/wgd reset --upgrade --verbose --config-file=$configfile --webgui-root=/data/WebGUI/
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue