docker-compose.yml 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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: on-failure
  11. depends_on:
  12. - db
  13. env_file:
  14. - .env
  15. - db.env
  16. environment:
  17. NODE_ENV: production
  18. BOT_TOKEN: ${BOT_TOKEN}
  19. FORUM_PASS: ${FORUM_PASS}
  20. FORUM_API_KEY: ${FORUM_API_KEY}
  21. IGNORE_CHANGED_NEWS: ${IGNORE_CHANGED_NEWS}
  22. NPM_CONFIG_LOGLEVEL: info
  23. TYPEORM_USERNAME: ${DB_USERNAME}
  24. TYPEORM_PASSWORD: ${DB_PASSWORD}
  25. TYPEORM_DATABASE: ${DB_NAME}
  26. ports:
  27. - 3000:3000
  28. web:
  29. image: noctbot_web
  30. build:
  31. context: ./
  32. dockerfile: ./web/Dockerfile
  33. restart: on-failure
  34. depends_on:
  35. - db
  36. env_file:
  37. - .env
  38. - db.env
  39. environment:
  40. NODE_ENV: production
  41. TYPEORM_USERNAME: ${DB_USERNAME}
  42. TYPEORM_PASSWORD: ${DB_PASSWORD}
  43. TYPEORM_DATABASE: ${DB_NAME}
  44. ports:
  45. - 8181:3000
  46. db:
  47. image: postgres
  48. restart: always
  49. env_file:
  50. - ./db.env
  51. environment:
  52. POSTGRES_PASSWORD: ${DB_PASSWORD}
  53. POSTGRES_USER: ${DB_USERNAME}
  54. volumes:
  55. - ./data/db:/var/lib/postgresql/data
  56. ports:
  57. - 5432:5432
  58. adminer:
  59. image: adminer
  60. restart: always
  61. ports:
  62. - 3080:8080