Skip to content

Commit 7b80116

Browse files
jyn514syphar
authored andcommitted
Update the README
- Add FAQ about developing outside of linux - Clean up confusing terminology around docker-compose - Remove outdated link to "developing without docker-compose"
1 parent 8a13ccd commit 7b80116

File tree

1 file changed

+17
-26
lines changed

1 file changed

+17
-26
lines changed

README.md

+17-26
Original file line numberDiff line numberDiff line change
@@ -83,40 +83,25 @@ If you need to store big files in the repository's directory it's recommended to
8383
put them in the `ignored/` subdirectory, which is ignored both by git and
8484
Docker.
8585

86-
### Pure docker-compose
87-
88-
If you have trouble with the above commands, consider using `docker-compose up`,
89-
which uses docker-compose for the web server as well.
90-
This will not cache dependencies as well - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
91-
but makes sure that you're in a known environment so you should have fewer problems getting started.
92-
93-
Please file bugs for any trouble you have running docs.rs!
86+
Running the database and S3 server outside of docker-compose is possible, but not recommended or supported.
87+
Note that you will need docker installed no matter what, since it's used for Rustwide sandboxing.
9488

9589
### Running tests
9690

97-
Tests are only supported via cargo and do not work in docker-compose
98-
9991
```
10092
cargo test
10193
```
10294

103-
Most tests require access to the database. To run them, set the
104-
`CRATESFYI_DATABASE_URL` in `.env` to the url of a PostgreSQL database,
105-
and set the `AWS_ACCESS_KEY_ID`, `S3_ENDPOINT`, and `AWS_SECRET_ACCESS_KEY` variables.
106-
We have some reasonable default parameters in `.env.sample`.
107-
108-
For example, if you are using the `docker-compose` environment to run tests against, you can launch only the database and s3 server like so:
95+
### Pure docker-compose
10996

110-
```console
111-
docker-compose up -d db s3
112-
```
97+
If you have trouble with the above commands, consider using `docker-compose up --build`,
98+
which uses docker-compose for the web server as well.
99+
This will not cache dependencies - in particular, you'll have to rebuild all 400 whenever the lockfile changes -
100+
but makes sure that you're in a known environment so you should have fewer problems getting started.
113101

114-
If you don't want to use docker-compose, see the
115-
[wiki page on developing outside docker-compose][wiki-no-compose]
116-
for more information on how to setup this environment.
117-
Note that either way, you will need docker installed for sandboxing with Rustwide.
102+
Note that running tests is not supported when using pure docker-compose.
118103

119-
[wiki-no-compose]: https://forge.rust-lang.org/docs-rs/no-docker-compose.html
104+
Please file bugs for any trouble you have running docs.rs!
120105

121106
### Docker-Compose
122107

@@ -127,7 +112,7 @@ Three services are defined:
127112
|------|-------------------------------------------------|----------------------------|----------------------------------------|
128113
| web | http://localhost:3000 | N/A | A container running the docs.rs binary |
129114
| db | postgresql://cratesfyi:password@localhost:15432 | - | Postgres database used by web |
130-
| s3 | http://localhost:9000 | `cratesfyi` - `secret_key` | Minio (simulates AWS S3) used by web |
115+
| s3 | http://localhost:9000 | `cratesfyi` - `secret_key` | MinIO (simulates AWS S3) used by web |
131116

132117
[docker-compose.yml]: ./docker-compose.yml
133118

@@ -145,13 +130,19 @@ $ docker-compose down --volumes
145130

146131
#### FAQ
147132

148-
##### I keep getting the error `standard_init_linux.go:211: exec user process caused "no such file or directory"` when I use docker-compose.
133+
##### I see the error `standard_init_linux.go:211: exec user process caused "no such file or directory"` when I use docker-compose.
149134

150135
You probably have [CRLF line endings](https://en.wikipedia.org/wiki/CRLF).
151136
This causes the hashbang in the docker-entrypoint to be `/bin/sh\r` instead of `/bin/sh`.
152137
This is probably because you have `git.autocrlf` set to true,
153138
[set it to `input`](https://stackoverflow.com/questions/10418975) instead.
154139

140+
##### I see the error `/opt/rustwide/cargo-home/bin/cargo: cannot execute binary file: Exec format error` when running builds.
141+
142+
You are most likely not on a Linux platform. Currently, running builds is only supported on `x86_64-unknown-linux-gnu`.
143+
144+
See [rustwide#41](https://github.com/rust-lang/rustwide/issues/41) for more details.
145+
155146
### CLI
156147

157148
See `cargo run -- --help` for a full list of commands.

0 commit comments

Comments
 (0)