jacobalberty / firebird-docker

Firebird Dockerfile
130 stars 96 forks source link

How to change/set the default firebird.conf file automatically. #55

Closed siwalan closed 2 years ago

siwalan commented 4 years ago

Hi all,

For certain cases of my firebird container. We need some of them running in different port. This can be accomplished with changing the firebird.conf.

However. Even after I do a docker commit on the container instance where I have changed the firebird.conf, initializing a new container based on the new image commit still result in the same old, original version of firebird.conf. Is there any way that it can be changed? Personally, I think it is related to the docker-entrypoint.sh file.

Any help would be greatly appreciated!

Cheers,

mrotteveel commented 4 years ago

Out of curiosity: why do you need to change the port in the image?

The normal way of handling this is changing the port mapping when you run the image, that way the port inside the image can remain the same, while the port exposed to the outside world can be different.

siwalan commented 4 years ago

@mrotteveel

One of our legacy enterprises app requires Firebird to work at port 3051.

I need to find a way to do it automatically, preferably without any human intervention, because in most cases the regular and remote site user may need to be able to kill and create a new container.

Background: The ERP software often stuck/crashes/has problem with the database and require full system reboot, since a mere reload of the firebird would not work (previous sys-admin had tried this, it will only work again on full system reboot). We are dockerizing the firebird to enable us reboot Firebird without rebooting the entire system.

Thanks for the tip btw, it is a great idea.

Will try to expand more about it later.

Cheers,

mrotteveel commented 4 years ago

Where is that legacy application running in relation to the container with Firebird? In the same container, in a different container, on the host system? What are you using to orchestrate this (docker-compose, something else)?

BTW: requiring a full system reboot to solve problems with Firebird that aren't solved with a process restart sounds a bit odd.

jacobalberty commented 4 years ago

All you should need to do is create a volume for /firebird then edit the firebird.conf file in the etc sub folder under that volume.

siwalan commented 4 years ago

Where is that legacy application running in relation to the container with Firebird? In the same container, in a different container, on the host system? What are you using to orchestrate this (docker-compose, something else)?

BTW: requiring a full system reboot to solve problems with Firebird that aren't solved with a process restart sounds a bit odd.

The legacy app are located at the client side. And I'm planning to use docker-compose.

Yes, I have to admit that it is a bit odd. But it works. Restarting the client app won't work, reloading the database won't work. But rebooting the entire Firebird servers work. Keep in mind that the application is client side so the only thing located at the server is Firebird.

I wish that I can investigate more about this but unfortunately the vendor encrypted/locked the entire legacy databases.

siwalan commented 4 years ago

All you should need to do is create a volume for /firebird then edit the firebird.conf file in the etc sub folder under that volume.

Thanks! Will try this.

mrotteveel commented 4 years ago

In any case, if you are starting it with docker right now, then using -p 3051:3050 will expose the port 3050 of the image as port 3051 to the outside world, see also Container networking. You can do something similar in docker-compose:

ports:
  - "3051:3050"

(see docker-compose documentation for details)

mrotteveel commented 4 years ago

In my previous comment I had initially the wrong order (for some reason I always do this...), the correct order is -p 3051:3050.

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 14 days.