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,25 @@ 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
133
137
```
134
138
135
139
Note that running tests is not supported when using pure docker-compose.
@@ -151,7 +155,7 @@ Three services are defined:
151
155
152
156
#### Rebuilding Containers
153
157
154
-
To rebuild the site, run `docker compose build`.
158
+
To rebuild the site, run `docker compose --profile all build`.
155
159
Note that docker-compose caches the build even if you change the source code,
156
160
so this will be necessary anytime you make changes.
157
161
@@ -172,7 +176,7 @@ This is probably because you have `git.autocrlf` set to true,
172
176
173
177
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
174
178
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.
179
+
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
180
177
181
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details about supporting more platforms directly.
178
182
@@ -200,11 +204,11 @@ cargo run -- start-web-server
200
204
```sh
201
205
# Builds <CRATE_NAME> <CRATE_VERSION> and adds it into database
202
206
# 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`
207
+
# For example, `docker compose run --rm builder-a build crate regex 1.1.6`
204
208
cargo run -- build crate <CRATE_NAME><CRATE_VERSION>
205
209
206
-
# alternatively, via the web container
207
-
docker compose run web build crate <CRATE_NAME><CRATE_VERSION>
210
+
# alternatively, within docker-compose containers
211
+
docker compose run --rm builder-a build crate <CRATE_NAME><CRATE_VERSION>
208
212
209
213
# Builds every crate on crates.io and adds them into database
0 commit comments