docker-compose.yml 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. - mongo
  12. - facedetect
  13. env_file:
  14. - .env
  15. - db.env
  16. volumes:
  17. - ./bot/stickers:/app/bot/stickers
  18. environment:
  19. NODE_ENV: production
  20. BOT_TOKEN: ${BOT_TOKEN}
  21. FORUM_PASS: ${FORUM_PASS}
  22. FORUM_API_KEY: ${FORUM_API_KEY}
  23. IGNORE_CHANGED_NEWS: ${IGNORE_CHANGED_NEWS}
  24. NPM_CONFIG_LOGLEVEL: info
  25. TYPEORM_USERNAME: ${DB_USERNAME}
  26. TYPEORM_PASSWORD: ${DB_PASSWORD}
  27. TYPEORM_DATABASE: ${DB_NAME}
  28. FACEDETECT_URL: facedetect
  29. facedetect:
  30. image: facedetect
  31. build:
  32. context: ./
  33. dockerfile: ./facedetect/Dockerfile
  34. restart: unless-stopped
  35. web:
  36. image: noctbot_web
  37. build:
  38. context: ./
  39. dockerfile: ./web/Dockerfile
  40. restart: unless-stopped
  41. depends_on:
  42. - db
  43. - mongo
  44. - noctbot
  45. env_file:
  46. - .env
  47. - db.env
  48. ports:
  49. - "9191:80"
  50. environment:
  51. NODE_ENV: production
  52. TYPEORM_USERNAME: ${DB_USERNAME}
  53. TYPEORM_PASSWORD: ${DB_PASSWORD}
  54. TYPEORM_DATABASE: ${DB_NAME}
  55. WEB_DATA_PATH: /web_data
  56. PORT: "80"
  57. volumes:
  58. - web-data:/web_data
  59. db:
  60. image: postgres
  61. restart: unless-stopped
  62. env_file:
  63. - db.env
  64. environment:
  65. POSTGRES_PASSWORD: ${DB_PASSWORD}
  66. POSTGRES_USER: ${DB_USERNAME}
  67. volumes:
  68. - db-data:/var/lib/postgresql/data
  69. adminer:
  70. image: adminer
  71. restart: unless-stopped
  72. ports:
  73. - 3030:8080
  74. mongo:
  75. image: mongo
  76. restart: unless-stopped
  77. environment:
  78. MONGO_INITDB_ROOT_USERNAME: ${MONGO_DB_USERNAME}
  79. MONGO_INITDB_ROOT_PASSWORD: ${MONGO_DB_PASSWORD}
  80. volumes:
  81. - mongo-data:/data/db
  82. volumes:
  83. db-data:
  84. mongo-data:
  85. web-data:
  86. caddy-data:
  87. caddy-config: