Guest User

Untitled

a guest
Jan 14th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. version: "3"
  2. services:
  3. db:
  4. restart: always
  5. container_name: tts-db
  6. image: postgres:9.6
  7. environment:
  8. - POSTGRES_USER=postgres
  9. - POSTGRES_PASSWORD=postgres
  10. - POSTGRES_DB=tts
  11. expose:
  12. - "5432"
  13.  
  14. nginx:
  15. image: nginx:latest
  16. container_name: tts-nginx
  17. ports:
  18. - "8000:8000"
  19. volumes:
  20. - ./nginx/site-enabled:/etc/nginx/conf.d
  21. depends_on:
  22. - web
  23.  
  24. web:
  25. build: .
  26. container_name: tts-app
  27. environment:
  28. - DATABASE=db
  29. - DEBUG=False
  30. - STATICFILES_STORAGE=whitenoise.storage.CompressedManifestStaticFilesStorage
  31. depends_on:
  32. - db
  33. expose:
  34. - "8888"
  35. entrypoint: ./entry_point.sh
  36. command: gunicorn urdu_tts.wsgi:application -w 2 -b :8888
  37. restart: always
  38.  
  39. upstream web {
  40. ip_hash;
  41. server web:8888;
  42. }
  43.  
  44. server {
  45.  
  46. location ^/static/ {
  47. autoindex on;
  48. alias /static/;
  49. }
  50.  
  51. location ~ ^/media/?(.*)$ {
  52. try_files /media/$1 /mediafiles/$1 =404;
  53. }
  54.  
  55. location / {
  56. proxy_pass http://web;
  57. client_max_body_size 20m;
  58. }
  59. listen 8000;
  60. server_name localhost;
  61. }
Add Comment
Please, Sign In to add comment