-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
112 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
site/ | ||
*html | ||
src/hosts/*png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#+TITLE: Hosts | ||
|
||
- [[file:oddtaxi.org][Odd Taxi]] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,88 @@ | ||
#+TITLE: Odd Taxi | ||
#+AUTHOR: Will S. Medrano | ||
|
||
* Overview | ||
:PROPERTIES: | ||
:CUSTOM_ID: Overview-1nni0vb0x7k0 | ||
:END: | ||
|
||
~oddtaxi~ is the main entry point to [[https://www.wmedrano.dev][wmedrano.dev]]. Requests from port | ||
~80~ (http) and ~443~ (https) are intercepted by Caddy to either: | ||
|
||
- Serve a static file. | ||
- Reroute request to another job. | ||
|
||
#+BEGIN_SRC dot :file oddtaxi.png | ||
digraph oddtaxi { | ||
node[shape=record]; | ||
blog -> caddy -> public_internet; | ||
prometheus -> caddy; | ||
} | ||
#+END_SRC | ||
|
||
#+RESULTS: | ||
[[file:oddtaxi.png]] | ||
|
||
* Configs | ||
:PROPERTIES: | ||
:CUSTOM_ID: Configs-whg458d0x7k0 | ||
:END: | ||
|
||
** Caddy | ||
:PROPERTIES: | ||
:CUSTOM_ID: ConfigsCaddy-g8j458d0x7k0 | ||
:END: | ||
|
||
#+BEGIN_SRC caddyfile :file /etc/caddy/Caddyfile :tangle yes | ||
# Static files | ||
wmedrano.dev { | ||
root * /home/hiroshi/wmedrano.dev/src | ||
file_server | ||
} | ||
www.wmedrano.dev { | ||
root * /home/hiroshi/wmedrano.dev/src | ||
file_server | ||
} | ||
|
||
# Prometheus | ||
status.wmedrano.dev { | ||
basicauth { | ||
hiroshi $2a$14$gNmaQXMSBIbDkTyw5JgSPeWS1b99ueVHNiBNBzhk.y2YZ3yxYsHhq | ||
} | ||
reverse_proxy localhost:9090 | ||
} | ||
|
||
# Serve Caddy prometheus metrics through localhost:21894. | ||
:21894 { | ||
metrics | ||
} | ||
#+END_SRC | ||
|
||
** Prometheus | ||
:PROPERTIES: | ||
:CUSTOM_ID: ConfigsPrometheus-ywk458d0x7k0 | ||
:END: | ||
|
||
#+BEGIN_SRC yaml :file /etc/prometheus/prometheus.yml :tangle yes | ||
global: | ||
# Set the scrape interval to every 15 seconds. Default is every 1 minute. | ||
scrape_interval: 15s | ||
# Evaluate rules every 15 seconds. The default is every 1 minute. | ||
evaluation_interval: 15s | ||
external_labels: | ||
monitor: 'oddtaxi' | ||
alerting: | ||
alertmanagers: | ||
- static_configs: | ||
- targets: ['localhost:9093'] | ||
scrape_configs: | ||
- job_name: prometheus | ||
static_configs: | ||
- targets: ['localhost:9090'] | ||
- job_name: node | ||
static_configs: | ||
- targets: ['localhost:9100'] | ||
- job_name: caddy | ||
static_configs: | ||
- targets: ['localhost:21894'] | ||
#+END_SRC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,6 @@ body { | |
padding: 1rem; | ||
font-family: verdana, sans; | ||
} | ||
a { | ||
text-decoration: none; | ||
} |