Skip to content

Commit

Permalink
update data
Browse files Browse the repository at this point in the history
  • Loading branch information
blackstar-baba committed Sep 2, 2020
1 parent 3103787 commit 6af3a77
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,12 @@ private void check(Instance instance) {
}
// check envs
List<ContainerEnvSetting> envs = containerInfo.getEnvs();
for (ContainerEnvSetting env : envs) {
if(env.getKey() == null || env.getValue() == null){
throw new RuntimeException("container info env key can't be null");
// todo if some envs need , return error
if(envs != null) {
for (ContainerEnvSetting env : envs) {
if (env.getKey() == null || env.getValue() == null) {
throw new RuntimeException("container info env key can't be null");
}
}
}
if(appVersionService.getVersionByNameAndVersion(instance.getAppName(),instance.getAppVersion()) == null) {
Expand Down
29 changes: 19 additions & 10 deletions src/main/resources/db/data.sql
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
-- table app
INSERT INTO app (name, author, type, description, create_time, update_time, status, additional_info) VALUES ('metabase', 'admin', 'BI', 'Metabase is the easy, open source way for everyone in your company to ask questions and learn from data.', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:59.919000', 0, '{"imageName":"metabase/metabase","ports":[{"port":3000,"type":"http","entrance":true}]}');
INSERT INTO app (name, author, type, description, create_time, update_time, status, additional_info) VALUES ('nginx', 'admin', 'Web', 'nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written by Igor Sysoev.', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:59.919000', 0, '{"imageName":"nginx","ports":[{"port":80,"type":"http","entrance":true}]}');
-- table app source
INSERT INTO app_source (id, version, repository) VALUES ('00000000-0000-0000-0000-000000000000', 'v0.0.0', null);
-- table app version
INSERT INTO app_version (app_name, version, additional_info, create_time, update_time, status, download_status) VALUES ('metabase', 'v0.35.4', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:40.695000', 0, 1);
INSERT INTO app_version (app_name, version, additional_info, create_time, update_time, status, download_status) VALUES ('nginx', '1.19.2', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:40.695000', 0, 1);
-- sys user
INSERT INTO sys_user (id, username, password, mail, create_time, update_time, status) VALUES ('00000000-0000-0000-0000-000000000000', 'admin', '$2a$10$vFOaYBYNk3tkFOrZ2y5NMerpt2SuXZeshfOHiKvyEh4PSI9EseWzC', null, null, null, null);
INSERT INTO PUBLIC.APP (NAME, AUTHOR, TYPE, DESCRIPTION, CREATE_TIME, UPDATE_TIME, STATUS, ADDITIONAL_INFO) VALUES ('metabase', 'admin', 'BI', 'Metabase is the easy, open source way for everyone in your company to ask questions and learn from data.', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:59.919000', 0, '{"imageName":"metabase/metabase","ports":[{"port":3000,"type":"http","entrance":true}]}');
INSERT INTO PUBLIC.APP (NAME, AUTHOR, TYPE, DESCRIPTION, CREATE_TIME, UPDATE_TIME, STATUS, ADDITIONAL_INFO) VALUES ('nginx', 'admin', 'Web', 'nginx [engine x] is an HTTP and reverse proxy server, a mail proxy server, and a generic TCP/UDP proxy server, originally written by Igor Sysoev.', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:59.919000', 0, '{"imageName":"nginx","ports":[{"port":80,"type":"http","entrance":true}]}');
INSERT INTO PUBLIC.APP (NAME, AUTHOR, TYPE, DESCRIPTION, CREATE_TIME, UPDATE_TIME, STATUS, ADDITIONAL_INFO) VALUES ('postgres', 'admin', 'Database', 'PostgreSQL, often simply "Postgres", is an object-relational database management system (ORDBMS) with an emphasis on extensibility and standards-compliance. As a database server, its primary function is to store data, securely and supporting best practices, and retrieve it later, as requested by other software applications, be it those on the same computer or those running on another computer across a network (including the Internet). It can handle workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. Recent versions also provide replication of the database itself for security and scalability.', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:59.919000', 0, '{"imageName":"postgres","ports":[{"port":5432,"type":"tcp"}],"envs":[{"label":"password","key":"POSTGRES_PASSWORD"}]}');
INSERT INTO PUBLIC.APP (NAME, AUTHOR, TYPE, DESCRIPTION, CREATE_TIME, UPDATE_TIME, STATUS, ADDITIONAL_INFO) VALUES ('cassandra', 'admin', 'Database', 'Apache Cassandra is an open source distributed database management system designed to handle large amounts of data across many commodity servers, providing high availability with no single point of failure. Cassandra offers robust support for clusters spanning multiple datacenters, with asynchronous masterless replication allowing low latency operations for all clients.', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:57.581000', 0, '{"imageName":"cassandra","ports":[{"port":9042,"type":"tcp"}]}');
INSERT INTO PUBLIC.APP (NAME, AUTHOR, TYPE, DESCRIPTION, CREATE_TIME, UPDATE_TIME, STATUS, ADDITIONAL_INFO) VALUES ('mysql', 'admin', 'Database', 'MySQL is the world''s most popular open source database. With its proven performance, reliability and ease-of-use, MySQL has become the leading database choice for web-based applications, covering the entire range from personal projects and websites, via e-commerce and information services, all the way to high profile web properties including Facebook, Twitter, YouTube, Yahoo! and many more.', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:57.581000', 0, '{"imageName":"mysql","ports":[{"port":3306,"type":"tcp"}],"envs":[{"label":"password","key":"MYSQL_ROOT_PASSWORD"}]}');
INSERT INTO PUBLIC.APP (NAME, AUTHOR, TYPE, DESCRIPTION, CREATE_TIME, UPDATE_TIME, STATUS, ADDITIONAL_INFO) VALUES ('wordpress', 'admin', 'Util', 'WordPress is a free and open source blogging tool and a content management system (CMS) based on PHP and MySQL', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:57.581000', 0, '{"imageName":"wordpress","ports":[{"port":80,"type":"http","entrance":true}]}');
INSERT INTO PUBLIC.APP (NAME, AUTHOR, TYPE, DESCRIPTION, CREATE_TIME, UPDATE_TIME, STATUS, ADDITIONAL_INFO) VALUES ('redis', 'admin', 'Database', 'Redis is an open-source, networked, in-memory, key-value data store with optional durability. It is written in ANSI C. The development of Redis is sponsored by Redis Labs today; before that, it was sponsored by Pivotal and VMware. According to the monthly ranking by DB-Engines.com, Redis is the most popular key-value store. The name Redis means REmote DIctionary Server.', '2020-06-28 14:36:57.581000', '2020-06-28 14:36:57.581000', 0, '{"imageName":"redis","ports":[{"port":6379,"type":"tcp"}]}');
INSERT INTO PUBLIC.APP_SOURCE (ID, VERSION, REPOSITORY) VALUES ('00000000-0000-0000-0000-000000000000', 'v0.0.0', null);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('metabase', 'v0.35.4', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:40.695000', 0, 2);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('nginx', '1.19.2', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:40.695000', 0, 0);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('metabase', 'v0.35.3', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:40.695000', 0, 2);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('nginx', '1.19.1', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:40.695000', 0, 2);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('postgres', '9.6', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:40.695000', 0, 2);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('mysql', '5.7.31', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:39.298000', 0, 0);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('cassandra', '3.11.7', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:40.695000', 0, 0);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('wordpress', '5.5.0-php7.2-apache', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:39.298000', 0, 0);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('tomcat', '8.5.57-jdk8-openjdk-buster', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:39.298000', 0, 0);
INSERT INTO PUBLIC.APP_VERSION (APP_NAME, VERSION, ADDITIONAL_INFO, CREATE_TIME, UPDATE_TIME, STATUS, DOWNLOAD_STATUS) VALUES ('redis', '6.0.7', null, '2020-06-28 14:42:39.298000', '2020-06-28 14:42:39.298000', 0, 2);
INSERT INTO PUBLIC.SYS_USER (ID, USERNAME, PASSWORD, MAIL, CREATE_TIME, UPDATE_TIME, STATUS) VALUES ('00000000-0000-0000-0000-000000000000', 'admin', '$2a$10$vFOaYBYNk3tkFOrZ2y5NMerpt2SuXZeshfOHiKvyEh4PSI9EseWzC', null, null, null, null);

0 comments on commit 6af3a77

Please sign in to comment.