Advertisement
Guest User

Untitled

a guest
Apr 12th, 2019
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. version: '2.1'
  2.  
  3. services:
  4. db:
  5. image: postgres:9.6.1
  6. volumes:
  7. - db:/var/lib/postgresql/data
  8. environment:
  9. - POSTGRES_DB=sampledb
  10. - POSTGRES_USER=sampleuser
  11. - POSTGRES_PASSWORD=samplesecret
  12. - POSTGRES_INITDB_ARGS=--encoding=UTF-8
  13. healthcheck:
  14. test: "pg_isready -h localhost -p 5432 -q -U postgres"
  15. interval: 3s
  16. timeout: 1s
  17. retries: 10
  18.  
  19. django:
  20. image: puilp0502/django-sample
  21. environment:
  22. - DJANGO_DEBUG=True
  23. - DJANGO_DB_HOST=db
  24. - DJANGO_DB_PORT=5432
  25. - DJANGO_DB_NAME=sampledb
  26. - DJANGO_DB_USERNAME=sampleuser
  27. - DJANGO_DB_PASSWORD=samplesecret
  28. - DJANGO_SECRET_KEY=dev_secret_key
  29. ports:
  30. - "8000:8000"
  31. depends_on:
  32. db:
  33. condition: service_healthy
  34. links:
  35. - db
  36. command: python manage.py runserver 0.0.0.0:8000
  37.  
  38. volumes:
  39. db:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement