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
@@ -106,14 +106,18 @@ which uses docker-compose for the web server as well.
106
106
This will not cache dependencies - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
107
107
but makes sure that you're in a known environment so you should have fewer problems getting started.
108
108
109
-
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):
109
+
You'll need to `touch .docker.env` first, this file can have any environment
110
+
variable overrides you want to use in docker containers.
111
+
112
+
You can also use the `cli` container to run builds on systems which don't support running builds directly (mostly on Mac OS or Windows):
113
+
110
114
```sh
111
115
# run a build for a single crate
112
-
docker compose run web build crate regex 1.3.1
116
+
docker compose run --rm cli build crate regex 1.3.1
113
117
# or build essential files
114
-
docker compose run web build add-essential-files
115
-
# rebuild the web container when you changed code.
116
-
docker compose up -d web --build
118
+
docker compose run --rm cli build add-essential-files
119
+
# rebuild containers when you changed code.
120
+
docker compose up --wait --build
117
121
```
118
122
119
123
You can also run other commands like the setup above from within the container:
@@ -142,7 +146,7 @@ Three services are defined:
142
146
143
147
#### Rebuilding Containers
144
148
145
-
To rebuild the site, run `docker compose build`.
149
+
To rebuild the site, run `docker compose --profile all build`.
146
150
Note that docker-compose caches the build even if you change the source code,
147
151
so this will be necessary anytime you make changes.
148
152
@@ -163,7 +167,7 @@ This is probably because you have `git.autocrlf` set to true,
163
167
164
168
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
165
169
166
-
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.
170
+
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 cli build [...]` workaround described above.
167
171
168
172
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details about supporting more platforms directly.
169
173
@@ -191,11 +195,11 @@ cargo run -- start-web-server
191
195
```sh
192
196
# Builds <CRATE_NAME> <CRATE_VERSION> and adds it into database
193
197
# This is the main command to build and add a documentation into docs.rs.
194
-
# For example, `docker compose run web build crate regex 1.1.6`
198
+
# For example, `docker compose run --rm cli build crate regex 1.1.6`
195
199
cargo run -- build crate <CRATE_NAME><CRATE_VERSION>
196
200
197
-
# alternatively, via the web container
198
-
docker compose run web build crate <CRATE_NAME><CRATE_VERSION>
201
+
# alternatively, within docker-compose containers
202
+
docker compose run --rm cli build crate <CRATE_NAME><CRATE_VERSION>
199
203
200
204
# Builds every crate on crates.io and adds them into database
0 commit comments