Skip to content
This repository has been archived by the owner on Oct 22, 2023. It is now read-only.

Commit

Permalink
Merge pull request #3 from 3n3a/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
3n3a authored Aug 23, 2022
2 parents 3731ca4 + 51b31f0 commit 4b99ed7
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
7 changes: 7 additions & 0 deletions deployment/dev/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@ services:
networks:
- pg-net

httpbin:
image: kennethreitz/httpbin
ports:
- "5481:80"
networks:
- pg-net

networks:
pg-net:
external: true
Expand Down
3 changes: 1 addition & 2 deletions deployment/prod/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
version: '3'
services:
webserver:
image: 3n3a/manager:2.0.1
# command: eval "ManagerWeb.Release.migrate"
image: 3n3a/manager:2.0.11
depends_on:
- db
environment:
Expand Down
4 changes: 2 additions & 2 deletions manager_umbrella/apps/manager_web/lib/webhook_adapter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ defmodule WebhookAdapter do
url = System.get_env("WEBHOOK_URL", "please_configure_url")
api_key = System.get_env("WEBHOOK_KEY", "please_configure_key")

body = %{"part" => part}
body = %{"part" => part, "key" => api_key}
result = Jason.encode!(body)

options = [{"X-API-KEY", api_key}, {"Content-Type", "application/json"}]
options = [{"Content-Type", "application/json"}]

HTTPoison.start
{:ok, response} = HTTPoison.post!(url, result, options)
Expand Down
16 changes: 16 additions & 0 deletions manager_umbrella/start_dev.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash

#
# Start Dev Server
#

# Start Docker
(cd ../deployment/dev && ./start.sh)

# Start Phoenix Dev Server
export WEBHOOK_URL="http://localhost:5481" # httpbin
export WEBHOOK_KEY="1234"

mix deps.get
mix ecto.migrate
mix phx.server

0 comments on commit 4b99ed7

Please sign in to comment.