Skip to content

Commit 1b3c66c

Browse files
authored
Merge pull request #226 from CaptainFact/ops/elixir-release
Move to mix release
2 parents f74dff6 + a8b6d87 commit 1b3c66c

File tree

36 files changed

+471
-218
lines changed

36 files changed

+471
-218
lines changed

.github/workflows/e2e.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ jobs:
4646
run: mix ecto.create && mix ecto.migrate
4747
- name: Start API
4848
run: iex -S mix run &
49+
- uses: actions/setup-node@v1
4950
- name: Checkout Frontend
5051
uses: actions/checkout@v2
5152
with:
@@ -57,7 +58,7 @@ jobs:
5758
id: node-modules
5859
with:
5960
path: captain-fact-frontend/node_modules
60-
key: ${{ runner.os }}-node-modules-${{ hashFiles('captain-fact-frontend/package-lock.json') }}
61+
key: ${{ runner.os }}-node_modules-${{ hashFiles('captain-fact-frontend/package-lock.json') }}
6162
- name: Install Frontend's dependencies
6263
working-directory: captain-fact-frontend
6364
run: npm ci --prefer-offline --no-audit

.github/workflows/release.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
_build
22
deps
3+
erl_crash.dump
34

45
# Local uploads
56
dev/resources

.tool-versions

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
erlang 21.0
2-
elixir 1.6-otp-21
1+
erlang 22.2.7
2+
elixir 1.10.1

apps/cf_atom_feed/config/config.exs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@ config :cf_atom_feed,
1010
namespace: CF.AtomFeed,
1111
ecto_repos: [DB.Repo]
1212

13-
config :cf_atom_feed,
14-
CF.AtomFeed.Router,
15-
cowboy: [port: 4004]
16-
1713
# Configures Elixir's Logger
1814
config :logger, :console,
1915
format: "$time $metadata[$level] $message\n",

apps/cf_atom_feed/config/dev.exs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@ use Mix.Config
22

33
# Do not include metadata nor timestamps in development logs
44
config :logger, :console, format: "[$level] $message\n"
5+
6+
config :cf_atom_feed,
7+
CF.AtomFeed.Router,
8+
cowboy: [port: 4004]

apps/cf_atom_feed/config/prod.exs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
use Mix.Config
22

3-
config :cf_atom_feed, CF.AtomFeed.Router, cowboy: [port: 80]
4-
53
# Do not print debug messages in production
64
config :logger, level: :info

apps/cf_atom_feed/lib/application.ex

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,12 @@ defmodule CF.AtomFeed.Application do
66
def start(_type, _args) do
77
import Supervisor.Spec
88

9-
# Define workers and child supervisors to be supervised
10-
children = [
11-
# Start the endpoint when the application starts
12-
supervisor(CF.AtomFeed.Router, [])
13-
]
9+
children = []
10+
config = Application.get_env(:cf_atom_feed, CF.AtomFeed.Router)
11+
12+
if config[:cowboy] do
13+
children = [supervisor(CF.AtomFeed.Router, []) | children]
14+
end
1415

1516
# See https://hexdocs.pm/elixir/Supervisor.html
1617
# for other strategies and supported options

apps/cf_graphql/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,5 @@ Following secrets must be configured in production:
88
- db_username
99
- db_password
1010
- db_name
11-
- basic_auth_password
1211
- frontend_url
1312
- host

apps/cf_graphql/config/config.exs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ use Mix.Config
99
config :cf_graphql,
1010
namespace: CF.Graphql,
1111
ecto_repos: [DB.Repo],
12-
env: Mix.env(),
13-
basic_auth: [
14-
username: "captain",
15-
password: "SetAtRuntime",
16-
realm: "GraphiQL Public Endpoint"
17-
]
12+
env: Mix.env()
1813

1914
# Configures the endpoint
2015
config :cf_graphql, CF.GraphQLWeb.Endpoint,

0 commit comments

Comments
 (0)