ruby on rails - Unable to access MS SQL running in one Docker container from an other Docker container -


i'm running ms sql in docker

i can access ms sql workstation, not work if try connect rails docker container:

$ docker exec -it 73  bundle exec rails c loading development environment (rails 5.1.3) [1] pry(main)> user.last tinytds::error: cannot open server 'mssql' requested login. client ip address '109.74.176.74' not allowed access server.   enable access, use windows azure management portal or run  sp_set_firewall_rule on master database create firewall rule ip address or address range.  may take 5 minutes change take effect. /usr/local/bundle/gems/tiny_tds-2.0.0/lib/tiny_tds/client.rb:53:in `connect'  cannot open server 'mssql' requested login.  client ip address '$my_external_ip' not allowed access server.  enable access, use windows azure management portal or  run sp_set_firewall_rule on master database  create firewall rule ip address or address range.  may take 5 minutes change take effect. 

docker-compose.yml

version: '2'  services:   mssql:     image: 'microsoft/mssql-server-linux:ctp2-1'     environment:       - accept_eula=y       - sa_password=top-5ecret       - path=$path:/opt/mssql-tools/bin:/opt/mssql/bin     ports:       - '1433:1433'    website:     build: .     command: bundle exec puma --config config/puma/development.rb      environment:       - rack_env=development       - rails_env=development             - database_url=sqlserver://sa:top-5ecret@mssql:1433/sst-staging        - aad_scope=openid       - aad_redirect_uri=http://localhost:3000/sst/auth/exchange       - login_uri=http://localhost:3000/sst/login        # remember export following vars shell. e.g ~/.profile       # add them container if present.       - aad_tenant       - aad_client_id        ports:       - '3000:3000'     volumes:       - '.:/numbers'     stdin_open: true     tty: true 


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -