rename to cannery

This commit is contained in:
2023-02-25 15:47:37 -05:00
parent bc034c0361
commit a778f5a61f
128 changed files with 999 additions and 998 deletions

View File

@ -7,24 +7,24 @@
# General application configuration
import Config
config :lokal,
ecto_repos: [Lokal.Repo],
config :cannery,
ecto_repos: [Cannery.Repo],
generators: [binary_id: true]
config :lokal, Lokal.Accounts, registration: System.get_env("REGISTRATION", "invite")
config :cannery, Cannery.Accounts, registration: System.get_env("REGISTRATION", "invite")
# Configures the endpoint
config :lokal, LokalWeb.Endpoint,
config :cannery, CanneryWeb.Endpoint,
url: [scheme: "https", host: System.get_env("HOST") || "localhost", port: "443"],
http: [port: String.to_integer(System.get_env("PORT") || "4000")],
secret_key_base: "KH59P0iZixX5gP/u+zkxxG8vAAj6vgt0YqnwEB5JP5K+E567SsqkCz69uWShjE7I",
render_errors: [view: LokalWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Lokal.PubSub,
render_errors: [view: CanneryWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Cannery.PubSub,
live_view: [signing_salt: "zOLgd3lr"]
config :lokal, Lokal.Application, automigrate: false
config :cannery, Cannery.Application, automigrate: false
config :lokal, :generators,
config :cannery, :generators,
migration: true,
binary_id: true,
sample_binary_id: "11111111-1111-1111-1111-111111111111"
@ -36,7 +36,7 @@ config :lokal, :generators,
#
# For production it's recommended to configure a different adapter
# at the `config/runtime.exs`.
config :lokal, Lokal.Mailer, adapter: Swoosh.Adapters.Local
config :cannery, Cannery.Mailer, adapter: Swoosh.Adapters.Local
# Swoosh API client is needed for adapters other than SMTP.
config :swoosh, :api_client, false
@ -45,8 +45,8 @@ config :swoosh, :api_client, false
config :gettext, :default_locale, "en_US"
# Configure Oban
config :lokal, Oban,
repo: Lokal.Repo,
config :cannery, Oban,
repo: Cannery.Repo,
plugins: [Oban.Plugins.Pruner],
queues: [default: 10, mailers: 20]

View File

@ -1,7 +1,7 @@
import Config
# Configure your database
config :lokal, Lokal.Repo,
config :cannery, Cannery.Repo,
show_sensitive_data_on_connection_error: true,
pool_size: 10
@ -11,7 +11,7 @@ config :lokal, Lokal.Repo,
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with esbuild to bundle .js and .css sources.
config :lokal, LokalWeb.Endpoint,
config :cannery, CanneryWeb.Endpoint,
check_origin: false,
code_reloader: true,
debug_errors: true,
@ -54,13 +54,13 @@ config :lokal, LokalWeb.Endpoint,
# different ports.
# Watch static and templates for browser reloading.
config :lokal, LokalWeb.Endpoint,
config :cannery, CanneryWeb.Endpoint,
live_reload: [
patterns: [
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
~r"priv/gettext/.*(po)$",
~r"lib/lokal_web/(live|views)/.*(ex)$",
~r"lib/lokal_web/templates/.*(eex)$"
~r"lib/cannery_web/(live|views)/.*(ex)$",
~r"lib/cannery_web/templates/.*(eex)$"
]
]

View File

@ -9,7 +9,7 @@ import Config
# manifest is generated by the `mix phx.digest` task,
# which you should run after static files are built and
# before starting your production server.
config :lokal, LokalWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
config :cannery, CanneryWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
# Do not print debug messages in production
config :logger, level: :info
@ -19,7 +19,7 @@ config :logger, level: :info
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
#
# config :lokal, LokalWeb.Endpoint,
# config :cannery, CanneryWeb.Endpoint,
# ...,
# url: [host: "example.com", port: 443],
# https: [
@ -43,7 +43,7 @@ config :logger, level: :info
# We also recommend setting `force_ssl` in your endpoint, ensuring
# no data is ever sent via http, always redirecting to https:
#
# config :lokal, LokalWeb.Endpoint,
# config :cannery, CanneryWeb.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.

View File

@ -9,7 +9,7 @@ import Config
# Start the phoenix server if environment is set and running in a release
if System.get_env("PHX_SERVER") && System.get_env("RELEASE_NAME") do
config :lokal, LokalWeb.Endpoint, server: true
config :cannery, CanneryWeb.Endpoint, server: true
end
# Set default locale
@ -21,28 +21,28 @@ database_url =
if config_env() == :test do
System.get_env(
"TEST_DATABASE_URL",
"ecto://postgres:postgres@localhost/lokal_test#{System.get_env("MIX_TEST_PARTITION")}"
"ecto://postgres:postgres@localhost/cannery_test#{System.get_env("MIX_TEST_PARTITION")}"
)
else
System.get_env("DATABASE_URL", "ecto://postgres:postgres@lokal-db/lokal")
System.get_env("DATABASE_URL", "ecto://postgres:postgres@cannery-db/cannery")
end
host =
System.get_env("HOST") ||
raise "No hostname set! Must be the domain and tld like `lokal.bubbletea.dev`."
raise "No hostname set! Must be the domain and tld like `cannery.bubbletea.dev`."
interface =
if config_env() in [:dev, :test],
do: {0, 0, 0, 0},
else: {0, 0, 0, 0, 0, 0, 0, 0}
config :lokal, Lokal.Repo,
config :cannery, Cannery.Repo,
# ssl: true,
url: database_url,
pool_size: String.to_integer(System.get_env("POOL_SIZE", "10")),
socket_options: maybe_ipv6
config :lokal, LokalWeb.Endpoint,
config :cannery, CanneryWeb.Endpoint,
url: [scheme: "https", host: host, port: 443],
http: [
# See the documentation on https://hexdocs.pm/plug_cowboy/Plug.Cowboy.html
@ -53,7 +53,7 @@ config :lokal, LokalWeb.Endpoint,
server: true
if config_env() in [:dev, :prod] do
config :lokal, Lokal.Accounts, registration: System.get_env("REGISTRATION", "invite")
config :cannery, Cannery.Accounts, registration: System.get_env("REGISTRATION", "invite")
end
if config_env() == :prod do
@ -69,13 +69,13 @@ if config_env() == :prod do
You can generate one by calling: mix phx.gen.secret
"""
config :lokal, LokalWeb.Endpoint, secret_key_base: secret_key_base
config :cannery, CanneryWeb.Endpoint, secret_key_base: secret_key_base
# Automatically apply migrations
config :lokal, Lokal.Application, automigrate: true
config :cannery, Cannery.Application, automigrate: true
# Set up SMTP settings
config :lokal, Lokal.Mailer,
config :cannery, Cannery.Mailer,
adapter: Swoosh.Adapters.SMTP,
relay: System.get_env("SMTP_HOST") || raise("No SMTP_HOST set!"),
port: System.get_env("SMTP_PORT", "587"),
@ -83,14 +83,14 @@ if config_env() == :prod do
password: System.get_env("SMTP_PASSWORD") || raise("No SMTP_PASSWORD set!"),
ssl: System.get_env("SMTP_SSL") == "true",
email_from: System.get_env("EMAIL_FROM", "no-reply@#{System.get_env("HOST")}"),
email_name: System.get_env("EMAIL_NAME", "Lokal")
email_name: System.get_env("EMAIL_NAME", "Cannery")
# ## Using releases
#
# If you are doing OTP releases, you need to instruct Phoenix
# to start each relevant endpoint:
#
# config :lokal, LokalWeb.Endpoint, server: true
# config :cannery, CanneryWeb.Endpoint, server: true
#
# Then you can assemble a release by calling `mix release`.
# See `mix help release` for more information.

View File

@ -8,22 +8,22 @@ config :bcrypt_elixir, :log_rounds, 1
# The MIX_TEST_PARTITION environment variable can be used
# to provide built-in test partitioning in CI environment.
# Run `mix help test` for more information.
config :lokal, Lokal.Repo,
config :cannery, Cannery.Repo,
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: 10
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :lokal, LokalWeb.Endpoint,
config :cannery, CanneryWeb.Endpoint,
http: [ip: {0, 0, 0, 0}, port: 4002],
secret_key_base: "S3qq9QtUdsFtlYej+HTjAVN95uP5i5tf2sPYINWSQfCKJghFj2B1+wTAoljZyHOK",
server: false
# In test we don't send emails.
config :lokal, Lokal.Mailer, adapter: Swoosh.Adapters.Test
config :cannery, Cannery.Mailer, adapter: Swoosh.Adapters.Test
# Don't require invites for signups
config :lokal, Lokal.Accounts, registration: "public"
config :cannery, Cannery.Accounts, registration: "public"
# Print only warnings and errors during test
config :logger, level: :warn
@ -32,4 +32,4 @@ config :logger, level: :warn
config :phoenix, :plug_init_mode, :runtime
# Disable Oban
config :lokal, Oban, queues: false, plugins: false
config :cannery, Oban, queues: false, plugins: false