You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi,
The below one is the bitbucket-pipelines.yml
image: ruby:2.4.5
options:
size: 2x
pipelines:
default:
- step:
name: Running Rspec
caches:
- bundler
- yarn
script:
- apt-get update
- curl -sL https://deb.nodesource.com/setup_8.x | bash -
- apt-get update && apt-get install -y nodejs
- curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
- apt-get update
- apt-get install -y yarn
- apt-get install -y mutt
- cp Gemfile.CI Gemfile
- bundle install
- yarn install
- rspec
services:
- mysql
- elasticsearch
- docker
definitions:
services:
mysql:
image: mysql:5.6
environment:
MYSQL_DATABASE: "database_name"
MYSQL_ROOT_PASSWORD: "password"
elasticsearch:
memory: 4096
image: elasticsearch:6.4.0
customservice:
image: customservice
caches:
bundler: ./vendor
yarn: ./node_modules
I need some way to connect my customservice to mysql service.
CustomService will start a rails container on spinning a container.
while starting the container it needs to connect to mysql service. I have tried configuring the host as 127.0.0.1, localhost, mysql in the database.yml. But nothing worked
Please help me if I am doing something wrong.
How about running this directly via docker in the script section?
Also take note that there is a limitation that there is no mechanism waiting for the service startup.
Thanks for the reply.
My Customservice was able to connect to MySQL on localhost.
For that, I need to put some sleep time before I start the rails server.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey there Cloud Community members! We’re excited to give you the first glimpse of the new home for business teams on Jira — Jira Work Management. Jira Work Management is the next generation of J...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.