From 7ac37c011351664948ae23f00a36e7431a00a6ba Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Tue, 5 May 2020 22:00:24 -0700 Subject: [PATCH 1/2] cloudfire -> fireguard --- README.md | 4 ++-- apps/cf_http/assets/css/phoenix.css | 2 +- apps/cf_http/lib/cf_http_web/plugs/authenticator.ex | 2 +- apps/cf_http/lib/cf_http_web/templates/layout/app.html.eex | 4 ++-- bin/bootstrap_fireguard_dev.sql | 5 +++++ config/dev.exs | 4 ++-- config/test.exs | 5 +++-- mix.exs | 4 ++-- vagrant/provision_deps.sh | 2 +- 9 files changed, 19 insertions(+), 13 deletions(-) create mode 100644 bin/bootstrap_fireguard_dev.sql diff --git a/README.md b/README.md index ed0c0a3cf..4216e158a 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ -![Test](https://github.com/CloudFire-LLC/cloudfire-ce/workflows/Test/badge.svg) +![Test](https://github.com/CloudFire-LLC/fireguard/workflows/Test/badge.svg) -# CloudFire +# FireGuard Under active development. Check back later. diff --git a/apps/cf_http/assets/css/phoenix.css b/apps/cf_http/assets/css/phoenix.css index 77346c1f3..8d1d79c27 100644 --- a/apps/cf_http/assets/css/phoenix.css +++ b/apps/cf_http/assets/css/phoenix.css @@ -61,7 +61,7 @@ select { margin: -1rem 0 2rem; } -/* Cloudfire promo and logo */ +/* FireGuard promo and logo */ .cf-hero { text-align: center; border-bottom: 1px solid #e3e3e3; diff --git a/apps/cf_http/lib/cf_http_web/plugs/authenticator.ex b/apps/cf_http/lib/cf_http_web/plugs/authenticator.ex index dc0446e53..19c661615 100644 --- a/apps/cf_http/lib/cf_http_web/plugs/authenticator.ex +++ b/apps/cf_http/lib/cf_http_web/plugs/authenticator.ex @@ -9,7 +9,7 @@ defmodule CfHttpWeb.Plugs.Authenticator do def init(default), do: default def call(conn, _default) do - user = %User{email: "dev_user@cloudfire.network"} + user = %User{email: "dev_user@fireguard.network"} assign(conn, :current_user, user) end end diff --git a/apps/cf_http/lib/cf_http_web/templates/layout/app.html.eex b/apps/cf_http/lib/cf_http_web/templates/layout/app.html.eex index ec77ce3f5..8a78b406d 100644 --- a/apps/cf_http/lib/cf_http_web/templates/layout/app.html.eex +++ b/apps/cf_http/lib/cf_http_web/templates/layout/app.html.eex @@ -4,7 +4,7 @@ - Cloudfire + FireGuard "/> <%= csrf_meta_tag() %> @@ -17,7 +17,7 @@ diff --git a/bin/bootstrap_fireguard_dev.sql b/bin/bootstrap_fireguard_dev.sql new file mode 100644 index 000000000..eb8ad3588 --- /dev/null +++ b/bin/bootstrap_fireguard_dev.sql @@ -0,0 +1,5 @@ +-- Execute this with your DB admin user +create role fireguard; +alter role fireguard with password 'postgres'; +alter role firegurd with login; +alter role fireguard with superuser; diff --git a/config/dev.exs b/config/dev.exs index 3a6b25010..5a9a44fff 100644 --- a/config/dev.exs +++ b/config/dev.exs @@ -2,9 +2,9 @@ import Config # Configure your database config :cf_http, CfHttp.Repo, - username: "cloudfire", + username: "fireguard", password: "postgres", - database: "cloudfire_dev", + database: "fireguard_dev", hostname: "localhost", show_sensitive_data_on_connection_error: true, pool_size: 10 diff --git a/config/test.exs b/config/test.exs index 847eb99f1..3144e9f0d 100644 --- a/config/test.exs +++ b/config/test.exs @@ -3,13 +3,14 @@ import Config defmodule DBConfig do def config(db_url) when is_nil(db_url) do [ - username: "postgres", + username: "fireguard", password: "postgres", - database: "cloudfire_test", + database: "fireguard_test", hostname: System.get_env("POSTGRES_HOST", "localhost"), pool: Ecto.Adapters.SQL.Sandbox ] end + def config(db_url) do [ url: db_url, diff --git a/mix.exs b/mix.exs index 28fb21de5..98ed83f66 100644 --- a/mix.exs +++ b/mix.exs @@ -1,6 +1,6 @@ -defmodule CloudfireUmbrella.MixProject do +defmodule FireguardUmbrella.MixProject do @moduledoc """ - Welcome to the CloudFire Elixir Umbrella Project + Welcome to the FireGuard Elixir Umbrella Project """ use Mix.Project diff --git a/vagrant/provision_deps.sh b/vagrant/provision_deps.sh index ad8ac7d62..f637cdb6d 100644 --- a/vagrant/provision_deps.sh +++ b/vagrant/provision_deps.sh @@ -2,7 +2,7 @@ set -e # This file provisions the vagrant vm with needed tools to develop -# and test a single-host CloudFire instance. +# and test a single-host FireGuard instance. # Add WireGuard PPA add-apt-repository ppa:wireguard/wireguard From 2a82bcbec0a563fdfb0261422b6891d08fb6ade1 Mon Sep 17 00:00:00 2001 From: Jamil Bou Kheir Date: Tue, 5 May 2020 22:04:53 -0700 Subject: [PATCH 2/2] Match test env --- .github/workflows/main.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2e5988429..97445bd7f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -18,6 +18,7 @@ jobs: ports: - 5432:5432 env: + POSTGRES_USER: fireguard POSTGRES_PASSWORD: postgres options: >- --health-cmd pg_isready