-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfly.toml
More file actions
81 lines (72 loc) · 2.2 KB
/
Copy pathfly.toml
File metadata and controls
81 lines (72 loc) · 2.2 KB
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
75
76
77
78
79
80
81
# Define the application name. This must be unique on Fly.io.
app = "fastside"
primary_region = "arn"
# Specify that we are deploying from a pre-built Docker image, not building from source.
[build]
image = "ghcr.io/cofob/fastside"
# Define the command to run when the machine starts.
# This replaces the Dockerfile's CMD.
[processes]
app = "/bin/fastside --log-level error --config /config/config.yml serve --skip-wait -l 0.0.0.0:8080"
# This section creates files inside the container at runtime.
# Here, we are creating the /config/config.yml file with your specified content.
[[files]]
guest_path = "/config/config.yml"
raw_value = """
default_user_config:
required_tags:
- "clearnet"
- "https"
- "ipv4"
forbidden_tags:
- "cloudflare"
proxies:
tor:
url: socks5h://hidden-services._peer.internal:9100
i2p:
url: http://hidden-services._peer.internal:4444
crawler:
request_timeout:
secs: 10
nanos: 0
domain_request_timeouts:
- domain: ".i2p"
timeout:
secs: 60
nanos: 0
- domain: ".onion"
timeout:
secs: 60
nanos: 0
"""
# Configure the machine size and memory.
# 'shared-cpu-1x' is the smallest CPU size.
[machines]
size = "shared-cpu-1x"
memory_mb = 256
# Service configuration defines how the application is exposed to the internet.
[[services]]
protocol = "tcp"
internal_port = 8080 # The port your app listens on inside the container
processes = ["app"] # This service runs the 'app' process defined above
# Machines can be stopped and started automatically because of the ping data file.
auto_stop_machines = "suspend"
auto_start_machines = true
min_machines_running = 1
# Define the external ports and handlers.
[[services.ports]]
port = 80
handlers = ["http"]
force_https = true # Redirect HTTP requests to HTTPS
[[services.ports]]
port = 443
handlers = ["tls", "http"]
# Health check to ensure the service is running correctly.
# Fly.io will restart the machine if these checks fail.
[services.http_checks]
interval = "15s"
timeout = "10s"
grace_period = "5s"
method = "get"
path = "/" # Assuming the root path returns a 2xx status code
protocol = "http"