docker-compose.dev.yml 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. version: '3'
  2. services:
  3. nginx:
  4. container_name: infisical-dev-nginx
  5. image: nginx
  6. restart: always
  7. ports:
  8. - 8080:80
  9. volumes:
  10. - ./nginx/default.dev.conf:/etc/nginx/conf.d/default.conf:ro
  11. depends_on:
  12. - frontend
  13. - backend
  14. networks:
  15. - infisical-dev
  16. backend:
  17. container_name: infisical-dev-backend
  18. restart: unless-stopped
  19. depends_on:
  20. - mongo
  21. - smtp-server
  22. - redis
  23. build:
  24. context: ./backend
  25. dockerfile: Dockerfile
  26. volumes:
  27. - ./backend/src:/app/src
  28. - ./backend/nodemon.json:/app/nodemon.json
  29. - /app/node_modules
  30. - ./backend/api-documentation.json:/app/api-documentation.json
  31. - ./backend/swagger.ts:/app/swagger.ts
  32. command: npm run dev
  33. env_file: .env
  34. environment:
  35. - NODE_ENV=development
  36. - MONGO_URL=mongodb://root:example@mongo:27017/?authSource=admin
  37. networks:
  38. - infisical-dev
  39. extra_hosts:
  40. - "host.docker.internal:host-gateway"
  41. frontend:
  42. container_name: infisical-dev-frontend
  43. restart: unless-stopped
  44. depends_on:
  45. - backend
  46. build:
  47. context: ./frontend
  48. dockerfile: Dockerfile.dev
  49. volumes:
  50. - ./frontend/src:/app/src/ # mounted whole src to avoid missing reload on new files
  51. - ./frontend/public:/app/public
  52. env_file: .env
  53. environment:
  54. - NEXT_PUBLIC_ENV=development
  55. - INFISICAL_TELEMETRY_ENABLED=${TELEMETRY_ENABLED}
  56. networks:
  57. - infisical-dev
  58. mongo-express:
  59. container_name: infisical-dev-mongo-express
  60. image: mongo-express
  61. restart: always
  62. depends_on:
  63. - mongo
  64. env_file: .env
  65. environment:
  66. - ME_CONFIG_MONGODB_ADMINUSERNAME=root
  67. - ME_CONFIG_MONGODB_ADMINPASSWORD=example
  68. - ME_CONFIG_MONGODB_URL=mongodb://root:example@mongo:27017/
  69. ports:
  70. - 8081:8081
  71. networks:
  72. - infisical-dev
  73. smtp-server:
  74. container_name: infisical-dev-smtp-server
  75. image: lytrax/mailhog:latest # https://github.com/mailhog/MailHog/issues/353#issuecomment-821137362
  76. restart: always
  77. logging:
  78. driver: 'none' # disable saving logs
  79. ports:
  80. - 1025:1025 # SMTP server
  81. - 8025:8025 # Web UI
  82. networks:
  83. - infisical-dev
  84. volumes:
  85. mongo-data:
  86. driver: local
  87. redis_data:
  88. driver: local
  89. networks:
  90. infisical-dev: