Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '2'
- services:
- postgres:
- image: "postgres"
- ports:
- - "5433:5432"
- networks:
- - example
- environment:
- POSTGRES_DB: dbname
- POSTGRES_USER: admin
- POSTGRES_PASSWORD: admin1
- volumes:
- - database:/var/lib/postgresql/data
- example.com:
- build: .
- ports:
- - "5000:5000"
- volumes:
- - .:/code
- networks:
- - example
- environment:
- DATABASE_URL: postgres://admin:admin1@postgres:5433/dbname
- NODE_ENV: local
- command: bash -c "sleep 10 && npm run knex migrate:latest"
- depends_on:
- - postgres
- networks:
- curted:
- driver: bridge
- volumes:
- database:
- module.exports = {
- local: {
- client: 'pg',
- connection: process.env.DATABASE_URL,
- ssl: false,
- migrations: {
- tableName: 'knex_migrations'
- }
- },
- staging: {
- client: 'pg',
- connection: process.env.DATABASE_URL,
- ssl: true,
- migrations: {
- tableName: 'knex_migrations'
- },
- pool: {
- min: 1,
- max: 2
- }
- },
- production: {
- client: 'pg',
- connection: process.env.DATABASE_URL,
- ssl: true,
- migrations: {
- tableName: 'knex_migrations'
- },
- pool: {
- min: 1,
- max: 2
- }
- }
- };
- curted.com_1 | > CuratedProducts@1.0.0 knex /home/app
- curted.com_1 | > knex "migrate:latest"
- curted.com_1 |
- curted.com_1 | Using environment: local
- curted.com_1 | Error: connect ECONNREFUSED 172.18.0.2:5433
- curted.com_1 | at Object.exports._errnoException (util.js:1022:11)
- curted.com_1 | at exports._exceptionWithHostPort (util.js:1045:20)
- curted.com_1 | at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1090:14)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement