-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
decouple indexer and web services (#517)
* decouple indexer and web * production * production * fix web deploy * publish database schema name * deploy on main * delete staging toml
- Loading branch information
Showing
8 changed files
with
203 additions
and
219 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
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,56 +1,64 @@ | ||
app = "indexer-production" | ||
primary_region = "den" | ||
kill_signal = "SIGINT" | ||
kill_timeout = 5 | ||
# fly.toml app configuration file generated for indexer-v2 on 2024-03-26T14:50:51+07:00 | ||
# | ||
# See https://fly.io/docs/reference/configuration/ for information about how to use this file. | ||
# | ||
|
||
app = 'indexer-v2' | ||
primary_region = 'den' | ||
kill_signal = 'SIGINT' | ||
kill_timeout = '5s' | ||
|
||
[experimental] | ||
auto_rollback = true | ||
|
||
[build] | ||
|
||
[deploy] | ||
wait_timeout = "60m" | ||
|
||
[env] | ||
PORT = "8080" | ||
DEPLOYMENT_ENVIRONMENT = "production" | ||
LOG_LEVEL = "debug" | ||
STORAGE_DIR = "/mnt/indexer" | ||
INDEXED_CHAINS = "mainnet,optimism,fantom,pgn-testnet,pgn-mainnet,arbitrum,arbitrum-goerli,polygon-mumbai,polygon,goerli,sepolia,avalanche,avalanche-fuji" | ||
ENABLE_RESOURCE_MONITOR = "true" | ||
NODE_OPTIONS="--max-old-space-size=7168" | ||
# BUILD_TAG = # set in deploy github action | ||
DEPLOYMENT_ENVIRONMENT = 'production' | ||
ENABLE_RESOURCE_MONITOR = 'true' | ||
INDEXED_CHAINS = 'scroll' | ||
LOG_LEVEL = 'debug' | ||
NODE_OPTIONS = '--max-old-space-size=4096' | ||
PORT = '8080' | ||
STORAGE_DIR = '/mnt/indexer' | ||
|
||
[processes] | ||
web = "npm start" | ||
indexer = 'npm start -- --indexer --http' | ||
web = 'npm start -- --http --http-wait-for-sync=false' | ||
|
||
[mounts] | ||
source="indexer_production" | ||
destination="/mnt/indexer" | ||
[[mounts]] | ||
source = 'indexer_staging' | ||
destination = '/mnt/indexer' | ||
initial_size = "50gb" | ||
processes = ["indexer", "web"] | ||
|
||
[[services]] | ||
protocol = "tcp" | ||
[http_service] | ||
internal_port = 8080 | ||
processes = ["web"] | ||
|
||
[[services.ports]] | ||
port = 80 | ||
handlers = ["http"] | ||
force_https = true | ||
force_https = true | ||
auto_stop_machines = true | ||
auto_start_machines = true | ||
min_machines_running = 1 | ||
processes = ['web'] | ||
[http_service.concurrency] | ||
type = "requests" | ||
soft_limit = 200 | ||
hard_limit = 250 | ||
|
||
[[services.ports]] | ||
port = 443 | ||
handlers = ["tls", "http"] | ||
|
||
[services.concurrency] | ||
type = "connections" | ||
hard_limit = 100 | ||
soft_limit = 20 | ||
|
||
[[services.tcp_checks]] | ||
interval = "30s" | ||
[checks] | ||
[checks.http] | ||
grace_period = "30s" | ||
interval = "15s" | ||
method = "get" | ||
path = '/api/v1/status' | ||
port = 8080 | ||
timeout = "10s" | ||
grace_period = "1m" | ||
type = "http" | ||
processes = ['web', 'indexer'] | ||
|
||
[[services.http_checks]] | ||
interval = "60s" | ||
grace_period = "1m" | ||
timeout = "5s" | ||
method = "get" | ||
path = "/api/v1/status" | ||
protocol = "http" | ||
[[vm]] | ||
memory = '4gb' | ||
cpu_kind = 'performance' | ||
cpus = 2 |
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.