docker-compose.yml 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  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. SECURE: "TRUE"
  58. volumes:
  59. - web-data:/web_data
  60. db:
  61. image: postgres:12
  62. restart: unless-stopped
  63. env_file:
  64. - db.env
  65. environment:
  66. POSTGRES_PASSWORD: ${DB_PASSWORD}
  67. POSTGRES_USER: ${DB_USERNAME}
  68. volumes:
  69. - db-data:/var/lib/postgresql/data
  70. adminer:
  71. image: adminer
  72. restart: unless-stopped
  73. ports:
  74. - 3030:8080
  75. mongo:
  76. image: mongo
  77. restart: unless-stopped
  78. environment:
  79. MONGO_INITDB_ROOT_USERNAME: ${MONGO_DB_USERNAME}
  80. MONGO_INITDB_ROOT_PASSWORD: ${MONGO_DB_PASSWORD}
  81. volumes:
  82. - mongo-data:/data/db
  83. volumes:
  84. db-data:
  85. mongo-data:
  86. web-data:
  87. caddy-data:
  88. caddy-config: