Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Clivern committed Feb 4, 2024
1 parent 37478ad commit 5e66ac5
Show file tree
Hide file tree
Showing 132 changed files with 487 additions and 480 deletions.
8 changes: 4 additions & 4 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# App Configs
APP_NAME=Campfire
APP_NAME=Brangus
APP_PORT=4000
APP_SECRET=76b3tsME0Sixg04dlGsxx48vhJz5EZndgXTUly32vxpsgifl5J/QDZRfe/zv0WSR
APP_HOST=localhost
APP_HTTP_SCHEMA=http

# Database Configs
DB_USERNAME=campfire
DB_PASSWORD=campfire
DB_USERNAME=brangus
DB_PASSWORD=brangus
DB_HOSTNAME=localhost
DB_DATABASE=campfire_dev
DB_DATABASE=brangus_dev
DB_PORT=5432
DB_SSL=off
DB_CA_CERTFILE_PATH=
12 changes: 6 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
image: postgres:latest
ports: ['5432:5432']
env:
POSTGRES_DB: campfire_dev
POSTGRES_USER: campfire
POSTGRES_PASSWORD: campfire
POSTGRES_DB: brangus_dev
POSTGRES_USER: brangus
POSTGRES_PASSWORD: brangus
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
Expand All @@ -42,14 +42,14 @@ jobs:
- name: Get Dependencies
run: make deps

- name: Check Campfire Format
- name: Check Brangus Format
run: make fmt_check

- name: Get Version
run: make v

- name: Test Campfire
- name: Test Brangus
run: make ci

- name: Build Campfire
- name: Build Brangus
run: make build
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ erl_crash.dump
*.ez

# Ignore package tarball (built via "mix hex.build").
campfire-*.tar
brangus-*.tar

# Ignore assets that are produced by build tools.
/priv/static/assets/
Expand All @@ -32,8 +32,8 @@ campfire-*.tar
npm-debug.log
/assets/node_modules/

campfire_test*
campfire_dev*
brangus_test*
brangus_dev*
.vscode

.terraform
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ iex ?= iex

help: Makefile
@echo
@echo " Choose a command run in Campfire:"
@echo " Choose a command run in Brangus:"
@echo
@sed -n 's/^##//p' $< | column -t -s ':' | sed -e 's/^/ /'
@echo
Expand Down Expand Up @@ -68,10 +68,10 @@ migrate:
@$(mix) ecto.setup


## run: Run campfire
## run: Run brangus
.PHONY: run
run:
@echo ">> ============= Run campfire ============= <<"
@echo ">> ============= Run brangus ============= <<"
@$(mix) phx.server


Expand Down
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<p align="center">
<img alt="Campfire Logo" src="/assets/img/logo.png?v=0.4.0" width="250" />
<h3 align="center">Campfire</h3>
<img alt="Brangus Logo" src="/assets/img/logo.png?v=0.4.0" width="250" />
<h3 align="center">Brangus</h3>
<p align="center">A Fast, Secure and Reliable Terraform Backend, Set up in Minutes.</p>
<p align="center">
<a href="https://github.com/Clivern/Campfire/actions/workflows/ci.yml">
<img src="https://github.com/Clivern/Campfire/actions/workflows/ci.yml/badge.svg"/>
<a href="https://github.com/Clivern/Brangus/actions/workflows/ci.yml">
<img src="https://github.com/Clivern/Brangus/actions/workflows/ci.yml/badge.svg"/>
</a>
<a href="https://github.com/Clivern/Campfire/releases">
<a href="https://github.com/Clivern/Brangus/releases">
<img src="https://img.shields.io/badge/Version-0.4.0-1abc9c.svg">
</a>
<a href="https://github.com/Clivern/Campfire/blob/master/LICENSE">
<a href="https://github.com/Clivern/Brangus/blob/master/LICENSE">
<img src="https://img.shields.io/badge/LICENSE-MIT-orange.svg">
</a>
</p>
Expand Down Expand Up @@ -54,9 +54,9 @@ To run `postgresql` with `docker`

