@@ -83,40 +83,25 @@ If you need to store big files in the repository's directory it's recommended to
83
83
put them in the ` ignored/ ` subdirectory, which is ignored both by git and
84
84
Docker.
85
85
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.
94
88
95
89
### Running tests
96
90
97
- Tests are only supported via cargo and do not work in docker-compose
98
-
99
91
```
100
92
cargo test
101
93
```
102
94
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
109
96
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.
113
101
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.
118
103
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!
120
105
121
106
### Docker-Compose
122
107
@@ -127,7 +112,7 @@ Three services are defined:
127
112
| ------| -------------------------------------------------| ----------------------------| ----------------------------------------|
128
113
| web | http://localhost:3000 | N/A | A container running the docs.rs binary |
129
114
| 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 |
131
116
132
117
[ docker-compose.yml ] : ./docker-compose.yml
133
118
@@ -145,13 +130,19 @@ $ docker-compose down --volumes
145
130
146
131
#### FAQ
147
132
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.
149
134
150
135
You probably have [ CRLF line endings] ( https://en.wikipedia.org/wiki/CRLF ) .
151
136
This causes the hashbang in the docker-entrypoint to be ` /bin/sh\r ` instead of ` /bin/sh ` .
152
137
This is probably because you have ` git.autocrlf ` set to true,
153
138
[ set it to ` input ` ] ( https://stackoverflow.com/questions/10418975 ) instead.
154
139
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
+
155
146
### CLI
156
147
157
148
See ` cargo run -- --help ` for a full list of commands.
0 commit comments