Skip to content

Commit fa1981f

Browse files
committed
update docker-compose config so rustwide & prefix are on the same filesystem
1 parent c559add commit fa1981f

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

docker-compose.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,21 @@ services:
1414
expose: ["3000"]
1515
volumes:
1616
- "/var/run/docker.sock:/var/run/docker.sock"
17-
- ".rustwide-docker:/opt/docsrs/rustwide"
18-
- "cratesio-index:/opt/docsrs/prefix/crates.io-index"
19-
- "artifact-cache:/opt/docsrs/prefix/artifact_cache"
17+
# we only need one of the two mappings here.
18+
# this will link to your local filesystem, which makes build debugging
19+
# easier
20+
- "./ignored/opt-docsrs:/opt/docsrs_ext/"
21+
# this uses a docker volume and will be faster, but you need to
22+
# log into the container to debug its contents
23+
# - "prefix-ext:/opt/docsrs_ext/"
2024
environment:
21-
DOCSRS_RUSTWIDE_WORKSPACE: /opt/docsrs/rustwide
25+
DOCSRS_RUSTWIDE_WORKSPACE: /opt/docsrs_ext/rustwide
26+
DOCSRS_PREFIX: /opt/docsrs_ext/prefix
2227
DOCSRS_DATABASE_URL: postgresql://cratesfyi:password@db
2328
DOCSRS_STORAGE_BACKEND: s3
2429
S3_ENDPOINT: http://s3:9000
2530
AWS_ACCESS_KEY_ID: cratesfyi
2631
AWS_SECRET_ACCESS_KEY: secret_key
27-
DOCSRS_PREFIX: /opt/docsrs/prefix
2832
env_file:
2933
- .env
3034
healthcheck:
@@ -95,5 +99,4 @@ services:
9599
volumes:
96100
postgres-data: {}
97101
minio-data: {}
98-
cratesio-index: {}
99-
artifact-cache: {}
102+
prefix-ext: {}

dockerfiles/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -euv
44

5-
export DOCSRS_PREFIX=/opt/docsrs/prefix
5+
export DOCSRS_PREFIX=${DOCSRS_PREFIX:-"/opt/docsrs/prefix"}
66
export DOCSRS_DOCKER=true
77
export DOCSRS_LOG=${DOCSRS_LOG-"docs-rs,rustwide=info"}
88
export PATH="$PATH:/build/target/release"

0 commit comments

Comments
 (0)