```zsh
$ docker run -itd \
-e POSTGRES_USER=campfire \
-e POSTGRES_PASSWORD=campfire \
-e POSTGRES_DB=campfire_dev \
-e POSTGRES_USER=brangus \
-e POSTGRES_PASSWORD=brangus \
-e POSTGRES_DB=brangus_dev \
-p 5432:5432 \
--name postgresql \
postgres:15.2
Expand All @@ -65,19 +65,19 @@ $ docker run -itd \

### Versioning

For transparency into our release cycle and in striving to maintain backward compatibility, `Campfire` is maintained under the [Semantic Versioning guidelines](https://semver.org/) and release process is predictable and business-friendly.
For transparency into our release cycle and in striving to maintain backward compatibility, `Brangus` is maintained under the [Semantic Versioning guidelines](https://semver.org/) and release process is predictable and business-friendly.

See the [Releases section of our GitHub project](https://github.com/clivern/campfire/releases) for changelogs for each release version of `Campfire`. It contains summaries of the most noteworthy changes made in each release. Also see the [Milestones section](https://github.com/clivern/campfire/milestones) for the future roadmap.
See the [Releases section of our GitHub project](https://github.com/clivern/brangus/releases) for changelogs for each release version of `Brangus`. It contains summaries of the most noteworthy changes made in each release. Also see the [Milestones section](https://github.com/clivern/brangus/milestones) for the future roadmap.


### Bug tracker

If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/campfire/issues
If you have any suggestions, bug reports, or annoyances please report them to our issue tracker at https://github.com/clivern/brangus/issues


### Security Issues

If you discover a security vulnerability within `Campfire`, please send an email to [[email protected]](mailto:[email protected])
If you discover a security vulnerability within `Brangus`, please send an email to [[email protected]](mailto:[email protected])


### Contributing
Expand All @@ -89,4 +89,4 @@ We are an open source, community-driven project so please feel free to join us.

© 2022, Clivern. Released under [MIT License](https://opensource.org/licenses/mit-license.php).

**Campfire** is authored and maintained by [@clivern](http://github.com/clivern).
**Brangus** is authored and maintained by [@clivern](http://github.com/clivern).
10 changes: 5 additions & 5 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ window.liveSocket = liveSocket

import socket from "./user_socket"

var campfire_app = campfire_app || {};
var brangus_app = brangus_app || {};

// Install Page
campfire_app.install_screen = (Vue, axios, $) => {
brangus_app.install_screen = (Vue, axios, $) => {

return new Vue({
delimiters: ['${', '}'],
Expand Down Expand Up @@ -92,7 +92,7 @@ campfire_app.install_screen = (Vue, axios, $) => {
}

// Login Page
campfire_app.login_screen = (Vue, axios, $) => {
brangus_app.login_screen = (Vue, axios, $) => {

return new Vue({
delimiters: ['${', '}'],
Expand Down Expand Up @@ -144,15 +144,15 @@ $(document).ready(() => {
};

if (document.getElementById("app_install")) {
campfire_app.install_screen(
brangus_app.install_screen(
Vue,
axios,
$
);
}

if (document.getElementById("app_login")) {
campfire_app.login_screen(
brangus_app.login_screen(
Vue,
axios,
$
Expand Down
8 changes: 4 additions & 4 deletions assets/js/user_socket.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Bring in Phoenix channels client library:
import {Socket} from "phoenix"

// And connect to the path in "lib/campfire_web/endpoint.ex". We pass the
// And connect to the path in "lib/brangus_web/endpoint.ex". We pass the
// token for authentication. Read below how it should be used.
let socket = new Socket("/socket", {params: {token: window.userToken}})

Expand All @@ -14,7 +14,7 @@ let socket = new Socket("/socket", {params: {token: window.userToken}})
// If the current user exists you can assign the user's token in
// the connection for use in the layout.
//
// In your "lib/campfire_web/router.ex":
// In your "lib/brangus_web/router.ex":
//
// pipeline :browser do
// ...
Expand All @@ -32,12 +32,12 @@ let socket = new Socket("/socket", {params: {token: window.userToken}})
// end
//
// Now you need to pass this token to JavaScript. You can do so
// inside a script tag in "lib/campfire_web/templates/layout/app.html.heex":
// inside a script tag in "lib/brangus_web/templates/layout/app.html.heex":
//
// <script>window.userToken = "<%= assigns[:user_token] %>";</script>
//
// You will need to verify the user token in the "connect/3" function
// in "lib/campfire_web/channels/user_socket.ex":
// in "lib/brangus_web/channels/user_socket.ex":
//
// def connect(%{"token" => token}, socket, _connect_info) do
// # max_age: 1209600 is equivalent to two weeks in seconds
Expand Down
12 changes: 6 additions & 6 deletions config/config.exs
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
# General application configuration
import Config

config :campfire,
ecto_repos: [Campfire.Repo]
config :brangus,
ecto_repos: [Brangus.Repo]

# Configures the endpoint
config :campfire, CampfireWeb.Endpoint,
config :brangus, BrangusWeb.Endpoint,
url: [host: System.get_env("APP_HOST") || "localhost"],
render_errors: [view: CampfireWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Campfire.PubSub,
render_errors: [view: BrangusWeb.ErrorView, accepts: ~w(html json), layout: false],
pubsub_server: Brangus.PubSub,
live_view: [signing_salt: "/FQ30bq7"]

# Configures the mailer
Expand All @@ -24,7 +24,7 @@ config :campfire, CampfireWeb.Endpoint,
#
# For production it's recommended to configure a different adapter
# at the `config/runtime.exs`.
config :campfire, Campfire.Mailer, adapter: Swoosh.Adapters.Local
config :brangus, Brangus.Mailer, adapter: Swoosh.Adapters.Local

# Swoosh API client is needed for adapters other than SMTP.
config :swoosh, :api_client, false
Expand Down
28 changes: 14 additions & 14 deletions config/dev.exs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import Config

# Configure your database
if System.get_env("DB_SSL") || "off" == "on" do
config :campfire, Campfire.Repo,
username: System.get_env("DB_USERNAME") || "campfire",
password: System.get_env("DB_PASSWORD") || "campfire",
config :brangus, Brangus.Repo,
username: System.get_env("DB_USERNAME") || "brangus",
password: System.get_env("DB_PASSWORD") || "brangus",
hostname: System.get_env("DB_HOSTNAME") || "localhost",
database: System.get_env("DB_DATABASE") || "campfire_dev",
database: System.get_env("DB_DATABASE") || "brangus_dev",
port: String.to_integer(System.get_env("DB_PORT") || "5432"),
maintenance_database: System.get_env("DB_DATABASE") || "campfire_dev",
maintenance_database: System.get_env("DB_DATABASE") || "brangus_dev",
stacktrace: true,
show_sensitive_data_on_connection_error: true,
pool_size: String.to_integer(System.get_env("DB_POOL_SIZE") || "10"),
Expand All @@ -22,13 +22,13 @@ if System.get_env("DB_SSL") || "off" == "on" do
cacertfile: System.get_env("DB_CA_CERTFILE_PATH") || ""
]
else
config :campfire, Campfire.Repo,
username: System.get_env("DB_USERNAME") || "campfire",
password: System.get_env("DB_PASSWORD") || "campfire",
config :brangus, Brangus.Repo,
username: System.get_env("DB_USERNAME") || "brangus",
password: System.get_env("DB_PASSWORD") || "brangus",
hostname: System.get_env("DB_HOSTNAME") || "localhost",
database: System.get_env("DB_DATABASE") || "campfire_dev",
database: System.get_env("DB_DATABASE") || "brangus_dev",
port: String.to_integer(System.get_env("DB_PORT") || "5432"),
maintenance_database: System.get_env("DB_DATABASE") || "campfire_dev",
maintenance_database: System.get_env("DB_DATABASE") || "brangus_dev",
stacktrace: true,
show_sensitive_data_on_connection_error: true,
pool_size: String.to_integer(System.get_env("DB_POOL_SIZE") || "10")
Expand All @@ -41,7 +41,7 @@ end
# The watchers configuration can be used to run external
# watchers to your application. For example, we use it
# with esbuild to bundle .js and .css sources.
config :campfire, CampfireWeb.Endpoint,
config :brangus, BrangusWeb.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: String.to_integer(System.get_env("APP_PORT") || "4000")],
Expand Down Expand Up @@ -79,13 +79,13 @@ config :campfire, CampfireWeb.Endpoint,
# different ports.

# Watch static and templates for browser reloading.
config :campfire, CampfireWeb.Endpoint,
config :brangus, BrangusWeb.Endpoint,
live_reload: [
patterns: [
~r"priv/static/.*(js|css|png|jpeg|jpg|gif|svg)$",
~r"priv/gettext/.*(po)$",
~r"lib/campfire_web/(live|views)/.*(ex)$",
~r"lib/campfire_web/templates/.*(eex)$"
~r"lib/brangus_web/(live|views)/.*(ex)$",
~r"lib/brangus_web/templates/.*(eex)$"
]
]

Expand Down
6 changes: 3 additions & 3 deletions config/prod.exs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Config
# manifest is generated by the `mix phx.digest` task,
# which you should run after static files are built and
# before starting your production server.
config :campfire, CampfireWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"
config :brangus, BrangusWeb.Endpoint, cache_static_manifest: "priv/static/cache_manifest.json"

# Do not print debug messages in production
config :logger, level: :info
Expand All @@ -23,7 +23,7 @@ config :logger, level: :info
# To get SSL working, you will need to add the `https` key
# to the previous section and set your `:url` port to 443:
#
# config :campfire, CampfireWeb.Endpoint,
# config :brangus, BrangusWeb.Endpoint,
# ...,
# url: [host: "example.com", port: 443],
# https: [
Expand All @@ -47,7 +47,7 @@ config :logger, level: :info
# We also recommend setting `force_ssl` in your endpoint, ensuring
# no data is ever sent via http, always redirecting to https:
#
# config :campfire, CampfireWeb.Endpoint,
# config :brangus, BrangusWeb.Endpoint,
# force_ssl: [hsts: true]
#
# Check `Plug.SSL` for all available options in `force_ssl`.
Loading

0 comments on commit 5e66ac5

Please sign in to comment.