Skip to content

Commit

Permalink
Removes outdated docs and adds troubleshooting section (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
rosschapman authored Dec 23, 2024
1 parent 97e4769 commit 5fcc5af
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 825 deletions.
86 changes: 16 additions & 70 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,63 +28,6 @@ $ cp config.example.yml config.yml
# Open it in your preferred text editor
```

##### Algolia

[Algolia](https://www.algolia.com/doc/guides/getting-started/what-is-algolia/) is used as our search engine and in order for it to operate properly for everyone, we each need our own [index](https://www.algolia.com/doc/guides/indexing/indexing-overview/).

- in `config.yml` set _your_ github username as the value for `ALGOLIA_INDEX_PREFIX`. This will point to the search index matching your local environment.

#### Building and running the application

```sh
# Install node dependencies
$ docker-compose run --rm web npm install

# Build static assets bundle
$ docker-compose run --rm web npm run build

# Run dev server
$ docker-compose up
```

You should be able to view the web app in your browser at http://localhost:8080.

By default, this assumes that you have also set up askdarcel-api project using
the Docker setup instructions and that the API server is running. If you want to
target a different instance of askdarcel-api, you can modify the `API_URL`
environment variable in docker-compose.yml.

#### Fully tearing down environment

In case you ever need to fully tear down your local development environment,
such as to do a fresh setup from a clean slate, you will need to run extra
commands to remove state that is stored in Docker. Removing the git repository
and re-cloning is _insufficient_ because some of the state is stored in Docker.

In particular, for performance reasons, we save NPM modules in a `node_modules/`
directory that is mounted from a Docker volume rather than bind mounting the
`node_modules/` directory from the host operating system (e.g. macOS). To delete
all the installed NPM modules, you will have to remove the Docker volume.

The following command will stop all running Docker containers, delete them, and
remove their volumes:

```sh
$ docker-compose down --remove-orphans --volumes
```

Note: When you run that command, you may get an error message about removing
networks:

```
ERROR: error while removing network: network askdarcel id
4c4713d7f42173843437de3b0051a9d7e7bc81eb18123993975c3cd5a9e0a38e has active
endpoints
```

If this happens, then you need to run `docker-compose stop` in the askdarcel-api
application first before running the `docker-compose down` command above.

## Non-Docker Development Environment

### Installing Node.js and npm
Expand All @@ -105,19 +48,19 @@ $ nvm install # Reads from .nvmrc
To install the dependencies, from the top directory run

```sh
npm install
$ npm install
```

To build the bundled script with webpack run

```sh
npm run build
$ npm run build
```

And to run the dev server, run

```sh
npm run dev
$ npm run dev
```

## Branches and Deployments
Expand All @@ -142,21 +85,24 @@ app
To run tests:

```sh
npm run test # Run all tests and exit
npm run test:watch # Watch files for changes and rerun tests related to changed files
npm run test:watch:all # Watch files for changes and rerun all tests when something changes
$ npm run test # Run all tests and exit
$ npm run test:watch # Watch files for changes and rerun tests related to changed files
$ npm run test:watch:all # Watch files for changes and rerun all tests when something changes
```

### Acceptance testing

We do not currently support high-level acceptance testing that simulates workflows that cannot be tested through React Testing Library.
We do not currently support high-level acceptance testing that simulates
workflows that cannot be tested through React Testing Library.

## Pull Requests
## Troubleshooting

Pull requests are opened to the development branch. When opening a pull request please fill out the as much of the pull request template you can, which includes tagging the issue your PR is related to, a description of your PR, indicating the type of change, including details for the reviewer about how to test your PR, and a testing checklist. Additionally, officially link the notion ticket to the PR using GitHub's linking UI.
### Error: spawn heroku ENOENT

When your PR is ready for review, add the needs review(s) label to help surface it to the other devs. You can assign people as reviewers to surface the work further. If you put up a PR that is not yet ready for eyes, add the wip label.
If the `build_and_deploy_app` github action fails with this message during the
release step, you can manually release the docker container to heroku with the
following command:

Once the PR has been approved, you either (1) squash and merge the commits if your changes are just in one package, or (2) rebase and merge your commits if your commits are cleanly separated across multiple packages to allow the versions to propagate appropriately.

As a reviewer on a PR, try not to leave only comments, but a clear next step action. If the PR requires further discussion or changes, mark it with Requested Changes. If a PR looks good to you (or even if there are small changes requested that won't require an additional review), please mark it with Approved and comment on the last few changes needed. This helps other reviewers better understand the state of PRs at the list view and prevents an additional unnecessary review cycle.
```
$ heroku container:release web --app our415
```
18 changes: 0 additions & 18 deletions docs/README.md

This file was deleted.

106 changes: 0 additions & 106 deletions docs/getting-started.md

This file was deleted.

80 changes: 0 additions & 80 deletions docs/how-to-configure-text-editors.md

This file was deleted.

Loading

0 comments on commit 5fcc5af

Please sign in to comment.