Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ AWS_SECRET_ACCESS_KEY=
CLOUDFRONT_DOMAIN=
S3_BUCKET=
SEGMENT_WRITE_KEY=
SENTRY_DSN=
STRIPE_SECRET_KEY=
STRIPE_PLATFORM_CLIENT_ID=
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![Code Corps Phoenix Logo](https://d3pgew4wbk2vb1.cloudfront.net/images/github/code-corps-api.png)

[![CircleCI](https://circleci.com/gh/code-corps/code-corps-api.svg?style=svg)](https://circleci.com/gh/code-corps/code-corps-api) [![Coverage Status](https://coveralls.io/repos/github/code-corps/code-corps-api/badge.svg?branch=develop)](https://coveralls.io/github/code-corps/code-corps-api?branch=develop) [![Deps Status](https://beta.hexfaktor.org/badge/all/github/code-corps/code-corps-api.svg)](https://beta.hexfaktor.org/github/code-corps/code-corps-api)
[![CircleCI](https://circleci.com/gh/code-corps/code-corps-api.svg?style=svg)](https://circleci.com/gh/code-corps/code-corps-api) [![Inline docs](http://inch-ci.org/github/code-corps/code-corps-api.svg?branch=develop)](http://inch-ci.org/github/code-corps/code-corps-api) [![Coverage Status](https://coveralls.io/repos/github/code-corps/code-corps-api/badge.svg?branch=develop)](https://coveralls.io/github/code-corps/code-corps-api?branch=develop) [![Deps Status](https://beta.hexfaktor.org/badge/all/github/code-corps/code-corps-api.svg)](https://beta.hexfaktor.org/github/code-corps/code-corps-api) [![Slack Status](http://slack.codecorps.org/badge.svg)](http://slack.codecorps.org)

## Installing with Docker

Expand All @@ -18,10 +18,6 @@ The `circle.yml` file specifies what happens in the builds. You can [read more a

The CircleCI builds also rely on some environment variables for reporting, deployments, and other requirements.

## Learn more
## Usage

* Official website: http://www.phoenixframework.org/
* Guides: http://phoenixframework.org/docs/overview
* Docs: https://hexdocs.pm/phoenix
* Mailing list: http://groups.google.com/group/phoenix-talk
* Source: https://github.com/phoenixframework/phoenix
To learn about how to run the application, run tests, configure your environment, and more [in the usage guides](docs/USAGE.md).
3 changes: 3 additions & 0 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ config :code_corps, :icon_color_generator, CodeCorps.RandomIconColor.Generator
# Set Corsica logging to output a console warning when rejecting a request
config :code_corps, :corsica_log_level, [rejected: :warn]

config :stripity_stripe, secret_key: System.get_env("STRIPE_SECRET_KEY")
config :stripity_stripe, platform_client_id: System.get_env("STRIPE_PLATFORM_CLIENT_ID")

# Import environment specific config. This must remain at the bottom
# of this file so it overrides the configuration defined above.
import_config "#{Mix.env}.exs"
11 changes: 11 additions & 0 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ To run the tests you can run `docker-compose run test mix test`.

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.

### Donations and Stripe

If you're testing anything with donations locally, you'll need a Stripe account. Unfortunately, we cannot provide you with sandboxed keys for doing this on your own.

You can register for a Stripe account here: [https://dashboard.stripe.com/register](https://dashboard.stripe.com/register)

In your `.env` you should have a `STRIPE_SECRET_KEY` and `STRIPE_PLATFORM_CLIENT_ID`.

- `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).
- `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). You'll want to set the redirect URI to `http://localhost:4200/oauth/stripe`.

### Pushing changes

You can use `git` as you normally would, either on your own host machine or in Docker's `web` container.
32 changes: 17 additions & 15 deletions mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,15 @@ defmodule CodeCorps.Mixfile do
:gettext,
:phoenix_ecto,
:postgrex,
:arc_ecto,
:comeonin,
:corsica,
:earmark,
:ex_aws,
:httpoison,
:arc_ecto,
:scrivener_ecto,
:segment
:segment,
:stripity_stripe
]
]
end
Expand All @@ -50,32 +51,33 @@ defmodule CodeCorps.Mixfile do
# Type `mix help deps` for examples and options.
defp deps do
[
{:phoenix, "~> 1.2.0"},
{:phoenix, "~> 1.2.1"},
{:phoenix_pubsub, "~> 1.0"},
{:phoenix_ecto, "~> 3.0"},
{:postgrex, ">= 0.0.0"},
{:phoenix_html, "~> 2.6"},
{:phoenix_live_reload, "~> 1.0", only: :dev},
{:gettext, "~> 0.11"},
{:cowboy, "~> 1.0"},
{:ja_serializer, "~> 0.10"}, # JSON API
{:guardian, "~> 0.12.0"}, # Authentication (JWT)
{:arc, git: "https://github.com/stavro/arc.git", ref: "354d4d2e1b86bcd6285db3528118fe3f5db36cf5", override: true}, # Photo uploads
{:arc_ecto, "~> 0.4.4"},
{:canary, "~> 1.0"}, # Authorization
{:comeonin, "~> 2.0"},
{:mix_test_watch, "~> 0.2", only: :dev}, # Test watcher
{:credo, "~> 0.4", only: [:dev, :test]}, # Code style suggestions
{:inflex, "~> 1.7.0"},
{:corsica, "~> 0.4"}, # CORS
{:credo, "~> 0.4", only: [:dev, :test]}, # Code style suggestions
{:earmark, "~> 1.0"}, # Markdown rendering
{:ex_machina, "~> 1.0", only: :test}, # test factories
{:arc, git: "https://github.com/stavro/arc.git", ref: "354d4d2e1b86bcd6285db3528118fe3f5db36cf5", override: true}, # Photo uploads
{:arc_ecto, "~> 0.4.3"},
{:ex_aws, "~> 0.4.10"}, # Amazon AWS
{:ex_aws, "~> 0.5"}, # Amazon AWS
{:excoveralls, "~> 0.5", only: :test}, # Test coverage
{:ex_machina, "~> 1.0", only: :test}, # test factories
{:guardian, "~> 0.13"}, # Authentication (JWT)
{:httpoison, "~> 0.7"},
{:poison, "~> 1.2"},
{:canary, "~> 0.14.2"}, # Authorization
{:inflex, "~> 1.7.0"},
{:ja_serializer, "~> 0.10.1"}, # JSON API
{:mix_test_watch, "~> 0.2", only: :dev}, # Test watcher
{:poison, "~> 1.2 or ~> 2.0"},
{:scrivener_ecto, "~> 1.0"}, # DB query pagination
{:segment, github: "stueccles/analytics-elixir"} # Segment analytics
{:segment, github: "stueccles/analytics-elixir"}, # Segment analytics
{:stripity_stripe, "~> 1.4.0"} # Stripe
]
end

Expand Down
Loading