Last active
September 11, 2019 21:08
-
-
Save paveltyk/5fb3d503ef24715c5f898f822646499f to your computer and use it in GitHub Desktop.
Phoenix + React + Heroku + Docker https://medium.com/@paveltyk/phoenix-react-heroku-docker-44d5c4a83ab1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/prod.exs - Remove cache_manifest | |
config :healthyskin, HealthyskinWeb.Endpoint, url: [host: "example.com", port: 80] | |
# lib/healthyskin_web/endpoint.ex - Instruct Plug.Static how to serve assets | |
plug Plug.Static, | |
at: "/", | |
from: "assets/build", | |
gzip: false, | |
only: | |
~w(index.html favicon.ico logo192.png logo512.png static service-worker.js manifest.json) | |
# lib/healthyskin_web/router.ex - Add catchall route for SPA | |
scope "/", HealthyskinWeb do | |
get("/*path", PageController, :index) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment