Skip to content

Commit edcf10e

Browse files
committed
Remove Docker and update docs
1 parent 5ff690f commit edcf10e

7 files changed

Lines changed: 54 additions & 203 deletions

File tree

.github/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Thanks for thinking about helping! How would you like to help?
1414

1515
2. Read and work through [the installation guide](/docs/INSTALLING.md).
1616

17-
3. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: `docker-compose run test mix test`
17+
3. Run the tests. We only take pull requests with passing tests, and it's great to know that you have a clean slate: `MIX_ENV=test mix test`
1818

1919
Okay, you're ready to go!
2020

Dockerfile

Lines changed: 0 additions & 28 deletions
This file was deleted.

README.md

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,31 +26,35 @@ You can also always come :wave: hello [in our Slack](http://slack.codecorps.org)
2626

2727
We highlight everyone who's contributed to [the Code Corps team page](https://www.codecorps.org/team). If we've missed you for some reason, please [open an issue in the Ember app](https://github.com/code-corps/code-corps-ember/issues/new)!
2828

29-
**At the moment, our focus is integration with Stripe**, so if you want to help, that would be the most useful spot. Check our [Donations milestone](https://github.com/code-corps/code-corps-api/blob/develop/milestone/1) to see which parts we need help on. Of course, help with other areas is always welcome, so if that sort of thing isn't your cup of tea, feel free to pick anything else.
29+
## Where should I help?
3030

31-
## Installing with Docker
31+
We recommend checking the latest [milestones on GitHub](https://github.com/code-corps/code-corps-api/milestones) to get a sense for our current priorities.
3232

33-
To make your life easier, you can just clone this repository and use our Docker container. [Follow this guide to get started.](https://github.com/code-corps/code-corps-api/blob/develop/docs/INSTALLING.md)
33+
Of course, help with other areas is always welcome, so if the current milestones aren't your cup of tea, feel free to [browse the issues](https://github.com/code-corps/code-corps-api/issues).
34+
35+
And you can _always_ ask us for advice on where to start [in our Slack](http://slack.codecorps.org).
36+
37+
## Installing
38+
39+
[Follow this guide to get started.](https://github.com/code-corps/code-corps-api/blob/develop/docs/INSTALLING.md)
3440

3541
## Usage
3642

3743
Have everything installed and ready to work? Read [our usage guides](USAGE.md) to learn how to:
3844

39-
- [Run normal `mix` commands through Docker](USAGE.md#interacting-with-the-app)
45+
- [Run `mix` commands](USAGE.md#interacting-with-the-app)
4046
- [Stop and start the server](USAGE.md#stopping-and-starting-the-server)
4147
- [Run tests](USAGE.md#running-tests)
42-
- [Linting and Style Guidelines](USAGE.md#linting-code-with-credo)
43-
- [Rebuild Docker containers](USAGE.md#rebuilding-docker-containers)
48+
- [Linting and style guidelines](USAGE.md#linting-code-with-credo)
4449
- [Work with the Ember front-end](USAGE.md#serving-ember)
4550
- [Set up environment variables](USAGE.md#environment)
46-
- [Push changes to GitHub](USAGE.md#pushing-changes)
4751

4852
## Documentation
4953

5054
We have several types of docs:
5155

5256
- Project documentation (README, CONTRIBUTING, etc.)
53-
- [API documentation](http://docs.codecorpsapi.apiary.io/) written in [API Blueprint](https://apiblueprint.org/) format in [`blueprint/api.apib`](https://github.com/code-corps/code-corps-api/blob/develop/blueprint/api.apib) and published to the web when merging into `develop`
57+
- API documentation ([`master`](http://docs.codecorpsapi.apiary.io/) | [`develop`](http://docs.codecorpsapidevelop.apiary.io/) | [local](docs/API.md)) written in [API Blueprint](https://apiblueprint.org/) format in [`blueprint/api.apib`](https://github.com/code-corps/code-corps-api/blob/develop/blueprint/api.apib) and published to the web when merging into `develop` or `master`
5458
- [Inline documentation](https://code-corps.github.io/code-corps-api-github-pages) for the Elixir app generated by [`ex_doc`](https://github.com/elixir-lang/ex_doc) and published to GitHub pages when merging into `develop`
5559

5660
Want to improve the documentation? [Get started here.](https://github.com/code-corps/code-corps-api/blob/develop/.github/CONTRIBUTING.md#what-kind-of-documentation-are-you-writing)
@@ -68,4 +72,4 @@ We care about:
6872
- Welcoming and teaching new contributors :wave:
6973
- Writing small, clear, and achievable issues :dart:
7074

71-
We also track quantifiable metrics like inline documentation coverage, testing coverage, and so on. You can see some of these metrics in the icons at the top of this page.
75+
We also track quantifiable metrics like inline documentation coverage, testing coverage, and so on. You can see some of these metrics in the badges at the top of this page.

USAGE.md

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,37 +3,32 @@
33
- [How do I interact with the app?](#interacting-with-the-app)
44
- [How do I stop and start the server?](#stopping-and-starting-the-server)
55
- [How do I run tests?](#running-tests)
6-
- [How do I rebuild Docker containers?](#rebuilding-docker-containers)
6+
- [How do I view the API docs?](#api-docs)
7+
- [How do I lint the code?](#linting-code-with-credo)
78
- [How do I serve the front-end?](#serving-ember)
89
- [Do I need special environment variables?](#environment)
9-
- [How do I push changes to GitHub?](#pushing-changes)
1010

1111
### Interacting with the app
1212

13-
You'll generally interact with the app using `docker-compose`. You can choose not to if you're contributing often enough to not need to worry about dependency management. But if you're short on time, Docker is probably the happier path to get up and running quickly.
13+
You'll generally interact with the app using `mix` tasks. You can [read the Phoenix documentation here](http://www.phoenixframework.org/docs/mix-tasks).
1414

15-
Here are conversions of your typical Elixir project commands:
15+
### Stopping and starting the server
1616

17-
- `iex -S mix phoenix.server``docker-compose run web iex -S mix phoenix.server`
18-
- `mix run priv/repo/seeds.exs``docker-compose run web mix run priv/repo/seeds/.exs`
19-
- `mix test``docker-compose run test mix test`
20-
- and so on...
17+
To start the server, run `mix phoenix.server`.
2118

22-
These follow the basic format of `my-command with arguments``docker-compose run TARGET_CONTAINER my-command with arguments`.
19+
To stop the server, hit `Ctrl+C` twice.
2320

24-
### Stopping and starting the server
21+
### Running tests
2522

26-
Need to stop the containers? Either `Ctrl+C` or in a separate prompt run `docker-compose stop`.
23+
To run the tests you run `MIX_ENV=test mix test`.
2724

28-
To start the services again you can run `docker-compose up`, or `docker-compose start` to start the containers in a detached state.
25+
### API docs
2926

30-
### Rebuilding Docker containers
27+
You can [view the API documentation locally](docs/API.md) with the Apiary CLI.
3128

32-
If you ever need to rebuild you can run `docker-compose up --build`. Unless you've destroyed your Docker container images, this should be faster than the first run.
29+
The production API's documentation (matching the latest `master` branch) can be found online at `http://docs.codecorpsapi.apiary.io/`.
3330

34-
### Running tests
35-
36-
To run the tests you can run `docker-compose run test mix test`.
31+
The staging API's documentation (matching the latest `develop` branch) can be found online at `http://docs.codecorpsapidevelop.apiary.io/`.
3732

3833
### Linting Code with Credo
3934

@@ -45,7 +40,7 @@ Credo's style guide is influenced by this more popular and exhaustive community
4540

4641
The Code Corps API is intended to work alongside a client written in Ember. For that purpose, the Elixir application exposes all of its API endpoints behind an `api.` subdomain.
4742

48-
For Ember to work with your now running API listening on `localhost:49235`, you simply need to run under `ember serve` at `localhost:4200` and everything should work under normal conditions.
43+
For Ember to work with your now running API listening on `localhost:4000`, you simply need to run under `ember serve` at `localhost:4200` and everything should work under normal conditions.
4944

5045
### Environment
5146

@@ -78,7 +73,3 @@ In your `.env` you should have a `STRIPE_SECRET_KEY` and `STRIPE_PLATFORM_CLIENT
7873

7974
- `STRIPE_SECRET_KEY` should be set to your "Test Secret Key" from the [API Keys section of your Stripe dashboard](https://dashboard.stripe.com/account/apikeys).
8075
- `STRIPE_PLATFORM_CLIENT_ID` should be set to "Development `client_id`" key from the [Connect section of your Stripe dashboard](https://dashboard.stripe.com/account/applications/settings).
81-
82-
### Pushing changes
83-
84-
You can use `git` as you normally would, either on your own host machine or in Docker's `web` container.

docker-compose.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

docs/API.md

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,27 @@
11
# How to generate API documentation locally
22

3-
You can generate documentation a few ways:
3+
You can generate documentation a couple ways:
44

5-
- [Apiary CLI](#apiary-cli) (recommended)
6-
- [`aglio`](#aglio)
5+
- [Apiary Client](#apiary-client) (recommended)
76
- [Atom](#atom)
87

9-
### Apiary CLI
8+
### Apiary Client
109

11-
[Apiary CLI](https://help.apiary.io/tools/apiary-cli/) comes preloaded when you run `docker-compose up` like normal.
10+
[Apiary Client](https://help.apiary.io/tools/apiary-cli/) needs Ruby to run.
1211

13-
Once Docker is running your containers, `apiary` runs an Apiary CLI server on port `8081`. You can visit the documentation by visiting `localhost:8081` in your browser. Just refresh the page any time you make changes to the documentation file at `/blueprint/api.apib`.
14-
15-
### aglio
16-
17-
Navigate into the `/blueprint` directory.
18-
19-
If installing for the first time, run:
12+
You can install the Apiary Client by running:
2013

2114
```shell
22-
docker-compose build
15+
gem install apiaryio
2316
```
2417

25-
Then start the `aglio` service with:
18+
You can now run the server:
2619

2720
```shell
28-
docker-compose up
29-
```
30-
31-
Now you can generate the docs with our shell script:
32-
33-
```bash
34-
./generate
21+
apiary preview --path=blueprint/api.apib --server
3522
```
3623

37-
You should be able to view the docs by opening the newly generated `index.html` in your browser.
24+
This runs an Apiary CLI server on port `8080`. You can visit the documentation by visiting `localhost:8080` in your browser. Just refresh the page whenever you make changes to the documentation file at `/blueprint/api.apib`.
3825

3926
### Atom
4027

0 commit comments

Comments
 (0)