docker-compose.yml 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. version: '3.7'
  2. services:
  3. noctbot:
  4. image: noctbot
  5. build:
  6. context: ./
  7. dockerfile: ./bot/Dockerfile
  8. args:
  9. OPENCV_VERSION: 3.4
  10. restart: always
  11. depends_on:
  12. - db
  13. env_file:
  14. - .env
  15. - db.env
  16. environment:
  17. NODE_ENV: production
  18. BOT_TOKEN: ${BOT_TOKEN}
  19. FORUM_PASS: ${FORUM_PASS}
  20. FORUM_API_KEY: ${FORUM_API_KEY}
  21. IGNORE_CHANGED_NEWS: ${IGNORE_CHANGED_NEWS}
  22. NPM_CONFIG_LOGLEVEL: info
  23. TYPEORM_USERNAME: ${DB_USERNAME}
  24. TYPEORM_PASSWORD: ${DB_PASSWORD}
  25. TYPEORM_DATABASE: ${DB_NAME}
  26. web:
  27. image: noctbot_web
  28. build:
  29. context: ./
  30. dockerfile: ./web/Dockerfile
  31. restart: always
  32. depends_on:
  33. - db
  34. env_file:
  35. - .env
  36. - db.env
  37. environment:
  38. NODE_ENV: production
  39. TYPEORM_USERNAME: ${DB_USERNAME}
  40. TYPEORM_PASSWORD: ${DB_PASSWORD}
  41. TYPEORM_DATABASE: ${DB_NAME}
  42. ports:
  43. - 3020:3000
  44. db:
  45. image: postgres
  46. restart: always
  47. env_file:
  48. - ./db.env
  49. environment:
  50. POSTGRES_PASSWORD: ${DB_PASSWORD}
  51. POSTGRES_USER: ${DB_USERNAME}
  52. volumes:
  53. - db-data:/var/lib/postgresql/data
  54. adminer:
  55. image: adminer
  56. restart: always
  57. ports:
  58. - 3030:8080
  59. volumes:
  60. db-data: