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