You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# anything that doesn't run via docker-compose needs the settings defined in
69
69
# .env. Either via `. ./.env` as below, or via any dotenv shell integration.
70
70
. ./.env
@@ -115,21 +115,32 @@ which uses docker-compose for the web server as well.
115
115
This will not cache dependencies - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
116
116
but makes sure that you're in a known environment so you should have fewer problems getting started.
117
117
118
-
You can also use the `web` container to run builds on systems which don't support running builds directly (mostly on Mac OS or Windows):
118
+
You'll need to `touch .docker.env` first, this file can have any environment
119
+
variable overrides you want to use in docker containers.
120
+
121
+
You can also use the `builder-a` container to run builds on systems which don't support running builds directly (mostly on Mac OS or Windows):
122
+
119
123
```sh
124
+
# update the toolchain
125
+
docker compose run --rm builder-a build update-toolchain
120
126
# run a build for a single crate
121
-
docker compose run web build crate regex 1.3.1
122
-
# or build essential files
123
-
docker compose run web build add-essential-files
124
-
# rebuild the web container when you changed code.
125
-
docker compose up -d web --build
127
+
docker compose run --rm builder-a build crate regex 1.3.1
128
+
# rebuild containers when you changed code.
129
+
docker compose up --wait --build
126
130
```
127
131
128
-
You can also run other commands like the setup abovefrom within the container:
132
+
You can also run other non-build commands like the setup steps above, or queueing crates for the background builders from within the`cli` container:
129
133
130
134
```sh
131
135
docker compose run --rm cli database migrate
132
-
docker compose run --rm cli build update-toolchain
136
+
docker compose run --rm cli queue add regex 1.3.1
137
+
```
138
+
139
+
If the command needs the crates.io-index clone then it must be run from within
140
+
a `registry-watcher` container:
141
+
142
+
```sh
143
+
docker compose run --rm registry-watcher queue set-last-seen-reference --head
133
144
```
134
145
135
146
Note that running tests is not supported when using pure docker-compose.
@@ -151,7 +162,7 @@ Three services are defined:
151
162
152
163
#### Rebuilding Containers
153
164
154
-
To rebuild the site, run `docker compose build`.
165
+
To rebuild the site, run `docker compose --profile all build`.
155
166
Note that docker-compose caches the build even if you change the source code,
156
167
so this will be necessary anytime you make changes.
157
168
@@ -172,7 +183,7 @@ This is probably because you have `git.autocrlf` set to true,
172
183
173
184
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
174
185
175
-
You are most likely not on a Linux platform. Running builds directly is only supported on `x86_64-unknown-linux-gnu`. On other platforms you can use the `docker compose run web build [...]` workaround described above.
186
+
You are most likely not on a Linux platform. Running builds directly is only supported on `x86_64-unknown-linux-gnu`. On other platforms you can use the `docker compose run --rm builder-a build [...]` workaround described above.
176
187
177
188
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details about supporting more platforms directly.
178
189
@@ -200,11 +211,11 @@ cargo run -- start-web-server
200
211
```sh
201
212
# Builds <CRATE_NAME> <CRATE_VERSION> and adds it into database
202
213
# This is the main command to build and add a documentation into docs.rs.
203
-
# For example, `docker compose run web build crate regex 1.1.6`
214
+
# For example, `docker compose run --rm builder-a build crate regex 1.1.6`
204
215
cargo run -- build crate <CRATE_NAME><CRATE_VERSION>
205
216
206
-
# alternatively, via the web container
207
-
docker compose run web build crate <CRATE_NAME><CRATE_VERSION>
217
+
# alternatively, within docker-compose containers
218
+
docker compose run --rm builder-a build crate <CRATE_NAME><CRATE_VERSION>
208
219
209
220
# Builds every crate on crates.io and adds them into database
0 commit comments