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
70
69
# .env. Either via `. ./.env` as below, or via any dotenv shell integration.
71
70
. ./.env
@@ -111,19 +110,26 @@ can take a look at its documentation [here](https://github.com/GuillaumeGomez/br
111
110
112
111
### Pure docker-compose
113
112
114
-
If you have trouble with the above commands, consider using `docker-compose up --build`,
113
+
If you have trouble with the above commands, consider using `dockercompose up --build`,
115
114
which uses docker-compose for the web server as well.
116
115
This will not cache dependencies - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
117
116
but makes sure that you're in a known environment so you should have fewer problems getting started.
118
117
119
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):
120
119
```sh
121
120
# run a build for a single crate
122
-
docker-compose run web build crate regex 1.3.1
121
+
dockercompose run web build crate regex 1.3.1
123
122
# or build essential files
124
-
docker-compose run web build add-essential-files
123
+
dockercompose run web build add-essential-files
125
124
# rebuild the web container when you changed code.
126
-
docker-compose build web
125
+
docker compose up -d web --build
126
+
```
127
+
128
+
You can also run other commands like the setup above from within the container:
129
+
130
+
```sh
131
+
docker compose run --rm cli database migrate
132
+
docker compose run --rm cli build update-toolchain
127
133
```
128
134
129
135
Note that running tests is not supported when using pure docker-compose.
@@ -145,14 +151,14 @@ Three services are defined:
145
151
146
152
#### Rebuilding Containers
147
153
148
-
To rebuild the site, run `docker-compose build`.
154
+
To rebuild the site, run `dockercompose build`.
149
155
Note that docker-compose caches the build even if you change the source code,
150
156
so this will be necessary anytime you make changes.
151
157
152
158
If you want to completely clean up the database, don't forget to remove the volumes too:
153
159
154
160
```sh
155
-
$ docker-compose down --volumes
161
+
$ dockercompose down --volumes
156
162
```
157
163
158
164
#### FAQ
@@ -166,7 +172,7 @@ This is probably because you have `git.autocrlf` set to true,
166
172
167
173
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
168
174
169
-
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.
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 `dockercompose run web build [...]` workaround described above.
170
176
171
177
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details about supporting more platforms directly.
172
178
@@ -194,11 +200,11 @@ cargo run -- start-web-server
194
200
```sh
195
201
# Builds <CRATE_NAME> <CRATE_VERSION> and adds it into database
196
202
# This is the main command to build and add a documentation into docs.rs.
197
-
# For example, `docker-compose run web build crate regex 1.1.6`
203
+
# For example, `dockercompose run web build crate regex 1.1.6`
198
204
cargo run -- build crate <CRATE_NAME><CRATE_VERSION>
199
205
200
206
# alternatively, via the web container
201
-
docker-compose run web build crate <CRATE_NAME><CRATE_VERSION>
207
+
dockercompose run web build crate <CRATE_NAME><CRATE_VERSION>
202
208
203
209
# Builds every crate on crates.io and adds them into database
0 commit comments