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

Prod.exs settings when using React with Mix #17

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/source/main.rst
Expand Up @@ -240,6 +240,23 @@ You don't have to worry about setting your :bash:`SECRET_KEY_BASE` config becaus

.. _`modifying existing app with distillery`:

When removing brunch and using webpack instead, in order to use React instead of static assets, it is important to

1. make sure the Phoenix static buildpack is not included in your project
2. add `server:true` to the settings in `config/prod.exs` as shown in the block below

.. code-block:: elixir

config :gigalixir_getting_started, GigalixirGettingStartedWeb.Endpoint,
secret_key_base: Map.fetch!(System.get_env(), "SECRET_KEY_BASE")
server: true

config :gigalixir_getting_started, GigalixirGettingStarted.Repo,
adapter: Ecto.Adapters.Postgres,
url: System.get_env("DATABASE_URL"),
ssl: true,
pool_size: 1 # Free tier db only allows 1 connection

Using Distillery
----------------

Expand Down