Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update environment-setup.md #3762

Merged
merged 12 commits into from
Nov 20, 2022
25 changes: 23 additions & 2 deletions src/web/docusaurus/docs/getting-started/environment-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ Docker builds Telescope's dependencies at launch and keeps them on disk. In some

There are different ways to run the application. By default, [env.development](https://github.com/Seneca-CDOT/telescope/blob/master/config/env.development) will be used. Please read the use cases below to find out what configuration you need to make for different scenarios.

:::caution Important
P-DR0ZD marked this conversation as resolved.
Show resolved Hide resolved

You do not need to modify any of the config files for them to run.

:::

There are also [env.production](https://github.com/Seneca-CDOT/telescope/blob/master/config/env.production) and [env.staging](https://github.com/Seneca-CDOT/telescope/blob/master/config/env.staging) to choose based on developer's need. For example, if you want to use staging, you can do `cp ./config/env.staging ./.env` on Linux/macOS, or `copy config/env.staging .env` on Windows.

Here are instructions for different scenarios:
Expand All @@ -262,6 +268,12 @@ This is the default setting, you do not need to copy or modify any `env` file.
pnpm services:start
TueeNguyen marked this conversation as resolved.
Show resolved Hide resolved
```

An Alternative version of the start command is

```bash
docker-compose --env-file config/env.development up --build -d
```

Then visit `localhost:8000` in a web browser to see Telescope running locally.

Microservices will start downloading feeds and processing them until stopped. You can stop the microservices by running
Expand All @@ -288,9 +300,14 @@ Run the `pnpm db:init` script as it will populate the database with an initial s
`db:seed` is responsible to populate the database with an initial set of data.
:::

Stop the `parser` service running. If you have Docker app installed locally make sure to stop the `parser` container before continuing to the next step.
Docker Desktop app:
![Image](../../static/img/dockerDesktopExample.png)

Docker CLI: `docker stop <container-id>` (e.g, `15649f07c6bf` in above picture)

Finally, restart the `parser` container by running `pnpm:services start parser`.
To find container-id: `docker ps -a` This will return all the docker containers, STATUS, and their PORTS

Finally, restart the `parser` container by running `pnpm services:start parser`.

#### Option 2: Run frontend only

Expand Down Expand Up @@ -401,3 +418,7 @@ If you receive the error message "Malformed input, repository not added" after r
Alternatively, you can set up an AWS Cloud9 IDE environment if none of the above worked for you. Please see our [AWS Cloud9 IDE Setup documentation](../getting-started/aws-cloud9.md) for more information.

:::

### No Posts after Running

If you have no posts after starting the services, make sure that you properly seeded the database and ran the `start` script. You do not need to modify any of the config files or modify the Postgres URL.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.