diff --git a/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_analytics.sql b/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_analytics.sql index 82441e63..240d1de7 100644 --- a/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_analytics.sql +++ b/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_analytics.sql @@ -1,12 +1,12 @@ -DROP DATABASE IF EXISTS WSO2AM_STATS_DB; -DROP DATABASE IF EXISTS WSO2AM_BUSINESS_RULES_DB; -DROP DATABASE IF EXISTS WSO2AM_DASHBOARD_DB; -DROP DATABASE IF EXISTS WSO2AM_PERMISSIONS_DB; +-- DROP DATABASE IF EXISTS WSO2AM_STATS_DB; +-- DROP DATABASE IF EXISTS WSO2AM_BUSINESS_RULES_DB; +-- DROP DATABASE IF EXISTS WSO2AM_DASHBOARD_DB; +-- DROP DATABASE IF EXISTS WSO2AM_PERMISSIONS_DB; -CREATE DATABASE WSO2AM_STATS_DB; -CREATE DATABASE WSO2AM_BUSINESS_RULES_DB; -CREATE DATABASE WSO2AM_DASHBOARD_DB; -CREATE DATABASE WSO2AM_PERMISSIONS_DB; +CREATE DATABASE IF NOT EXISTS WSO2AM_STATS_DB; +CREATE DATABASE IF NOT EXISTS WSO2AM_BUSINESS_RULES_DB; +CREATE DATABASE IF NOT EXISTS WSO2AM_DASHBOARD_DB; +CREATE DATABASE IF NOT EXISTS WSO2AM_PERMISSIONS_DB; GRANT ALL ON WSO2AM_STATS_DB.* TO 'wso2carbon'@'%' IDENTIFIED BY 'wso2carbon'; GRANT ALL ON WSO2AM_BUSINESS_RULES_DB.* TO 'wso2carbon'@'%' IDENTIFIED BY 'wso2carbon'; diff --git a/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_apim.sql b/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_apim.sql index 36c0c701..675d4e57 100644 --- a/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_apim.sql +++ b/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_apim.sql @@ -1,5 +1,5 @@ -DROP DATABASE IF EXISTS WSO2AM_DB; -CREATE DATABASE WSO2AM_DB; +-- DROP DATABASE IF EXISTS WSO2AM_DB; +CREATE DATABASE IF NOT EXISTS WSO2AM_DB; GRANT ALL ON WSO2AM_DB.* TO 'wso2carbon'@'%' IDENTIFIED BY 'wso2carbon'; USE WSO2AM_DB; diff --git a/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_shared.sql b/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_shared.sql index 6356f692..594a1a35 100644 --- a/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_shared.sql +++ b/docker-compose/apim-is-as-km-with-analytics/conf/mysql/scripts/mysql_shared.sql @@ -1,5 +1,5 @@ -DROP DATABASE IF EXISTS WSO2AM_SHARED_DB; -CREATE DATABASE WSO2AM_SHARED_DB; +-- DROP DATABASE IF EXISTS WSO2AM_SHARED_DB; +CREATE DATABASE IF NOT EXISTS WSO2AM_SHARED_DB; GRANT ALL ON WSO2AM_SHARED_DB.* TO 'wso2carbon'@'%' IDENTIFIED BY 'wso2carbon'; USE WSO2AM_SHARED_DB; diff --git a/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml b/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml index 47172aa4..c320b36c 100755 --- a/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml +++ b/docker-compose/apim-is-as-km-with-analytics/docker-compose.yml @@ -23,6 +23,7 @@ services: volumes: - ./conf/mysql/scripts:/docker-entrypoint-initdb.d - ./conf/mysql/conf/my.cnf:/etc/mysql/my.cnf + - wso2:/var/lib/mysql ulimits: nofile: soft: 20000 @@ -99,3 +100,6 @@ services: condition: service_healthy volumes: - ./conf/apim-analytics-dashboard:/home/wso2carbon/wso2-config-volume + +volumes: + wso2: {} \ No newline at end of file