chore: add gitignore and build configuration
This commit is contained in:
commit
456e822464
5 files changed
+88
No files matched your search
@@ -0,0 +1,4 @@
|
||||
# Used by "mix format"
|
||||
[
|
||||
inputs: ["{mix,.formatter}.exs", "{config,lib,test}/**/*.{ex,exs}"]
|
||||
]
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
# The directory Mix will write compiled artifacts to.
|
||||
/_build/
|
||||
|
||||
# The directory Mix downloads your dependencies sources to.
|
||||
/deps/
|
||||
|
||||
# Compiled BEAM bytecode and archive artifacts.
|
||||
*.beam
|
||||
*.ez
|
||||
|
||||
# Package tarball built via "mix hex.build".
|
||||
excache-*.tar
|
||||
|
||||
# If you run "mix test --cover", coverage assets end up here.
|
||||
/cover/
|
||||
|
||||
# Where third-party dependencies like ExDoc output generated docs.
|
||||
/doc/
|
||||
|
||||
# ElixirLS language server workspace.
|
||||
.elixir_ls/
|
||||
|
||||
# If the VM crashes, it generates a dump, let's ignore it too.
|
||||
erl_crash.dump
|
||||
|
||||
# Runtime scratch space (AOF log and snapshot dumps written by tests).
|
||||
/tmp/
|
||||
|
||||
# OS, log, and local environment files.
|
||||
.DS_Store
|
||||
*.log
|
||||
.env
|
||||
@@ -0,0 +1,14 @@
|
||||
import Config
|
||||
|
||||
config :excache,
|
||||
shard_count: 8,
|
||||
sweep_interval: 1000,
|
||||
port: String.to_integer(System.get_env("EXCACHE_PORT") || "6379"),
|
||||
snapshot_path: System.get_env("EXCACHE_SNAPSHOT_PATH"),
|
||||
aof_path: System.get_env("EXCACHE_AOF_PATH"),
|
||||
aof_fsync: :everysec,
|
||||
keyspace_notifications: true
|
||||
|
||||
if File.exists?(Path.join(__DIR__, "#{config_env()}.exs")) do
|
||||
import_config "#{config_env()}.exs"
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
import Config
|
||||
|
||||
config :excache,
|
||||
port: nil,
|
||||
sweep_interval: 50
|
||||
@@ -0,0 +1,33 @@
|
||||
defmodule Excache.MixProject do
|
||||
use Mix.Project
|
||||
|
||||
def project do
|
||||
[
|
||||
app: :excache,
|
||||
version: "0.1.0",
|
||||
elixir: "~> 1.18",
|
||||
elixirc_paths: elixirc_paths(Mix.env()),
|
||||
start_permanent: Mix.env() == :prod,
|
||||
deps: deps()
|
||||
]
|
||||
end
|
||||
|
||||
defp elixirc_paths(:test), do: ["lib", "test/support"]
|
||||
defp elixirc_paths(_env), do: ["lib"]
|
||||
|
||||
# Run "mix help compile.app" to learn about applications.
|
||||
def application do
|
||||
[
|
||||
extra_applications: [:logger],
|
||||
mod: {Excache.Application, []}
|
||||
]
|
||||
end
|
||||
|
||||
# Run "mix help deps" to learn about dependencies.
|
||||
defp deps do
|
||||
[
|
||||
# {:dep_from_hexpm, "~> 0.3.0"},
|
||||
# {:dep_from_git, git: "https://github.com/elixir-lang/my_dep.git", tag: "0.1.0"}
|
||||
]
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user