Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ echo 'SELECT * FROM rdb$database;' | \
`port`
> Optional port published in the host for connecting to the database. Default 3050.

`event_port`
> Optional port for Firebird database events (`RemoteAuxPort`). If set, configures `RemoteAuxPort` in `firebird.conf` and publishes the port on the host. This is required when using Firebird event listeners from outside the container.

`firebird_database`
> Optional name for creating a database with the container

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ inputs:
description: 'Port published in the host for connecting to the database. Default: 3050.'
required: false
default: '3050'
event_port:
description: 'Optional port for Firebird events (RemoteAuxPort). If set, configures RemoteAuxPort in firebird.conf and publishes the port. Default: empty (disabled).'
required: false
default: ''
firebird_database:
description: 'Optional name for creating a database inside the container'
required: false
Expand Down
11 changes: 9 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,17 @@ if [ -n "${INPUT_VOLUMES:-}" ]; then
IFS="${OLD_IFS}"
fi

echo "# Creating the FirebirdSQL Container: docker run --detach --name ${INPUT_CONTAINER_NAME:-firebirdsql} --publish ${INPUT_PORT:-3050}:3050 ${env_list} ${volumes_arg} firebirdsql/firebird:${INPUT_VERSION:-latest}"
event_port_arg=''
if [ -n "${INPUT_EVENT_PORT:-}" ]; then
printf '# Publishing event port (RemoteAuxPort): %s\n' "${INPUT_EVENT_PORT}"
env_list="${env_list} --env FIREBIRD_CONF_RemoteAuxPort=${INPUT_EVENT_PORT}"
event_port_arg="--publish ${INPUT_EVENT_PORT}:${INPUT_EVENT_PORT}"
fi

echo "# Creating the FirebirdSQL Container: docker run --detach --name ${INPUT_CONTAINER_NAME:-firebirdsql} --publish ${INPUT_PORT:-3050}:3050 ${env_list} ${event_port_arg} ${volumes_arg} firebirdsql/firebird:${INPUT_VERSION:-latest}"

# shellcheck disable=SC2086
if ! docker run --detach --name "${INPUT_CONTAINER_NAME:-firebirdsql}" --publish "${INPUT_PORT:-3050}:3050" ${network_arg} ${env_list} ${volumes_arg} "firebirdsql/firebird:${INPUT_VERSION:-latest}" ; then
if ! docker run --detach --name "${INPUT_CONTAINER_NAME:-firebirdsql}" --publish "${INPUT_PORT:-3050}:3050" ${network_arg} ${env_list} ${event_port_arg} ${volumes_arg} "firebirdsql/firebird:${INPUT_VERSION:-latest}" ; then
echo "## Failed to create the FirebirdSQL container! ##"
exit 11
fi
Expand Down
Loading