@@ -46,14 +46,19 @@ See below for detailed information on building & contributing to telescope.
46
46
to register a new GitHub OAuth application or get a new client secret.
47
47
You will also have to create a discord OAuth app and bot token. Instructions
48
48
can be found in `config_example.toml`.
49
+
50
+ You must make sure that some of the items in the `.env` file match.
51
+ For example, the database password in `POSTGRES_PASSWORD` needs to be the
52
+ same as the one in `DATABASE_URL`. If you forget to do this, you will need
53
+ to reset the database (`docker-compose down --volumes`).
49
54
50
55
5. Build and start the docker images.
51
56
```shell
52
57
docker-compose up -d
53
58
```
54
59
55
60
6. Run the database migrations. Replace the "xx.." in the command with the admin
56
- secret from your `.env` file. Make sure the `admin-secret` is at least 32 characters long.
61
+ secret from your `.env` file. ** Make sure the `admin-secret` is at least 32 characters long.**
57
62
```shell
58
63
hasura --project rcos-data/ migrate --admin-secret xxxxxxxxxxxxxxxxxxxxxxxx --endpoint http://localhost:8000 apply
59
64
```
@@ -77,6 +82,33 @@ See below for detailed information on building & contributing to telescope.
77
82
docker-compose up --build -d
78
83
` ` `
79
84
85
+ # ## Running Telescope outside of Docker
86
+
87
+ Developing telescope with Docker is useful because you are testing Telescope in
88
+ an almost identical environment to that which it runs on in production. In order
89
+ to improve compile speed, due to the incremental compilation cache of Rust, you
90
+ may want to develop and run Telescope outside of Docker. You can do this by
91
+ following these * optional* instructions:
92
+
93
+ 1. Telescope typically uses the standard web port 80, but outside of Docker you
94
+ will need to change that to 8080 by setting ` address` to ` 0.0.0.0:8080` in
95
+ ` config.toml` . This is because port 80 is restricted.
96
+
97
+ 2. On macOS, Docker runs within a virtual machine. That means that you need to
98
+ change ` Caddyfile.dev` to point to your computer outside the virtual machine.
99
+ You only need to do this if you are using Docker Desktop on macOS.
100
+
101
+ ` ` `
102
+ localhost:443 {
103
+ encode zstd gzip
104
+ reverse_proxy host.docker.internal:8080
105
+ }
106
+ ` ` `
107
+
108
+ 3. The commands you use to run and test Telescope need to be changed. To start
109
+ the supporting services like Hasura, Postgres, and Caddy, run ` docker-compose
110
+ -f docker-compose.dev.yml up -d` . To start Telescope, run ` cargo run` .
111
+
80
112
# # Development Notes
81
113
These are note for Telescope Developers on how to find and update Telescope
82
114
itself.
0 commit comments