Advertisement
Guest User

Untitled

a guest
Dec 1st, 2021
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.25 KB | None | 0 0
  1. version: '3.8'
  2. services:
  3. db:
  4. restart: unless-stopped
  5. image: postgres:12.0-alpine
  6. environment:
  7. - POSTGRES_USER=postgre
  8. - POSTGRES_PASSWORD=postgre
  9. - POSTGRES_DB=rabotov_back
  10. volumes:
  11. - postgres_data:/var/lib/postgresql/data/
  12. networks:
  13. - app_network
  14. ports:
  15. - 5432:5432
  16.  
  17. web:
  18. build:
  19. context: ./
  20. dockerfile: Dockerfile
  21. args:
  22. DATABASE_NAME: ${DATABASE_USER}
  23. DATABASE_USER: ${DATABASE_PASSWORD}
  24. DATABASE_PASSWORD: ${DATABASE_NAME}
  25. DATABASE_HOST: ${DATABASE_HOST}
  26. DATABASE_PORT: ${DATABASE_PORT}
  27. command: gunicorn easywork.wsgi:application --bind 0.0.0.0:8000
  28. expose:
  29. - 8000
  30. depends_on:
  31. - db
  32. networks:
  33. - app_network
  34. - server
  35. volumes:
  36. - static:/usr/src/app/static
  37. - media:/usr/src/app/media
  38.  
  39. nginx:
  40. restart: unless-stopped
  41. container_name: rabotov_back
  42. build: .nginx
  43. volumes:
  44. - static:/app/static
  45. - media:/app/media
  46. depends_on:
  47. - web
  48. networks:
  49. - app_network
  50. - server
  51.  
  52.  
  53. networks:
  54. app_network:
  55. driver: bridge
  56. server:
  57. external: true
  58.  
  59. volumes:
  60. postgres_data:
  61. static:
  62. media:
  63.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement