docker-compose.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. db:
  52. image: postgres
  53. restart: unless-stopped
  54. env_file:
  55. - db.env
  56. environment:
  57. POSTGRES_PASSWORD: ${DB_PASSWORD}
  58. POSTGRES_USER: ${DB_USERNAME}
  59. volumes:
  60. - db-data:/var/lib/postgresql/data
  61. adminer:
  62. image: adminer
  63. restart: unless-stopped
  64. ports:
  65. - 3030:8080
  66. volumes:
  67. db-data: