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
76
75
# .env. Either via `. ./.env` as below, or via any dotenv shell integration.
77
76
. ./.env
@@ -129,19 +128,26 @@ npm install browser-ui-test
129
128
130
129
### Pure docker-compose
131
130
132
-
If you have trouble with the above commands, consider using `docker-compose up --build`,
131
+
If you have trouble with the above commands, consider using `dockercompose up --build`,
133
132
which uses docker-compose for the web server as well.
134
133
This will not cache dependencies - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
135
134
but makes sure that you're in a known environment so you should have fewer problems getting started.
136
135
137
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):
138
137
```sh
139
138
# run a build for a single crate
140
-
docker-compose run web build crate regex 1.3.1
139
+
dockercompose run web build crate regex 1.3.1
141
140
# or build essential files
142
-
docker-compose run web build add-essential-files
141
+
dockercompose run web build add-essential-files
143
142
# rebuild the web container when you changed code.
144
-
docker-compose build web
143
+
docker compose up -d web --build
144
+
```
145
+
146
+
You can also run other commands like the setup above from within the container:
147
+
148
+
```sh
149
+
docker compose run --rm cli database migrate
150
+
docker compose run --rm cli build update-toolchain
145
151
```
146
152
147
153
Note that running tests is not supported when using pure docker-compose.
@@ -163,14 +169,14 @@ Three services are defined:
163
169
164
170
#### Rebuilding Containers
165
171
166
-
To rebuild the site, run `docker-compose build`.
172
+
To rebuild the site, run `dockercompose build`.
167
173
Note that docker-compose caches the build even if you change the source code,
168
174
so this will be necessary anytime you make changes.
169
175
170
176
If you want to completely clean up the database, don't forget to remove the volumes too:
171
177
172
178
```sh
173
-
$ docker-compose down --volumes
179
+
$ dockercompose down --volumes
174
180
```
175
181
176
182
#### FAQ
@@ -184,7 +190,7 @@ This is probably because you have `git.autocrlf` set to true,
184
190
185
191
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
186
192
187
-
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.
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 `dockercompose run web build [...]` workaround described above.
188
194
189
195
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details about supporting more platforms directly.
190
196
@@ -212,11 +218,11 @@ cargo run -- start-web-server
212
218
```sh
213
219
# Builds <CRATE_NAME> <CRATE_VERSION> and adds it into database
214
220
# This is the main command to build and add a documentation into docs.rs.
215
-
# For example, `docker-compose run web build crate regex 1.1.6`
221
+
# For example, `dockercompose run web build crate regex 1.1.6`
216
222
cargo run -- build crate <CRATE_NAME><CRATE_VERSION>
217
223
218
224
# alternatively, via the web container
219
-
docker-compose run web build crate <CRATE_NAME><CRATE_VERSION>
225
+
dockercompose run web build crate <CRATE_NAME><CRATE_VERSION>
220
226
221
227
# Builds every crate on crates.io and adds them into database
0 commit comments