Skip to content

chore(dev): changes for developer ergonomics #10816

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

Merged
merged 4 commits into from
Feb 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
[run]
branch = True
dynamic_context = test_function

source =
warehouse
Expand Down
2 changes: 1 addition & 1 deletion bin/tests
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,5 @@ set -x

# Actually run our tests.
python -m coverage run -m pytest --strict-markers $COMMAND_ARGS
python -m coverage html
python -m coverage html --show-contexts
python -m coverage report -m --fail-under 100
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ services:
image: elasticsearch:7.10.1
environment:
- xpack.security.enabled=false
- node.name=node-1
- cluster.initial_master_nodes=node-1
- discovery.type=single-node
ulimits:
nofile:
soft: 65536
Expand Down Expand Up @@ -90,7 +89,9 @@ services:
- simple:/var/opt/warehouse/simple
- ./bin:/opt/warehouse/src/bin:z
ports:
- "80:8000"
- "${WEB_PORT:-80}:8000"
depends_on:
- db

files:
build:
Expand Down
12 changes: 12 additions & 0 deletions docs/development/getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,16 @@ If the port is in use, the command will produce output, and you will need to
determine what is occupying the port and shut down the corresponding service.
Otherwise, the port is available for Warehouse to use, and you can continue.

Alternately, you may set the ``WEB_HOST`` environment variable for
docker-compose to use instead. An example:

.. code-block:: console

export WEB_HOST=8080
make ...

# or inline:
WEB_HOST=8080 make ...

Building the Warehouse Container
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Expand Down Expand Up @@ -265,6 +275,8 @@ At this point all the services are up, and web container is listening on port
`this bug report <https://bugzilla.mozilla.org/show_bug.cgi?id=1262842>`_
for more info).

If you've set a different port via the ``WEB_HOST`` environment variable,
use that port instead.

Logging in to Warehouse
^^^^^^^^^^^^^^^^^^^^^^^
Expand Down