Advertisement
a_igin

compose

Aug 24th, 2020
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.22 KB | None | 0 0
  1. version: '2'
  2.  
  3. services:
  4. db:
  5. restart: always
  6. image: postgres:latest
  7. ports:
  8. - "${POSTGRES_OUT_PORT}:5432"
  9. expose:
  10. - '${POSTGRES_OUT_PORT}'
  11. volumes:
  12. - pgdata:/var/lib/postgresql/data/
  13. env_file:
  14. - .env
  15. networks:
  16. - main
  17. web:
  18. restart: always
  19. build: .
  20. expose:
  21. - "${WEB_PORT}"
  22. volumes:
  23. - web-static:/srv/static/
  24. - web-media:/srv/media/
  25. - ./:/app
  26. ports:
  27. - "${WEB_PORT}:8000"
  28. env_file:
  29. - .env
  30. command: /usr/local/bin/gunicorn get_coffee.wsgi:application -w 2 -b :8000
  31. depends_on:
  32. - db
  33. networks:
  34. - main
  35. nginx:
  36. restart: always
  37. build: ./config/nginx/
  38. volumes:
  39. - web-static:/srv/static/
  40. - web-media:/srv/media/
  41. env_file:
  42. - .env
  43. depends_on:
  44. - web
  45. networks:
  46. - main
  47. redis_worker:
  48. image: "redis:alpine"
  49. ports:
  50. - "${REDIS_PORT}:6378"
  51. expose:
  52. - '${REDIS_PORT}'
  53. volumes:
  54. - /redis-data:/var/lib/redis
  55. - /redis.conf:/usr/local/etc/redis/redis.conf
  56. networks:
  57. - main
  58. env_file:
  59. - .env
  60. volumes:
  61. web-static:
  62. web-media:
  63. pgdata:
  64.  
  65. networks:
  66. main:
  67.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement