I have put my database in a compose file. I aim to start my database locally and have it separate from my other apps which will use it.
I have several other apps which will use this database instance, each with their own database in it.
I can start my database ok and I can connect to it from the host on localhost. However whenever my app starts in its own container it cannot seem to connect to the database. I am trying to use networks to do this.
Here is the compose for the database:
as you can see I am using sql server linux.
My app looks like this, is there a problem with my network. I am trying to use localhost to connect to it, I have also tried using the service name of ‘mssql’ in my database config. Should I be using something else?
This is my app compose:
command: bundle exec rails s -b 0.0.0.0
Am I missing anything?