docker-compose.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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. env_file:
  43. - .env
  44. - db.env
  45. environment:
  46. NODE_ENV: production
  47. TYPEORM_USERNAME: ${DB_USERNAME}
  48. TYPEORM_PASSWORD: ${DB_PASSWORD}
  49. TYPEORM_DATABASE: ${DB_NAME}
  50. ports:
  51. - 3020:3000
  52. db:
  53. image: postgres
  54. restart: unless-stopped
  55. env_file:
  56. - ./db.env
  57. environment:
  58. POSTGRES_PASSWORD: ${DB_PASSWORD}
  59. POSTGRES_USER: ${DB_USERNAME}
  60. volumes:
  61. - db-data:/var/lib/postgresql/data
  62. adminer:
  63. image: adminer
  64. restart: unless-stopped
  65. ports:
  66. - 3030:8080
  67. volumes:
  68. db-data: