Skip to content

Commit

Permalink
Support port or ASSISTANT__PORT env vars (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
markwaddle authored Oct 6, 2024
1 parent 493f478 commit 3661dad
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion tools/docker/Dockerfile.assistant
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ ENV PATH=/packages/assistants/assistant/.venv/bin:$PATH
COPY ./tools/docker/docker-entrypoint.sh /scripts/docker-entrypoint.sh
RUN chmod +x /scripts/docker-entrypoint.sh

ENV port=3001
ENV ASSISTANT_APP=${app}
ENV ASSISTANT__HOST=0.0.0.0
ENV ASSISTANT__PORT=3000
ENV ASSISTANT__PORT=${port}

SHELL ["/bin/bash", "-c"]
ENTRYPOINT ["/scripts/docker-entrypoint.sh"]
Expand Down
6 changes: 2 additions & 4 deletions tools/makefiles/python.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
this_dir = $(patsubst %/,%,$(dir $(realpath $(lastword $(MAKEFILE_LIST)))))
include $(this_dir)/shell.mk

.DEFAULT_GOAL ?= install

Expand Down Expand Up @@ -31,11 +32,8 @@ lint:
format:
uvx ruff format .

ifneq ($(findstring pytest,$(shell uv tree --depth 1)),)
ifneq ($(findstring pytest,$(if $(shell command -v uv $(null_stderr)),$(shell uv tree --depth 1),)),)
.PHONY: test
test:
uv run pytest $(PYTEST_ARGS)
endif


include $(this_dir)/shell.mk
1 change: 0 additions & 1 deletion tools/makefiles/shell.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,3 @@ touch = type nul >> $(call fix_path,$(1)) && copy /y /b $(call fix_path,$(1))+,,
true_expression = VER>NUL
null_stderr = 2>NUL
endif

0 comments on commit 3661dad

Please sign in to comment.