-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
32 lines (29 loc) · 1.13 KB
/
Copy pathdocker-compose.yml
File metadata and controls
32 lines (29 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
services:
oracle:
image: ${ORACLE_IMAGE}
container_name: oracle23ai
ports:
- "${ORACLE_PORT}:1521" # Oracle listener
environment:
ORACLE_PASSWORD: "${ORACLE_PASSWORD}" # SYS/SYSTEM password (first run)
APP_USER: "${APP_USER}" # create an app schema/user
APP_USER_PASSWORD: "${APP_USER_PASSWORD}"
# Optional: generate random admin pwd instead of ORACLE_PASSWORD
# ORACLE_RANDOM_PASSWORD: "y"
volumes:
# Persistent database files
- oradata:/opt/oracle/oradata
# One-time initialization scripts (first run only)
- ./db/init:/container-entrypoint-initdb.d
# Scripts executed on every start (e.g., dynamic seed/reset hooks)
- ./db/startup:/container-entrypoint-startdb.d
healthcheck:
# Wait until we can actually run SQL against FREEPDB1
test: ["CMD-SHELL", "echo 'select 1 from dual;' | sqlplus -s -L system/${ORACLE_PASSWORD}@localhost:1521/FREEPDB1 | grep -q 1"]
interval: 30s
timeout: 10s
retries: 20
start_period: 90s
restart: unless-stopped
volumes:
oradata: