docker-compose.yml 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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. - db.env
  14. volumes:
  15. - ./bot/stickers:/app/bot/stickers
  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. FACEDETECT_URL: facedetect
  27. facedetect:
  28. image: facedetect
  29. build:
  30. context: ./
  31. dockerfile: ./facedetect/Dockerfile
  32. restart: unless-stopped
  33. web:
  34. image: noctbot_web
  35. build:
  36. context: ./
  37. dockerfile: ./web/Dockerfile
  38. restart: unless-stopped
  39. depends_on:
  40. - db
  41. - noctbot
  42. env_file:
  43. - db.env
  44. environment:
  45. NODE_ENV: production
  46. TYPEORM_USERNAME: ${DB_USERNAME}
  47. TYPEORM_PASSWORD: ${DB_PASSWORD}
  48. TYPEORM_DATABASE: ${DB_NAME}
  49. ports:
  50. - 3020:3000
  51. volumes:
  52. - web-data:/web_data
  53. db:
  54. image: postgres
  55. restart: unless-stopped
  56. env_file:
  57. - db.env
  58. environment:
  59. POSTGRES_PASSWORD: ${DB_PASSWORD}
  60. POSTGRES_USER: ${DB_USERNAME}
  61. volumes:
  62. - db-data:/var/lib/postgresql/data
  63. adminer:
  64. image: adminer
  65. restart: unless-stopped
  66. ports:
  67. - 3030:8080
  68. volumes:
  69. db-data:
  70. web-data: