Capitalize app name.
This commit is contained in:
parent
e2578a9e59
commit
83bad3bd52
|
@ -7,12 +7,12 @@
|
||||||
# General application configuration
|
# General application configuration
|
||||||
import Config
|
import Config
|
||||||
|
|
||||||
config :jol,
|
config :JOL,
|
||||||
ecto_repos: [JOL.Repo],
|
ecto_repos: [JOL.Repo],
|
||||||
generators: [timestamp_type: :utc_datetime]
|
generators: [timestamp_type: :utc_datetime]
|
||||||
|
|
||||||
# Configures the endpoint
|
# Configures the endpoint
|
||||||
config :jol, JOLWeb.Endpoint,
|
config :JOL, JOLWeb.Endpoint,
|
||||||
url: [host: "localhost"],
|
url: [host: "localhost"],
|
||||||
adapter: Bandit.PhoenixAdapter,
|
adapter: Bandit.PhoenixAdapter,
|
||||||
render_errors: [
|
render_errors: [
|
||||||
|
@ -29,7 +29,7 @@ config :jol, JOLWeb.Endpoint,
|
||||||
#
|
#
|
||||||
# For production it's recommended to configure a different adapter
|
# For production it's recommended to configure a different adapter
|
||||||
# at the `config/runtime.exs`.
|
# at the `config/runtime.exs`.
|
||||||
config :jol, JOL.Mailer, adapter: Swoosh.Adapters.Local
|
config :JOL, JOL.Mailer, adapter: Swoosh.Adapters.Local
|
||||||
|
|
||||||
# Configure esbuild (the version is required)
|
# Configure esbuild (the version is required)
|
||||||
config :esbuild,
|
config :esbuild,
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Config
|
import Config
|
||||||
|
|
||||||
# Configure your database
|
# Configure your database
|
||||||
config :jol, JOL.Repo,
|
config :JOL, JOL.Repo,
|
||||||
username: "postgres",
|
username: "postgres",
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
hostname: "localhost",
|
hostname: "localhost",
|
||||||
|
@ -16,7 +16,7 @@ config :jol, JOL.Repo,
|
||||||
# The watchers configuration can be used to run external
|
# The watchers configuration can be used to run external
|
||||||
# watchers to your application. For example, we can use it
|
# watchers to your application. For example, we can use it
|
||||||
# to bundle .js and .css sources.
|
# to bundle .js and .css sources.
|
||||||
config :jol, JOLWeb.Endpoint,
|
config :JOL, JOLWeb.Endpoint,
|
||||||
# Binding to loopback ipv4 address prevents access from other machines.
|
# Binding to loopback ipv4 address prevents access from other machines.
|
||||||
# Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
|
# Change to `ip: {0, 0, 0, 0}` to allow access from other machines.
|
||||||
http: [ip: {127, 0, 0, 1}, port: 4000],
|
http: [ip: {127, 0, 0, 1}, port: 4000],
|
||||||
|
@ -25,8 +25,8 @@ config :jol, JOLWeb.Endpoint,
|
||||||
debug_errors: true,
|
debug_errors: true,
|
||||||
secret_key_base: "9rmK754o3RoBXorXcCf0PTZkCJbfAOdNGyXSQizgF5CYcd9iQTR2UhaNGw5v74DR",
|
secret_key_base: "9rmK754o3RoBXorXcCf0PTZkCJbfAOdNGyXSQizgF5CYcd9iQTR2UhaNGw5v74DR",
|
||||||
watchers: [
|
watchers: [
|
||||||
esbuild: {Esbuild, :install_and_run, [:jol, ~w(--sourcemap=inline --watch)]},
|
esbuild: {Esbuild, :install_and_run, [:JOL, ~w(--sourcemap=inline --watch)]},
|
||||||
tailwind: {Tailwind, :install_and_run, [:jol, ~w(--watch)]}
|
tailwind: {Tailwind, :install_and_run, [:JOL, ~w(--watch)]}
|
||||||
]
|
]
|
||||||
|
|
||||||
# ## SSL Support
|
# ## SSL Support
|
||||||
|
@ -53,7 +53,7 @@ config :jol, JOLWeb.Endpoint,
|
||||||
# different ports.
|
# different ports.
|
||||||
|
|
||||||
# Watch static and templates for browser reloading.
|
# Watch static and templates for browser reloading.
|
||||||
config :jol, JOLWeb.Endpoint,
|
config :JOL, JOLWeb.Endpoint,
|
||||||
live_reload: [
|
live_reload: [
|
||||||
patterns: [
|
patterns: [
|
||||||
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
|
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
|
||||||
|
@ -63,7 +63,7 @@ config :jol, JOLWeb.Endpoint,
|
||||||
]
|
]
|
||||||
|
|
||||||
# Enable dev routes for dashboard and mailbox
|
# Enable dev routes for dashboard and mailbox
|
||||||
config :jol, dev_routes: true
|
config :JOL, dev_routes: true
|
||||||
|
|
||||||
# Do not include metadata nor timestamps in development logs
|
# Do not include metadata nor timestamps in development logs
|
||||||
config :logger, :console, format: "[$level] $message\n"
|
config :logger, :console, format: "[$level] $message\n"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Config
|
||||||
# manifest is generated by the `mix assets.deploy` task,
|
# manifest is generated by the `mix assets.deploy` task,
|
||||||
# which you should run after static files are built and
|
# which you should run after static files are built and
|
||||||
# before starting your production server.
|
# before starting your production server.
|
||||||
config :jol, JOLWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
|
config :JOL, JOLWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
|
||||||
|
|
||||||
# Configures Swoosh API Client
|
# Configures Swoosh API Client
|
||||||
config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: JOL.Finch
|
config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: JOL.Finch
|
||||||
|
|
|
@ -17,7 +17,7 @@ import Config
|
||||||
# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
|
# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
|
||||||
# script that automatically sets the env var above.
|
# script that automatically sets the env var above.
|
||||||
if System.get_env("PHX_SERVER") do
|
if System.get_env("PHX_SERVER") do
|
||||||
config :jol, JOLWeb.Endpoint, server: true
|
config :JOL, JOLWeb.Endpoint, server: true
|
||||||
end
|
end
|
||||||
|
|
||||||
if config_env() == :prod do
|
if config_env() == :prod do
|
||||||
|
@ -30,7 +30,7 @@ if config_env() == :prod do
|
||||||
|
|
||||||
maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []
|
maybe_ipv6 = if System.get_env("ECTO_IPV6") in ~w(true 1), do: [:inet6], else: []
|
||||||
|
|
||||||
config :jol, JOL.Repo,
|
config :JOL, JOL.Repo,
|
||||||
# ssl: true,
|
# ssl: true,
|
||||||
url: database_url,
|
url: database_url,
|
||||||
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
pool_size: String.to_integer(System.get_env("POOL_SIZE") || "10"),
|
||||||
|
@ -51,9 +51,9 @@ if config_env() == :prod do
|
||||||
host = System.get_env("PHX_HOST") || "example.com"
|
host = System.get_env("PHX_HOST") || "example.com"
|
||||||
port = String.to_integer(System.get_env("PORT") || "4000")
|
port = String.to_integer(System.get_env("PORT") || "4000")
|
||||||
|
|
||||||
config :jol, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
config :JOL, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
|
||||||
|
|
||||||
config :jol, JOLWeb.Endpoint,
|
config :JOL, JOLWeb.Endpoint,
|
||||||
url: [host: host, port: 443, scheme: "https"],
|
url: [host: host, port: 443, scheme: "https"],
|
||||||
http: [
|
http: [
|
||||||
# Enable IPv6 and bind on all interfaces.
|
# Enable IPv6 and bind on all interfaces.
|
||||||
|
@ -70,7 +70,7 @@ if config_env() == :prod do
|
||||||
# To get SSL working, you will need to add the `https` key
|
# To get SSL working, you will need to add the `https` key
|
||||||
# to your endpoint configuration:
|
# to your endpoint configuration:
|
||||||
#
|
#
|
||||||
# config :jol, JOLWeb.Endpoint,
|
# config :JOL, JOLWeb.Endpoint,
|
||||||
# https: [
|
# https: [
|
||||||
# ...,
|
# ...,
|
||||||
# port: 443,
|
# port: 443,
|
||||||
|
@ -92,7 +92,7 @@ if config_env() == :prod do
|
||||||
# We also recommend setting `force_ssl` in your config/prod.exs,
|
# We also recommend setting `force_ssl` in your config/prod.exs,
|
||||||
# ensuring no data is ever sent via http, always redirecting to https:
|
# ensuring no data is ever sent via http, always redirecting to https:
|
||||||
#
|
#
|
||||||
# config :jol, JOLWeb.Endpoint,
|
# config :JOL, JOLWeb.Endpoint,
|
||||||
# force_ssl: [hsts: true]
|
# force_ssl: [hsts: true]
|
||||||
#
|
#
|
||||||
# Check `Plug.SSL` for all available options in `force_ssl`.
|
# Check `Plug.SSL` for all available options in `force_ssl`.
|
||||||
|
@ -103,7 +103,7 @@ if config_env() == :prod do
|
||||||
# Also, you may need to configure the Swoosh API client of your choice if you
|
# Also, you may need to configure the Swoosh API client of your choice if you
|
||||||
# are not using SMTP. Here is an example of the configuration:
|
# are not using SMTP. Here is an example of the configuration:
|
||||||
#
|
#
|
||||||
# config :jol, JOL.Mailer,
|
# config :JOL, JOL.Mailer,
|
||||||
# adapter: Swoosh.Adapters.Mailgun,
|
# adapter: Swoosh.Adapters.Mailgun,
|
||||||
# api_key: System.get_env("MAILGUN_API_KEY"),
|
# api_key: System.get_env("MAILGUN_API_KEY"),
|
||||||
# domain: System.get_env("MAILGUN_DOMAIN")
|
# domain: System.get_env("MAILGUN_DOMAIN")
|
||||||
|
|
|
@ -5,7 +5,7 @@ import Config
|
||||||
# The MIX_TEST_PARTITION environment variable can be used
|
# The MIX_TEST_PARTITION environment variable can be used
|
||||||
# to provide built-in test partitioning in CI environment.
|
# to provide built-in test partitioning in CI environment.
|
||||||
# Run `mix help test` for more information.
|
# Run `mix help test` for more information.
|
||||||
config :jol, JOL.Repo,
|
config :JOL, JOL.Repo,
|
||||||
username: "postgres",
|
username: "postgres",
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
hostname: "localhost",
|
hostname: "localhost",
|
||||||
|
@ -15,13 +15,13 @@ config :jol, JOL.Repo,
|
||||||
|
|
||||||
# We don't run a server during test. If one is required,
|
# We don't run a server during test. If one is required,
|
||||||
# you can enable the server option below.
|
# you can enable the server option below.
|
||||||
config :jol, JOLWeb.Endpoint,
|
config :JOL, JOLWeb.Endpoint,
|
||||||
http: [ip: {127, 0, 0, 1}, port: 4002],
|
http: [ip: {127, 0, 0, 1}, port: 4002],
|
||||||
secret_key_base: "TcmWd6GafOT64XVzHiK6e6Yub8o8jhoi4gMK5K4PlAXyD7nfwzjsutXiMDifprgw",
|
secret_key_base: "TcmWd6GafOT64XVzHiK6e6Yub8o8jhoi4gMK5K4PlAXyD7nfwzjsutXiMDifprgw",
|
||||||
server: false
|
server: false
|
||||||
|
|
||||||
# In test we don't send emails.
|
# In test we don't send emails.
|
||||||
config :jol, JOL.Mailer, adapter: Swoosh.Adapters.Test
|
config :JOL, JOL.Mailer, adapter: Swoosh.Adapters.Test
|
||||||
|
|
||||||
# Disable swoosh api client as it is only required for production adapters.
|
# Disable swoosh api client as it is only required for production adapters.
|
||||||
config :swoosh, :api_client, false
|
config :swoosh, :api_client, false
|
||||||
|
|
|
@ -10,7 +10,7 @@ defmodule JOL.Application do
|
||||||
children = [
|
children = [
|
||||||
JOLWeb.Telemetry,
|
JOLWeb.Telemetry,
|
||||||
JOL.Repo,
|
JOL.Repo,
|
||||||
{DNSCluster, query: Application.get_env(:jol, :dns_cluster_query) || :ignore},
|
{DNSCluster, query: Application.get_env(:JOL, :dns_cluster_query) || :ignore},
|
||||||
{Phoenix.PubSub, name: JOL.PubSub},
|
{Phoenix.PubSub, name: JOL.PubSub},
|
||||||
# Start the Finch HTTP client for sending emails
|
# Start the Finch HTTP client for sending emails
|
||||||
{Finch, name: JOL.Finch},
|
{Finch, name: JOL.Finch},
|
||||||
|
|
|
@ -3,7 +3,7 @@ defmodule JOL.Blog do
|
||||||
|
|
||||||
use NimblePublisher,
|
use NimblePublisher,
|
||||||
build: Post,
|
build: Post,
|
||||||
from: Application.app_dir(:jol, "priv/posts/**/*.md"),
|
from: Application.app_dir(:JOL, "priv/posts/**/*.md"),
|
||||||
as: :posts
|
as: :posts
|
||||||
|
|
||||||
@posts Enum.sort_by(@posts, & &1.date, {:desc, Date})
|
@posts Enum.sort_by(@posts, & &1.date, {:desc, Date})
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
defmodule JOL.Mailer do
|
defmodule JOL.Mailer do
|
||||||
use Swoosh.Mailer, otp_app: :jol
|
use Swoosh.Mailer, otp_app: :JOL
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
defmodule JOL.Repo do
|
defmodule JOL.Repo do
|
||||||
use Ecto.Repo,
|
use Ecto.Repo,
|
||||||
otp_app: :jol,
|
otp_app: :JOL,
|
||||||
adapter: Ecto.Adapters.Postgres
|
adapter: Ecto.Adapters.Postgres
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
defmodule JOLWeb.Endpoint do
|
defmodule JOLWeb.Endpoint do
|
||||||
use Phoenix.Endpoint, otp_app: :jol
|
use Phoenix.Endpoint, otp_app: :JOL
|
||||||
|
|
||||||
# The session will be stored in the cookie and signed,
|
# The session will be stored in the cookie and signed,
|
||||||
# this means its contents can be read but not tampered with.
|
# this means its contents can be read but not tampered with.
|
||||||
|
@ -21,7 +21,7 @@ defmodule JOLWeb.Endpoint do
|
||||||
# when deploying your static files in production.
|
# when deploying your static files in production.
|
||||||
plug Plug.Static,
|
plug Plug.Static,
|
||||||
at: "/",
|
at: "/",
|
||||||
from: :jol,
|
from: :JOL,
|
||||||
gzip: false,
|
gzip: false,
|
||||||
only: JOLWeb.static_paths()
|
only: JOLWeb.static_paths()
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ defmodule JOLWeb.Endpoint do
|
||||||
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
|
socket "/phoenix/live_reload/socket", Phoenix.LiveReloader.Socket
|
||||||
plug Phoenix.LiveReloader
|
plug Phoenix.LiveReloader
|
||||||
plug Phoenix.CodeReloader
|
plug Phoenix.CodeReloader
|
||||||
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :jol
|
plug Phoenix.Ecto.CheckRepoStatus, otp_app: :JOL
|
||||||
end
|
end
|
||||||
|
|
||||||
plug Phoenix.LiveDashboard.RequestLogger,
|
plug Phoenix.LiveDashboard.RequestLogger,
|
||||||
|
|
|
@ -20,5 +20,5 @@ defmodule JOLWeb.Gettext do
|
||||||
|
|
||||||
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
|
See the [Gettext Docs](https://hexdocs.pm/gettext) for detailed usage.
|
||||||
"""
|
"""
|
||||||
use Gettext, otp_app: :jol
|
use Gettext, otp_app: :JOL
|
||||||
end
|
end
|
||||||
|
|
|
@ -26,7 +26,7 @@ defmodule JOLWeb.Router do
|
||||||
# end
|
# end
|
||||||
|
|
||||||
# Enable LiveDashboard and Swoosh mailbox preview in development
|
# Enable LiveDashboard and Swoosh mailbox preview in development
|
||||||
if Application.compile_env(:jol, :dev_routes) do
|
if Application.compile_env(:JOL, :dev_routes) do
|
||||||
# If you want to use the LiveDashboard in production, you should put
|
# If you want to use the LiveDashboard in production, you should put
|
||||||
# it behind authentication and allow only admins to access it.
|
# it behind authentication and allow only admins to access it.
|
||||||
# If your application does not have an admins-only section yet,
|
# If your application does not have an admins-only section yet,
|
||||||
|
|
Loading…
Reference in a new issue