Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Does postgres start automatically in the pipeline?

I keep getting the following error on the `npx lerna run migration:run` command which connects to postgres.

{ Error: connect ECONNREFUSED 127.0.0.1:5432    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)  errno: 'ECONNREFUSED',  code: 'ECONNREFUSED',  syscall: 'connect',  address: '127.0.0.1',  port: 5432 }

 My bitbucket pipeline looks like this

image: node:10.15.3
options:
max-time: 20

definitions:
services:
docker:
memory: 2000
postgres:
image: postgres
restart: always
environment:
POSTGRES_DB: 'db'
POSTGRES_USER: 'postgres'
POSTGRES_PASSWORD: 'test'
steps:
- step: &install-deps
name: Prepare node_modules
caches: *app-caches
script:
- npx lerna bootstrap --hoist
- npm i -g ts-node typescript
- npx lerna run migration:run
- npx lerna run seed
pipelines:
default:
- step: *install-deps
services:
- postgres

 

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Jira

Admins, notify your Jira instance of system-wide changes with the new admin announcement banner

Hi All! We’re excited to share the launch of an announcement banner that lets Jira site administrators communicate directly to their users across their  Jira Cloud instance.  ...

631 views 16 18
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you