Guest User

Untitled

a guest
Nov 27th, 2018
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. version: '2.1'
  2. services:
  3. db:
  4. restart: always
  5. image: nikitph/portcastdbimage:latest
  6. ports:
  7. - "5432:5432"
  8. environment:
  9. - DEBUG = false
  10. healthcheck:
  11. test: ["CMD-SHELL", "pg_isready -U postgres"]
  12. interval: 5s
  13. timeout: 5s
  14. retries: 5
  15.  
  16. scraper:
  17. build: .
  18. restart: always
  19. links:
  20. - db
  21. environment:
  22. - DB_HOST = db
  23. - BAR = FOO
  24. depends_on:
  25. db:
  26. condition: service_healthy
  27. command: [ "python3", "./cycloneprocess.py" ]
  28.  
  29. self.connection = psycopg2.connect(host=os.environ["DB_HOST"], user=username, password=password, dbname=database)
  30.  
  31. self.connection = psycopg2.connect(host='db', user=username, password=password, dbname=database)
Add Comment
Please, Sign In to add comment