Skip to content

Commit c1daefa

Browse files
committed
Add db2 to samples
1 parent 93794ab commit c1daefa

File tree

6 files changed

+51
-2
lines changed

6 files changed

+51
-2
lines changed

scalardb-kotlin-sample/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ repositories {
1313
}
1414

1515
dependencies {
16-
implementation("com.scalar-labs", "scalardb", "3.13.0")
16+
implementation("com.scalar-labs", "scalardb", "3.16.0")
1717
testImplementation(kotlin("test"))
1818
}
1919

scalardb-kotlin-sample/database.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@
3939
# scalar.db.contact_points=localhost
4040
# scalar.db.username=cassandra
4141
# scalar.db.password=cassandra
42+
43+
# For Db2
44+
scalar.db.storage=jdbc
45+
scalar.db.contact_points=jdbc:db2://localhost:50000/sample_db
46+
scalar.db.username=db2inst1
47+
scalar.db.password=db2inst1

scalardb-kotlin-sample/docker-compose.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,17 @@ services:
4040
container_name: "cassandra-1"
4141
ports:
4242
- "9042:9042"
43+
db2:
44+
image: icr.io/db2_community/db2:12.1.1.0
45+
# image: icr.io/db2_community/db2:11.5.9.0
46+
platform: linux/x86_64
47+
environment:
48+
- DB2INSTANCE=db2inst1
49+
- DB2INST1_PASSWORD=db2inst1
50+
- DBNAME=sample_db
51+
- LICENSE=accept
52+
# On macOS, uncomment the following line
53+
- IS_OSXFS=true
54+
ports:
55+
- "50000:50000"
56+
privileged: true

scalardb-sample/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repositories {
1111
}
1212

1313
dependencies {
14-
implementation 'com.scalar-labs:scalardb:3.13.0'
14+
implementation 'com.scalar-labs:scalardb:3.16.0'
1515
implementation 'info.picocli:picocli:4.7.1'
1616
}
1717

scalardb-sample/database.properties

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@
3939
# scalar.db.contact_points=localhost
4040
# scalar.db.username=cassandra
4141
# scalar.db.password=cassandra
42+
43+
# For Db2
44+
scalar.db.storage=jdbc
45+
scalar.db.contact_points=jdbc:db2://localhost:50000/sample
46+
scalar.db.username=db2inst1
47+
scalar.db.password=db2inst1

scalardb-sample/docker-compose.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,26 @@ services:
4040
container_name: "cassandra-1"
4141
ports:
4242
- "9042:9042"
43+
db2:
44+
image: icr.io/db2_community/db2:12.1.1.0
45+
platform: linux/x86_64
46+
environment:
47+
- DB2INSTANCE=db2inst1
48+
- DB2INST1_PASSWORD=db2inst1
49+
- DBNAME=sample
50+
- LICENSE=accept
51+
ports:
52+
- "50000:50000"
53+
privileged: true
54+
db2-win:
55+
image: icr.io/db2_community/db2:12.1.1.0
56+
environment:
57+
- DB2INSTANCE=db2inst1
58+
- DB2INST1_PASSWORD=db2inst1
59+
- DBNAME=sample
60+
- LICENSE=accept
61+
- PERSISTENT_HOME=false
62+
ports:
63+
- "50000:50000"
64+
privileged: true
65+

0 commit comments

Comments
 (0)