Skip to content

Commit 4be4672

Browse files
Nemo157jyn514
authored andcommitted
Configure and document how to have download endpoint working locally
1 parent 61f5a4f commit 4be4672

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

.env.sample

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ export DOCSRS_TOOLCHAIN=nightly
88
export AWS_ACCESS_KEY_ID=cratesfyi
99
export AWS_SECRET_ACCESS_KEY=secret_key
1010
export S3_ENDPOINT=http://localhost:9000
11+
export DOCSRS_S3_STATIC_ROOT_PATH=http://localhost:9000/rust-docs-rs
1112
export DOCSRS_INCLUDE_DEFAULT_TARGETS=false
1213
export DOCSRS_DOCKER_IMAGE=ghcr.io/rust-lang/crates-build-env/linux-micro
1314
export SENTRY_ENVIRONMENT=dev

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ docker-compose up -d db s3
6969
# anything that doesn't run via docker-compose needs the settings defined in
7070
# .env. Either via `. ./.env` as below, or via any dotenv shell integration.
7171
. ./.env
72+
# allow downloads from the s3 container to support the /crate/.../download endpoint
73+
mcli policy set download docsrs/rust-docs-rs
7274
# Setup the database you just created
7375
cargo run -- database migrate
7476
# Build a sample crate to make sure it works

0 commit comments

Comments
 (0)