docker-compose.yml 1.6 KB

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