docker-compose.yml 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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. ports:
  47. - "9191:80"
  48. environment:
  49. NODE_ENV: production
  50. TYPEORM_USERNAME: ${DB_USERNAME}
  51. TYPEORM_PASSWORD: ${DB_PASSWORD}
  52. TYPEORM_DATABASE: ${DB_NAME}
  53. WEB_DATA_PATH: /web_data
  54. PORT: "80"
  55. volumes:
  56. - web-data:/web_data
  57. db:
  58. image: postgres
  59. restart: unless-stopped
  60. env_file:
  61. - db.env
  62. environment:
  63. POSTGRES_PASSWORD: ${DB_PASSWORD}
  64. POSTGRES_USER: ${DB_USERNAME}
  65. volumes:
  66. - db-data:/var/lib/postgresql/data
  67. adminer:
  68. image: adminer
  69. restart: unless-stopped
  70. ports:
  71. - 3030:8080
  72. volumes:
  73. db-data:
  74. web-data:
  75. caddy-data:
  76. caddy-config: