init SlideLife

This commit is contained in:
2024-05-21 23:48:50 +02:00
parent c21f4ab218
commit a988eb4bc2
37 changed files with 154 additions and 176 deletions

View File

@ -7,19 +7,19 @@
# General application configuration
import Config
config :modern_base,
ecto_repos: [ModernBase.Repo],
config :slide_life,
ecto_repos: [SlideLife.Repo],
generators: [timestamp_type: :utc_datetime]
# Configures the endpoint
config :modern_base, ModernBaseWeb.Endpoint,
config :slide_life, SlideLifeWeb.Endpoint,
url: [host: "localhost"],
adapter: Bandit.PhoenixAdapter,
render_errors: [
formats: [html: ModernBaseWeb.ErrorHTML, json: ModernBaseWeb.ErrorJSON],
formats: [html: SlideLifeWeb.ErrorHTML, json: SlideLifeWeb.ErrorJSON],
layout: false
],
pubsub_server: ModernBase.PubSub,
pubsub_server: SlideLife.PubSub,
live_view: [signing_salt: "UVlXhkXp"]
# Configures the mailer
@ -29,12 +29,12 @@ config :modern_base, ModernBaseWeb.Endpoint,
#
# For production it's recommended to configure a different adapter
# at the `config/runtime.exs`.
config :modern_base, ModernBase.Mailer, adapter: Swoosh.Adapters.Local
config :slide_life, SlideLife.Mailer, adapter: Swoosh.Adapters.Local
# Configure esbuild (the version is required)
config :esbuild,
version: "0.17.11",
modern_base: [
slide_life: [
args:
~w(js/app.js --bundle --target=es2017 --outdir=../priv/static/assets --external:/fonts/* --external:/images/*),
cd: Path.expand("../assets", __DIR__),
@ -44,7 +44,7 @@ config :esbuild,
# Configure tailwind (the version is required)
config :tailwind,
version: "3.4.0",
modern_base: [
slide_life: [
args: ~w(
--config=tailwind.config.js
--input=css/app.css

View File

@ -1,11 +1,11 @@
import Config
# Configure your database
config :modern_base, ModernBase.Repo,
config :slide_life, SlideLife.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "modern_base_dev",
database: "slide_life_dev",
stacktrace: true,
show_sensitive_data_on_connection_error: true,
pool_size: 10
@ -16,7 +16,7 @@ config :modern_base, ModernBase.Repo,
# The watchers configuration can be used to run external
# watchers to your application. For example, we can use it
# to bundle .js and .css sources.
config :modern_base, ModernBaseWeb.Endpoint,
config :slide_life, SlideLifeWeb.Endpoint,
# Binding to loopback ipv4 address prevents 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],
@ -25,8 +25,8 @@ config :modern_base, ModernBaseWeb.Endpoint,
debug_errors: true,
secret_key_base: "SJCi/gfKcoIeiOLcl5pcNoMsAtluCExbdb66zFwuSrMPjKHr/DumTB35OCXisztJ",
watchers: [
esbuild: {Esbuild, :install_and_run, [:modern_base, ~w(--sourcemap=inline --watch)]},
tailwind: {Tailwind, :install_and_run, [:modern_base, ~w(--watch)]}
esbuild: {Esbuild, :install_and_run, [:slide_life, ~w(--sourcemap=inline --watch)]},
tailwind: {Tailwind, :install_and_run, [:slide_life, ~w(--watch)]}
]
# ## SSL Support
@ -53,17 +53,17 @@ config :modern_base, ModernBaseWeb.Endpoint,
# different ports.
# Watch static and templates for browser reloading.
config :modern_base, ModernBaseWeb.Endpoint,
config :slide_life, SlideLifeWeb.Endpoint,
live_reload: [
patterns: [
~r"priv/static/(?!uploads/).*(js|css|png|jpeg|jpg|gif|svg)$",
~r"priv/gettext/.*(po)$",
~r"lib/modern_base_web/(controllers|live|components)/.*(ex|heex)$"
~r"lib/slide_life_web/(controllers|live|components)/.*(ex|heex)$"
]
]
# Enable dev routes for dashboard and mailbox
config :modern_base, dev_routes: true
config :slide_life, dev_routes: true
# Do not include metadata nor timestamps in development logs
config :logger, :console, format: "[$level] $message\n"

View File

@ -5,11 +5,11 @@ import Config
# manifest is generated by the `mix assets.deploy` task,
# which you should run after static files are built and
# before starting your production server.
config :modern_base, ModernBaseWeb.Endpoint,
config :slide_life, SlideLifeWeb.Endpoint,
cache_static_manifest: "priv/static/cache_manifest.json"
# Configures Swoosh API Client
config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: ModernBase.Finch
config :swoosh, api_client: Swoosh.ApiClient.Finch, finch_name: SlideLife.Finch
# Disable Swoosh Local Memory Storage
config :swoosh, local: false

View File

@ -12,12 +12,12 @@ import Config
# If you use `mix release`, you need to explicitly enable the server
# by passing the PHX_SERVER=true when you start it:
#
# PHX_SERVER=true bin/modern_base start
# PHX_SERVER=true bin/slide_life start
#
# Alternatively, you can use `mix phx.gen.release` to generate a `bin/server`
# script that automatically sets the env var above.
if System.get_env("PHX_SERVER") do
config :modern_base, ModernBaseWeb.Endpoint, server: true
config :slide_life, SlideLifeWeb.Endpoint, server: true
end
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: []
config :modern_base, ModernBase.Repo,
config :slide_life, SlideLife.Repo,
# ssl: true,
url: database_url,
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"
port = String.to_integer(System.get_env("PORT") || "4000")
config :modern_base, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
config :slide_life, :dns_cluster_query, System.get_env("DNS_CLUSTER_QUERY")
config :modern_base, ModernBaseWeb.Endpoint,
config :slide_life, SlideLifeWeb.Endpoint,
url: [host: host, port: 443, scheme: "https"],
http: [
# 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 your endpoint configuration:
#
# config :modern_base, ModernBaseWeb.Endpoint,
# config :slide_life, SlideLifeWeb.Endpoint,
# https: [
# ...,
# port: 443,
@ -92,7 +92,7 @@ if config_env() == :prod do
# We also recommend setting `force_ssl` in your config/prod.exs,
# ensuring no data is ever sent via http, always redirecting to https:
#
# config :modern_base, ModernBaseWeb.Endpoint,
# config :slide_life, SlideLifeWeb.Endpoint,
# force_ssl: [hsts: true]
#
# 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
# are not using SMTP. Here is an example of the configuration:
#
# config :modern_base, ModernBase.Mailer,
# config :slide_life, SlideLife.Mailer,
# adapter: Swoosh.Adapters.Mailgun,
# api_key: System.get_env("MAILGUN_API_KEY"),
# domain: System.get_env("MAILGUN_DOMAIN")

View File

@ -5,23 +5,23 @@ import Config
# 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 :modern_base, ModernBase.Repo,
config :slide_life, SlideLife.Repo,
username: "postgres",
password: "postgres",
hostname: "localhost",
database: "modern_base_test#{System.get_env("MIX_TEST_PARTITION")}",
database: "slide_life_test#{System.get_env("MIX_TEST_PARTITION")}",
pool: Ecto.Adapters.SQL.Sandbox,
pool_size: System.schedulers_online() * 2
# We don't run a server during test. If one is required,
# you can enable the server option below.
config :modern_base, ModernBaseWeb.Endpoint,
config :slide_life, SlideLifeWeb.Endpoint,
http: [ip: {127, 0, 0, 1}, port: 4002],
secret_key_base: "Nrp7SlEOymCdvtNm/jLvYBfD9l+FZqQHTitjkVafLgxH22SEQXx3w2kjON2KsYFa",
server: false
# In test we don't send emails.
config :modern_base, ModernBase.Mailer, adapter: Swoosh.Adapters.Test
config :slide_life, SlideLife.Mailer, adapter: Swoosh.Adapters.Test
# Disable swoosh api client as it is only required for production adapters.
config :swoosh, :api_client, false