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. - 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. caddy:
  35. image: caddy
  36. depends_on:
  37. - web
  38. ports:
  39. - "443:443"
  40. - "80:80"
  41. environment:
  42. DOMAINS: "${WEB_DOMAIN}:443"
  43. volumes:
  44. - caddy-data:/data
  45. - caddy-config:/config
  46. - ./web_config/Caddyfile:/etc/caddy/Caddyfile
  47. web:
  48. image: noctbot_web
  49. build:
  50. context: ./
  51. dockerfile: ./web/Dockerfile
  52. restart: unless-stopped
  53. depends_on:
  54. - db
  55. - noctbot
  56. env_file:
  57. - .env
  58. - db.env
  59. environment:
  60. NODE_ENV: production
  61. TYPEORM_USERNAME: ${DB_USERNAME}
  62. TYPEORM_PASSWORD: ${DB_PASSWORD}
  63. TYPEORM_DATABASE: ${DB_NAME}
  64. WEB_DATA_PATH: /web_data
  65. PORT: "80"
  66. volumes:
  67. - web-data:/web_data
  68. db:
  69. image: postgres
  70. restart: unless-stopped
  71. env_file:
  72. - db.env
  73. environment:
  74. POSTGRES_PASSWORD: ${DB_PASSWORD}
  75. POSTGRES_USER: ${DB_USERNAME}
  76. volumes:
  77. - db-data:/var/lib/postgresql/data
  78. adminer:
  79. image: adminer
  80. restart: unless-stopped
  81. ports:
  82. - 3030:8080
  83. volumes:
  84. db-data:
  85. web-data:
  86. caddy-data:
  87. caddy-config: