Advertisement
Guest User

Untitled

a guest
May 24th, 2017
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.69 KB | None | 0 0
  1. version: "2"
  2. settings:
  3. conductor_base: centos:7
  4. defaults:
  5. POSTGRES_USER: django
  6. POSTGRES_PASSWORD: sesame
  7. POSTGRES_DB: django
  8. DJANGO_PORT: 8080
  9. services:
  10. django:
  11. from: centos:7
  12. roles:
  13. - django-gunicorn
  14. environment:
  15. DATABASE_URL: "pgsql://{{ POSTGRES_USER }}:{{ POSTGRES_PASSWORD }}@postgres:5432/{{ POSTGRES_DB }}"
  16. DJANGO_ROOT: '{{ DJANGO_ROOT }}'
  17. DJANGO_VENV: '{{ DJANGO_VENV }}'
  18. links:
  19. - postgres
  20. - postgres:postgresql
  21. ports:
  22. - '{{ DJANGO_PORT }}'
  23. working_dir: '{{ DJANGO_ROOT }}'
  24. user: '{{ DJANGO_USER }}'
  25. command: ['{{ DJANGO_VENV }}/bin/gunicorn', '-w', '2', '-b', '0.0.0.0:{{ DJANGO_PORT }}', 'project.wsgi:application']
  26. entrypoint: ['/usr/bin/dumb-init', '/usr/bin/entrypoint.sh']
  27. volumes:
  28. - 'static:{{ DJANGO_ROOT }}'
  29. dev_overrides:
  30. command: ['{{ DJANGO_VENV }}/bin/python', 'manage.py', 'runserver', '0.0.0.0:{{ DJANGO_PORT }}']
  31. volumes:
  32. - '${PWD}:{{ DJANGO_ROOT }}'
  33. - "static:/static"
  34. expose:
  35. - "{{ DJANGO_PORT }}"
  36. environment:
  37. DEBUG: "1"
  38. nginx:
  39. from: centos:7
  40. roles:
  41. - nginx
  42. ports:
  43. - '{{ DJANGO_PORT }}:8000'
  44. user: nginx
  45. links:
  46. - django
  47. command: ['/usr/bin/dumb-init', 'nginx', '-c', '/etc/nginx/nginx.conf']
  48. volumes:
  49. - 'static:{{ STATIC_ROOT }}'
  50. dev_overrides:
  51. ports: []
  52. command: /bin/false
  53. volumes: []
  54. postgres:
  55. from: postgres:9.6
  56. environment:
  57. POSTGRES_USER: "{{ POSTGRES_USER }}"
  58. POSTGRES_PASSWORD: "{{ POSTGRES_PASSWORD }}"
  59. POSTGRES_DB: "{{ POSTGRES_DB }}"
  60. volumes:
  61. static:
  62. docker: {}
  63. registries: {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement