Update elixir.yml
This commit is contained in:
parent
f8fd8fe39f
commit
ab5fc4a077
13
.github/workflows/elixir.yml
vendored
13
.github/workflows/elixir.yml
vendored
@ -13,8 +13,6 @@ on:
|
|||||||
env:
|
env:
|
||||||
MIX_ENV: test
|
MIX_ENV: test
|
||||||
NODE_ID: aUniqueString
|
NODE_ID: aUniqueString
|
||||||
REDIS_HOST: redis
|
|
||||||
REDIS_PORT: 6379
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@ -22,17 +20,6 @@ jobs:
|
|||||||
# use Postgres. This creates a database for running tests.
|
# use Postgres. This creates a database for running tests.
|
||||||
# Additional services can be defined here if required.
|
# Additional services can be defined here if required.
|
||||||
services:
|
services:
|
||||||
# Label used to access the service container
|
|
||||||
redis:
|
|
||||||
# Docker Hub image
|
|
||||||
image: redis
|
|
||||||
# Set health checks to wait until redis has started
|
|
||||||
options: >-
|
|
||||||
--health-cmd "redis-cli ping"
|
|
||||||
--health-interval 10s
|
|
||||||
--health-timeout 5s
|
|
||||||
--health-retries 5
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
image: postgres:14
|
image: postgres:14
|
||||||
ports: ['5432:5432']
|
ports: ['5432:5432']
|
||||||
|
@ -5,3 +5,10 @@ config :chessh, Chessh.Repo,
|
|||||||
username: "postgres",
|
username: "postgres",
|
||||||
password: "postgres",
|
password: "postgres",
|
||||||
hostname: "localhost"
|
hostname: "localhost"
|
||||||
|
|
||||||
|
config :hammer,
|
||||||
|
backend: [
|
||||||
|
in_memory:
|
||||||
|
{Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]},
|
||||||
|
redis: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]}
|
||||||
|
]
|
||||||
|
@ -1,20 +1,5 @@
|
|||||||
import Config
|
import Config
|
||||||
|
|
||||||
config :hammer,
|
|
||||||
backend: [
|
|
||||||
in_memory:
|
|
||||||
{Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]},
|
|
||||||
redis:
|
|
||||||
{Hammer.Backend.Redis,
|
|
||||||
[
|
|
||||||
expiry_ms: 60_000 * 60 * 2,
|
|
||||||
redix_config: [
|
|
||||||
host: System.get_env("REDIS_HOST", "localhost"),
|
|
||||||
port: String.to_integer(System.get_env("REDIS_PORT", "6379"))
|
|
||||||
]
|
|
||||||
]}
|
|
||||||
]
|
|
||||||
|
|
||||||
config :chessh,
|
config :chessh,
|
||||||
port: String.to_integer(System.get_env("SSH_PORT", "42069"))
|
port: String.to_integer(System.get_env("SSH_PORT", "42069"))
|
||||||
|
|
||||||
@ -43,4 +28,19 @@ if config_env() == :prod do
|
|||||||
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"),
|
||||||
socket_options: maybe_ipv6
|
socket_options: maybe_ipv6
|
||||||
|
|
||||||
|
config :hammer,
|
||||||
|
backend: [
|
||||||
|
in_memory:
|
||||||
|
{Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]},
|
||||||
|
redis:
|
||||||
|
{Hammer.Backend.Redis,
|
||||||
|
[
|
||||||
|
expiry_ms: 60_000 * 60 * 2,
|
||||||
|
redix_config: [
|
||||||
|
host: System.get_env("REDIS_HOST", "redis"),
|
||||||
|
port: String.to_integer(System.get_env("REDIS_PORT", "6379"))
|
||||||
|
]
|
||||||
|
]}
|
||||||
|
]
|
||||||
end
|
end
|
||||||
|
@ -11,6 +11,13 @@ config :chessh, Chessh.Repo,
|
|||||||
hostname: "localhost",
|
hostname: "localhost",
|
||||||
pool: Ecto.Adapters.SQL.Sandbox
|
pool: Ecto.Adapters.SQL.Sandbox
|
||||||
|
|
||||||
|
config :hammer,
|
||||||
|
backend: [
|
||||||
|
in_memory:
|
||||||
|
{Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]},
|
||||||
|
redis: {Hammer.Backend.ETS, [expiry_ms: 60_000 * 60 * 4, cleanup_interval_ms: 60_000 * 10]}
|
||||||
|
]
|
||||||
|
|
||||||
config :chessh,
|
config :chessh,
|
||||||
port: 34_355,
|
port: 34_355,
|
||||||
key_dir: Path.join(Path.dirname(__DIR__), "priv/test_keys")
|
key_dir: Path.join(Path.dirname(__DIR__), "priv/test_keys")
|
||||||
|
Loading…
Reference in New Issue
Block a user