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
@@ -102,19 +101,26 @@ cargo test
102
101
103
102
### Pure docker-compose
104
103
105
-
If you have trouble with the above commands, consider using `docker-compose up --build`,
104
+
If you have trouble with the above commands, consider using `dockercompose up --build`,
106
105
which uses docker-compose for the web server as well.
107
106
This will not cache dependencies - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
108
107
but makes sure that you're in a known environment so you should have fewer problems getting started.
109
108
110
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):
111
110
```sh
112
111
# run a build for a single crate
113
-
docker-compose run web build crate regex 1.3.1
112
+
dockercompose run web build crate regex 1.3.1
114
113
# or build essential files
115
-
docker-compose run web build add-essential-files
114
+
dockercompose run web build add-essential-files
116
115
# rebuild the web container when you changed code.
117
-
docker-compose build web
116
+
docker compose up -d web --build
117
+
```
118
+
119
+
You can also run other commands like the setup above from within the container:
120
+
121
+
```sh
122
+
docker compose run --rm cli database migrate
123
+
docker compose run --rm cli build update-toolchain
118
124
```
119
125
120
126
Note that running tests is not supported when using pure docker-compose.
@@ -136,14 +142,14 @@ Three services are defined:
136
142
137
143
#### Rebuilding Containers
138
144
139
-
To rebuild the site, run `docker-compose build`.
145
+
To rebuild the site, run `dockercompose build`.
140
146
Note that docker-compose caches the build even if you change the source code,
141
147
so this will be necessary anytime you make changes.
142
148
143
149
If you want to completely clean up the database, don't forget to remove the volumes too:
144
150
145
151
```sh
146
-
$ docker-compose down --volumes
152
+
$ dockercompose down --volumes
147
153
```
148
154
149
155
#### FAQ
@@ -157,7 +163,7 @@ This is probably because you have `git.autocrlf` set to true,
157
163
158
164
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
159
165
160
-
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.
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 `dockercompose run web build [...]` workaround described above.
161
167
162
168
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details about supporting more platforms directly.
163
169
@@ -185,11 +191,11 @@ cargo run -- start-web-server
185
191
```sh
186
192
# Builds <CRATE_NAME> <CRATE_VERSION> and adds it into database
187
193
# This is the main command to build and add a documentation into docs.rs.
188
-
# For example, `docker-compose run web build crate regex 1.1.6`
194
+
# For example, `dockercompose run web build crate regex 1.1.6`
189
195
cargo run -- build crate <CRATE_NAME><CRATE_VERSION>
190
196
191
197
# alternatively, via the web container
192
-
docker-compose run web build crate <CRATE_NAME><CRATE_VERSION>
198
+
dockercompose run web build crate <CRATE_NAME><CRATE_VERSION>
193
199
194
200
# Builds every crate on crates.io and adds them into database
0 commit comments