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