docker-compose.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. version: '3.7'
  2. services:
  3. noctbot:
  4. image: noctbot
  5. build:
  6. context: ./
  7. dockerfile: ./bot/Dockerfile
  8. args:
  9. OPENCV_VERSION: 3.4
  10. restart_policy:
  11. condition: any
  12. delay: 5s
  13. window: 120s
  14. depends_on:
  15. - db
  16. env_file:
  17. - .env
  18. - db.env
  19. environment:
  20. NODE_ENV: production
  21. BOT_TOKEN: ${BOT_TOKEN}
  22. FORUM_PASS: ${FORUM_PASS}
  23. FORUM_API_KEY: ${FORUM_API_KEY}
  24. IGNORE_CHANGED_NEWS: ${IGNORE_CHANGED_NEWS}
  25. NPM_CONFIG_LOGLEVEL: info
  26. TYPEORM_USERNAME: ${DB_USERNAME}
  27. TYPEORM_PASSWORD: ${DB_PASSWORD}
  28. TYPEORM_DATABASE: ${DB_NAME}
  29. ports:
  30. - 3010:3000
  31. web:
  32. image: noctbot_web
  33. build:
  34. context: ./
  35. dockerfile: ./web/Dockerfile
  36. restart_policy:
  37. condition: any
  38. delay: 5s
  39. window: 120s
  40. depends_on:
  41. - db
  42. env_file:
  43. - .env
  44. - db.env
  45. environment:
  46. NODE_ENV: production
  47. TYPEORM_USERNAME: ${DB_USERNAME}
  48. TYPEORM_PASSWORD: ${DB_PASSWORD}
  49. TYPEORM_DATABASE: ${DB_NAME}
  50. ports:
  51. - 3020:3000
  52. db:
  53. image: postgres
  54. restart: always
  55. env_file:
  56. - ./db.env
  57. environment:
  58. POSTGRES_PASSWORD: ${DB_PASSWORD}
  59. POSTGRES_USER: ${DB_USERNAME}
  60. volumes:
  61. - ./data/db:/var/lib/postgresql/data
  62. ports:
  63. - 5432:5432
  64. adminer:
  65. image: adminer
  66. restart: always
  67. ports:
  68. - 3030:8080