Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for environment variables. #61

Open
lotyp opened this issue May 1, 2024 · 1 comment
Open

Add support for environment variables. #61

lotyp opened this issue May 1, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@lotyp
Copy link
Member

lotyp commented May 1, 2024

It would be good to have ability to use TRAP_* env variables to configure /vendor/bin/trap

For example:

TRAP_SENDERS=console,server
TRAP_DEBUG_PORTS=9912,xxxx,yyyy
TRAP_UI_PORT=8000

Which would simplify usage in docker, here is current example:

  trap:
    image: wayofdev/php-dev:8.3-cli-alpine-latest
    container_name: ${COMPOSE_PROJECT_NAME}-trap
    restart: on-failure
    networks:
      - default
    ports:
      - '${TRAP_PORT:-9912}:9912'
      - '${TRAP_UI_PORT:-8000}:8000'
    volumes:
      - ./:/app:rw
      - ~/.composer:/.composer
    env_file:
      - .env
    entrypoint:
      - /app/vendor/bin/trap
      - --ui
      - --port=${TRAP_PORT:-9912}
      - --sender=server
      - --sender=console

Also, currently, there is no way to customize UI port number. 8000 port is used by many other applications, and it would be nice, to be able to customize it via console command attributes and also via ENV variables.

@roxblnfk roxblnfk self-assigned this May 1, 2024
@roxblnfk roxblnfk added the enhancement New feature or request label May 1, 2024
@roxblnfk
Copy link
Member

roxblnfk commented May 1, 2024

TRAP_TCP_PORTS and TRAP_UI_PORT are implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants