1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#:schema https://raw.githubusercontent.com/OlofBlomqvist/odd-box/main/odd-box-schema-v3.0.json
# ======================================================================================================
# This is an initial odd-box configuration file, it was generated using the './odd-box --init' command.
# It contains a very basic setup of all three types of services that odd-box can provide.
# For simplicity, this file should be named odd-box.toml so that odd-box can find it automatically
# when you run the './odd-box' command.
#
# More information about which settings are available can be found at
# https://github.com/OlofBlomqvist/odd-box
# ======================================================================================================
# Global settings
= "V3"
= "0.0.0.0"
= 8080
= 4343
= "odd-box.localhost"
= "very-secret"
# ======================================================================================================
# This serves the directory where this file is located on the dir.localtest.me domain.
[[]]
= "dir.localtest.me"
= "$cfg_dir"
# This sets up a basic reverse proxy to lobste.rs which you can reach thru the lobsters.localtest.me domain
[[]]
= "lobsters.localtest.me"
= [
{ = "lobste.rs", = 443, = true }
]
# This will spin up a python http server in the root directory of the config file (where this file is) -
# you can reach it thru the py.localtest.me domain.
[[]]
= "py.localtest.me"
= "python"
= false
= ["-m", "http.server", "$port"]
# Example for running a docker container
[[]]
= "nginx.localhost"
= "podman"
= false
= [
"run",
"--replace",
"--quiet",
"-p$port:80", # incoming $port is handled by odd-box
"--name",
"odd-nginx",
"nginx" # <-- image name
]
# Hosting caddy with a caddyfile
[[]]
= "caddy.localtest.me"
= 9999
= "caddy"
= false
= ["H2","H2CPK"]
= [
"run",
"--config",
"./CaddyTest1",
"--adapter",
"caddyfile"
]
# oh and you can ofc also host processes that dont actually listen to a port
# but you just want to keep running :)