Merge branch 'test-oracle' of github.com:budibase/budibase into test-oracle

This commit is contained in:
Sam Rose 2024-07-30 11:04:06 +01:00
commit 4b80d7cb91
No known key found for this signature in database
2 changed files with 13 additions and 8 deletions

View File

@ -6,9 +6,9 @@ services:
db: db:
restart: unless-stopped restart: unless-stopped
platform: linux/x86_64 platform: linux/x86_64
image: container-registry.oracle.com/database/express:18.4.0-xe image: gvenzl/oracle-free:23.2-slim-faststart
environment: environment:
ORACLE_PWD: oracle ORACLE_PWD: Password1
ports: ports:
- 1521:1521 - 1521:1521
- 5500:5500 - 5500:5500
@ -16,4 +16,4 @@ services:
- oracle_data:/opt/oracle/oradata - oracle_data:/opt/oracle/oradata
volumes: volumes:
oracle_data: oracle_data:

View File

@ -7,17 +7,23 @@ import knex from "knex"
let ports: Promise<testContainerUtils.Port[]> let ports: Promise<testContainerUtils.Port[]>
export async function getDatasource(): Promise<Datasource> { export async function getDatasource(): Promise<Datasource> {
// password needs to conform to Oracle standards
const password = "password"
if (!ports) { if (!ports) {
let image = "oracle/database:19.3.0.0-ee-slim-faststart" // couldn't build 19.3.0 for X64
let image = "budibase/oracle-database:23.2-slim-faststart"
if (process.arch.startsWith("arm")) { if (process.arch.startsWith("arm")) {
image = "samhuang78/oracle-database:19.3.0-ee-slim-faststart" // there isn't an ARM compatible 23.2 build
image = "budibase/oracle-database:19.3.0-ee-slim-faststart"
} }
ports = startContainer( ports = startContainer(
new GenericContainer(image) new GenericContainer(image)
.withExposedPorts(1521) .withExposedPorts(1521)
.withEnvironment({ ORACLE_PASSWORD: "password" }) .withEnvironment({
.withWaitStrategy(Wait.forHealthCheck().withStartupTimeout(60000)) ORACLE_PASSWORD: password,
})
.withWaitStrategy(Wait.forLogMessage("DATABASE IS READY TO USE!"))
) )
} }
@ -28,7 +34,6 @@ export async function getDatasource(): Promise<Datasource> {
const host = "127.0.0.1" const host = "127.0.0.1"
const user = "SYSTEM" const user = "SYSTEM"
const password = "password"
const datasource: Datasource = { const datasource: Datasource = {
type: "datasource_plus", type: "datasource_plus",