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
75
75
# .env. Either via `. ./.env` as below, or via any dotenv shell integration.
76
76
. ./.env
@@ -133,21 +133,32 @@ which uses docker-compose for the web server as well.
133
133
This will not cache dependencies - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
134
134
but makes sure that you're in a known environment so you should have fewer problems getting started.
135
135
136
-
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):
136
+
You'll need to `touch .docker.env` first, this file can have any environment
137
+
variable overrides you want to use in docker containers.
138
+
139
+
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):
140
+
137
141
```sh
142
+
# update the toolchain
143
+
docker compose run --rm builder-a build update-toolchain
138
144
# run a build for a single crate
139
-
docker compose run web build crate regex 1.3.1
140
-
# or build essential files
141
-
docker compose run web build add-essential-files
142
-
# rebuild the web container when you changed code.
143
-
docker compose up -d web --build
145
+
docker compose run --rm builder-a build crate regex 1.3.1
146
+
# rebuild containers when you changed code.
147
+
docker compose up --wait --build
144
148
```
145
149
146
-
You can also run other commands like the setup abovefrom within the container:
150
+
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:
147
151
148
152
```sh
149
153
docker compose run --rm cli database migrate
150
-
docker compose run --rm cli build update-toolchain
154
+
docker compose run --rm cli queue add regex 1.3.1
155
+
```
156
+
157
+
If the command needs the crates.io-index clone then it must be run from within
158
+
a `registry-watcher` container:
159
+
160
+
```sh
161
+
docker compose run --rm registry-watcher queue set-last-seen-reference --head
151
162
```
152
163
153
164
Note that running tests is not supported when using pure docker-compose.
@@ -169,7 +180,7 @@ Three services are defined:
169
180
170
181
#### Rebuilding Containers
171
182
172
-
To rebuild the site, run `docker compose build`.
183
+
To rebuild the site, run `docker compose --profile all build`.
173
184
Note that docker-compose caches the build even if you change the source code,
174
185
so this will be necessary anytime you make changes.
175
186
@@ -190,7 +201,7 @@ This is probably because you have `git.autocrlf` set to true,
190
201
191
202
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
192
203
193
-
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.
204
+
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.
194
205
195
206
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details about supporting more platforms directly.
196
207
@@ -218,11 +229,11 @@ cargo run -- start-web-server
218
229
```sh
219
230
# Builds <CRATE_NAME> <CRATE_VERSION> and adds it into database
220
231
# This is the main command to build and add a documentation into docs.rs.
221
-
# For example, `docker compose run web build crate regex 1.1.6`
232
+
# For example, `docker compose run --rm builder-a build crate regex 1.1.6`
222
233
cargo run -- build crate <CRATE_NAME><CRATE_VERSION>
223
234
224
-
# alternatively, via the web container
225
-
docker compose run web build crate <CRATE_NAME><CRATE_VERSION>
235
+
# alternatively, within docker-compose containers
236
+
docker compose run --rm builder-a build crate <CRATE_NAME><CRATE_VERSION>
226
237
227
238
# Builds every crate on crates.io and adds them into database
0 commit comments