docker-compose.yml 1.5 KB

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