Private
Public Access
Firebird hinzugefügt
+150
@@ -0,0 +1,150 @@
|
||||
# Firebird
|
||||
|
||||
Firebird support is being introduced as a parallel database backend.
|
||||
|
||||
This is especially relevant because macOS-based Romexis installations use Firebird and because Firebird is a realistic path for ARM64 environments.
|
||||
|
||||
---
|
||||
|
||||
## Compose Service
|
||||
|
||||
Recommended Firebird service:
|
||||
|
||||
```yaml
|
||||
firebird:
|
||||
image: jacobalberty/firebird:3.0
|
||||
container_name: romexis-firebird
|
||||
environment:
|
||||
ISC_PASSWORD: "${FIREBIRD_PASSWORD}"
|
||||
FIREBIRD_DATABASE: "romexis.fdb"
|
||||
ports:
|
||||
- "${FIREBIRD_PORT:-3050}:3050"
|
||||
volumes:
|
||||
- ${ROMEXIS_DATA_ROOT}/firebird:/firebird/data
|
||||
healthcheck:
|
||||
test: ["CMD-SHELL", "nc -z localhost 3050 || exit 1"]
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 30
|
||||
start_period: 20s
|
||||
restart: unless-stopped
|
||||
```
|
||||
|
||||
Do not configure the container to create a second `SYSDBA` user. `SYSDBA` already exists.
|
||||
|
||||
---
|
||||
|
||||
## Romexis Settings
|
||||
|
||||
```env
|
||||
SERVER_DB=4
|
||||
FIREBIRD_PORT=3050
|
||||
FIREBIRD_USER=sysdba
|
||||
FIREBIRD_PASSWORD=pwr0mex!
|
||||
FIREBIRD_DB_PATH=/firebird/data/romexis.fdb
|
||||
|
||||
ROMEXIS_DB_USER=sysdba
|
||||
ROMEXIS_DB_PASSWORD=pwr0mex!
|
||||
```
|
||||
|
||||
Generated JDBC URL:
|
||||
|
||||
```text
|
||||
jdbc:firebirdsql://firebird:3050//firebird/data/romexis.fdb
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Firebird SQL Payload
|
||||
|
||||
The Firebird SQL payload is extracted from the macOS Romexis installer and stored in:
|
||||
|
||||
```text
|
||||
/opt/romexis-firebird-db
|
||||
```
|
||||
|
||||
Important files:
|
||||
|
||||
```text
|
||||
scripts/RX_Create_Database.sql
|
||||
scripts/RX_Base_10fb_MAC.sql
|
||||
scripts/rxdb.sh
|
||||
scripts/rxupd.sh
|
||||
tools/Romexis_Firebird_Backup.sh
|
||||
tools/Romexis_Firebird_Restore.sh
|
||||
templates/romexis_new.fdb
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Important Tooling Note
|
||||
|
||||
The Firebird CLI tool should be:
|
||||
|
||||
```text
|
||||
isql-fb
|
||||
```
|
||||
|
||||
not unixODBC `isql`.
|
||||
|
||||
If you see this output:
|
||||
|
||||
```text
|
||||
unixODBC - isql and iusql
|
||||
```
|
||||
|
||||
then the wrong tool is being used.
|
||||
|
||||
Set:
|
||||
|
||||
```bash
|
||||
export ISQL=isql-fb
|
||||
```
|
||||
|
||||
or make the init script default to:
|
||||
|
||||
```bash
|
||||
ISQL="${ISQL:-isql-fb}"
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## Database Creation Strategy
|
||||
|
||||
If the Firebird container creates an empty database via:
|
||||
|
||||
```yaml
|
||||
FIREBIRD_DATABASE: "romexis.fdb"
|
||||
```
|
||||
|
||||
then the Romexis Firebird init script should not run `CREATE DATABASE` again.
|
||||
|
||||
Instead, it should connect to the existing empty database and import the Romexis SQL scripts.
|
||||
|
||||
---
|
||||
|
||||
## Debugging Firebird Initialization
|
||||
|
||||
Open a shell in the Romexis container:
|
||||
|
||||
```bash
|
||||
docker exec -it romexis-server bash
|
||||
```
|
||||
|
||||
Run the initializer manually:
|
||||
|
||||
```bash
|
||||
ISQL=isql-fb DB_CREATE_VERBOSE=1 bash -x /opt/init-romexis-firebird-db.sh
|
||||
```
|
||||
|
||||
Check connectivity:
|
||||
|
||||
```bash
|
||||
bash -c ':</dev/tcp/firebird/3050'
|
||||
```
|
||||
|
||||
Connect manually:
|
||||
|
||||
```bash
|
||||
isql-fb -user sysdba -password 'pwr0mex!' firebird/3050:/firebird/data/romexis.fdb
|
||||
```
|
||||
Reference in New Issue
Block a user