Skip to content

Commit 961b0f6

Browse files
committed
add docker-compose.yml for oracle test
1 parent 99361bc commit 961b0f6

2 files changed

Lines changed: 68 additions & 0 deletions

File tree

xt/oracle/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# movabletype-oracle
2+
3+
## Setup
4+
5+
Build an oracle docker image beforehand. (oracle/database:19.3.0 for example)
6+
7+
In order to build one, `git clone` a repository.
8+
9+
```sh
10+
git clone git@github.com:oracle/docker-images.git
11+
cd docker-images/OracleDatabase/SingleInstance/dockerfiles/
12+
```
13+
14+
Download zip file from [download page on oracle.com](https://www.oracle.com/database/technologies/oracle19c-linux-downloads.html#license-lightbox) and put it into `./19.3.0/` directory.
15+
16+
Build the image with following command.
17+
18+
```sh
19+
./buildContainerImage.sh -v 19.3.0 -e
20+
```
21+
22+
## Test
23+
24+
```sh
25+
cd data-objectdriver
26+
ORACLE_VERSION=19.3.0-ee docker compose -f ./xt/oracle/docker-compose.yml up
27+
docker exec -it oracle-dod-1 prove -Ilib -It/lib t
28+
```
29+
30+
## Inspect DB
31+
32+
```sh
33+
docker exec -it oracle-dod-1 sh -c "NLS_LANG=JAPANESE_JAPAN.AL32UTF8 sqlplus system/test@oracle/global"
34+
```
35+
36+
```sql
37+
SET ECHO OFF
38+
SET SERVEROUTPUT ON SIZE 1000000
39+
SET PAGESIZE 999
40+
SET LINESIZE 32000
41+
select ...
42+
```

xt/oracle/docker-compose.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
services:
2+
dod:
3+
image: movabletype/test:oracle8
4+
volumes:
5+
- ../../:/dod
6+
read_only: false
7+
working_dir: /dod
8+
entrypoint: ''
9+
environment:
10+
- DOD_TEST_DSN=dbi:Oracle:sid=global;user=system;password=test;host=oracle;port=1521
11+
- DOD_TEST_USER=system
12+
- DOD_TEST_PASS=test
13+
- DOD_TEST_DRIVER=Oracle
14+
command: bash -c "cpanm --installdeps . && tail -f /dev/null"
15+
stdin_open: true
16+
tty: true
17+
oracle:
18+
image: "oracle/database:${ORACLE_VERSION:-19.3.0-ee}"
19+
environment:
20+
ORACLE_SID: global
21+
ORACLE_PWD: test
22+
ports:
23+
- 1521:1521
24+
tty: true
25+
stdin_open: true
26+
restart: always

0 commit comments

Comments
 (0)