version: '3' services: nginx: container_name: infisical-dev-nginx image: nginx restart: always ports: - 8080:80 volumes: - ./nginx/default.dev.conf:/etc/nginx/conf.d/default.conf:ro depends_on: - frontend - backend networks: - infisical-dev backend: container_name: infisical-dev-backend restart: unless-stopped depends_on: - mongo - smtp-server - redis build: context: ./backend dockerfile: Dockerfile volumes: - ./backend/src:/app/src - ./backend/nodemon.json:/app/nodemon.json - /app/node_modules - ./backend/api-documentation.json:/app/api-documentation.json - ./backend/swagger.ts:/app/swagger.ts command: npm run dev env_file: .env environment: - NODE_ENV=development - MONGO_URL=mongodb://root:example@mongo:27017/?authSource=admin networks: - infisical-dev extra_hosts: - "host.docker.internal:host-gateway" frontend: container_name: infisical-dev-frontend restart: unless-stopped depends_on: - backend build: context: ./frontend dockerfile: Dockerfile.dev volumes: - ./frontend/src:/app/src/ # mounted whole src to avoid missing reload on new files - ./frontend/public:/app/public env_file: .env environment: - NEXT_PUBLIC_ENV=development - INFISICAL_TELEMETRY_ENABLED=${TELEMETRY_ENABLED} networks: - infisical-dev mongo-express: container_name: infisical-dev-mongo-express image: mongo-express restart: always depends_on: - mongo env_file: .env environment: - ME_CONFIG_MONGODB_ADMINUSERNAME=root - ME_CONFIG_MONGODB_ADMINPASSWORD=example - ME_CONFIG_MONGODB_URL=mongodb://root:example@mongo:27017/ ports: - 8081:8081 networks: - infisical-dev smtp-server: container_name: infisical-dev-smtp-server image: lytrax/mailhog:latest # https://github.com/mailhog/MailHog/issues/353#issuecomment-821137362 restart: always logging: driver: 'none' # disable saving logs ports: - 1025:1025 # SMTP server - 8025:8025 # Web UI networks: - infisical-dev volumes: mongo-data: driver: local redis_data: driver: local networks: infisical-dev: