diff --git a/infrastructure/bicep/container-apps/apps/deploy.sh b/infrastructure/bicep/container-apps/apps/deploy.sh index 6bd2787833..464d0e61e7 100755 --- a/infrastructure/bicep/container-apps/apps/deploy.sh +++ b/infrastructure/bicep/container-apps/apps/deploy.sh @@ -20,8 +20,12 @@ environmentOptions=("loc" "dev" "prd") # "jdta": JuiceDollar Testnet API # "jdtd": JuiceDollar Testnet dApp # "jdtm": JuiceDollar Testnet Monitoring +# "jdmp": JuiceDollar Mainnet Ponder +# "jdma": JuiceDollar Mainnet API +# "jdmd": JuiceDollar Mainnet dApp +# "jdmm": JuiceDollar Mainnet Monitoring # "rup": realUnit Ponder -appNameOptions=("fcp" "dep" "dea" "ded" "dem" "jsp" "jsw" "n8n" "jdtp" "jdta" "jdtd" "jdtm" "rup") +appNameOptions=("fcp" "dep" "dea" "ded" "dem" "jsp" "jsw" "n8n" "jdtp" "jdta" "jdtd" "jdtm" "jdmp" "jdma" "jdmd" "jdmm" "rup") # --- FUNCTIONS --- # selectOption() { diff --git a/infrastructure/bicep/container-apps/apps/parameters/dev-jdma.json b/infrastructure/bicep/container-apps/apps/parameters/dev-jdma.json new file mode 100644 index 0000000000..5ab1a2f67a --- /dev/null +++ b/infrastructure/bicep/container-apps/apps/parameters/dev-jdma.json @@ -0,0 +1,111 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "fileShareQuota": { + "value": 1 + }, + "containerImage": { + "value": "juicedollar-api:beta" + }, + "containerVolumeMounts": { + "value": [ + { + "volumeName": "volume", + "mountPath": "/app/.api" + } + ] + }, + "containerCPU": { + "value": "0.5" + }, + "containerMemory": { + "value": "1Gi" + }, + "containerMinReplicas": { + "value": 1 + }, + "containerMaxReplicas": { + "value": 1 + }, + "containerIngressTargetPort": { + "value": 3000 + }, + "containerIngressAdditionalPorts": { + "value": [] + }, + "containerProbes": { + "value": [] + }, + "containerEnv": { + "value": [ + { + "name": "API_ENVIRONMENT", + "value": "dev" + }, + { + "name": "LOG_LEVEL", + "value": "info" + }, + { + "name": "PORT", + "value": "3000" + }, + { + "name": "CONFIG_CHAIN", + "value": "mainnet" + }, + { + "name": "CONFIG_APP_URL", + "value": "https://dev.bapp.juicedollar.com" + }, + { + "name": "CONFIG_INDEXER_URL", + "value": "https://dev.ponder.juicedollar.com" + }, + { + "name": "COINGECKO_API_KEY", + "value": "[API-KEY]" + }, + { + "name": "RPC_URL_MAINNET", + "value": "https://rpc.juiceswap.com" + }, + { + "name": "TELEGRAM_BOT_TOKEN", + "value": "[API-KEY]" + }, + { + "name": "TELEGRAM_GROUPS_JSON", + "value": "/app/.api/telegram.groups.json" + }, + { + "name": "TWITTER_CLIENT_APP_KEY", + "value": "[TWITTER_CLIENT_APP_KEY]" + }, + { + "name": "TWITTER_CLIENT_APP_SECRET", + "value": "[TWITTER_CLIENT_APP_SECRET]" + }, + { + "name": "TWITTER_ACCESS_TOKEN", + "value": "[TWITTER_ACCESS_TOKEN]" + }, + { + "name": "TWITTER_ACCESS_SECRET", + "value": "[TWITTER_ACCESS_SECRET]" + }, + { + "name": "TWITTER_IMAGES_DIR", + "value": "/app/.api/images/twitter" + } + ] + }, + "containerCommand": { + "value": [] + }, + "containerArgs": { + "value": [] + } + } +} diff --git a/infrastructure/bicep/container-apps/apps/parameters/dev-jdmd.json b/infrastructure/bicep/container-apps/apps/parameters/dev-jdmd.json new file mode 100644 index 0000000000..451982393f --- /dev/null +++ b/infrastructure/bicep/container-apps/apps/parameters/dev-jdmd.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "fileShareQuota": { + "value": 1 + }, + "containerImage": { + "value": "juicedollar-dapp:beta" + }, + "containerVolumeMounts": { + "value": [] + }, + "containerCPU": { + "value": "0.5" + }, + "containerMemory": { + "value": "1Gi" + }, + "containerMinReplicas": { + "value": 1 + }, + "containerMaxReplicas": { + "value": 1 + }, + "containerIngressTargetPort": { + "value": 3000 + }, + "containerIngressAdditionalPorts": { + "value": [] + }, + "containerProbes": { + "value": [] + }, + "containerEnv": { + "value": [ + { + "name": "NEXT_PUBLIC_LANDINGPAGE_URL", + "value": "https://juicedollar.com" + }, + { + "name": "NEXT_PUBLIC_APP_URL", + "value": "https://dev.bapp.juicedollar.com" + }, + { + "name": "NEXT_PUBLIC_API_URL", + "value": "https://dev.api.juicedollar.com" + }, + { + "name": "NEXT_PUBLIC_PONDER_URL", + "value": "https://dev.ponder.juicedollar.com" + }, + { + "name": "NEXT_PUBLIC_WAGMI_ID", + "value": "[API-KEY]" + }, + { + "name": "NEXT_PUBLIC_CHAIN_NAME", + "value": "mainnet" + }, + { + "name": "NEXT_PUBLIC_RPC_URL_MAINNET", + "value": "https://rpc.juiceswap.com" + }, + { + "name": "NEXT_PUBLIC_RPC_URL_TESTNET", + "value": "https://rpc.testnet.juiceswap.com" + }, + { + "name": "NEXT_PUBLIC_PONDER_FALLBACK_URL", + "value": "https://dev.ponder.juicedollar.com" + } + ] + }, + "containerCommand": { + "value": [] + }, + "containerArgs": { + "value": [] + } + } +} diff --git a/infrastructure/bicep/container-apps/apps/parameters/dev-jdmm.json b/infrastructure/bicep/container-apps/apps/parameters/dev-jdmm.json new file mode 100644 index 0000000000..f257c57906 --- /dev/null +++ b/infrastructure/bicep/container-apps/apps/parameters/dev-jdmm.json @@ -0,0 +1,98 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "fileShareQuota": { + "value": 100 + }, + "containerImage": { + "value": "dfxswiss/deuro-monitoring:beta" + }, + "containerVolumeMounts": { + "value": [] + }, + "containerCPU": { + "value": "0.25" + }, + "containerMemory": { + "value": "0.5Gi" + }, + "containerMinReplicas": { + "value": 1 + }, + "containerMaxReplicas": { + "value": 1 + }, + "containerIngressTargetPort": { + "value": 3000 + }, + "containerIngressAdditionalPorts": { + "value": [] + }, + "containerProbes": { + "value": [] + }, + "containerEnv": { + "value": [ + { + "name": "PORT", + "value": "3000" + }, + { + "name": "ALLOWED_ORIGINS", + "value": "https://dev.monitoring.testnet.juicedollar.com,https://monitoring.testnet.juicedollar.com" + }, + { + "name": "DATABASE_URL", + "value": "[DATABASE_URL]" + }, + { + "name": "RPC_URL", + "value": "https://eth-mainnet.g.alchemy.com/v2/[API-KEY]" + }, + { + "name": "DEPLOYMENT_BLOCK", + "value": "22088283" + }, + { + "name": "BLOCKCHAIN_ID", + "value": "1" + }, + { + "name": "PRICE_CACHE_TTL_MS", + "value": "120000" + }, + { + "name": "PG_MAX_CLIENTS", + "value": "10" + }, + { + "name": "MAX_BLOCKS_PER_BATCH", + "value": "1000" + }, + { + "name": "TELEGRAM_BOT_TOKEN", + "value": "[TELEGRAM_BOT_TOKEN]" + }, + { + "name": "TELEGRAM_CHAT_ID", + "value": "[TELEGRAM_CHAT_ID]" + }, + { + "name": "TELEGRAM_ALERTS_ENABLED", + "value": "true" + }, + { + "name": "ALERT_TIMEFRAME_HOURS", + "value": "12" + } + ] + }, + "containerCommand": { + "value": [] + }, + "containerArgs": { + "value": [] + } + } +} diff --git a/infrastructure/bicep/container-apps/apps/parameters/dev-jdmp.json b/infrastructure/bicep/container-apps/apps/parameters/dev-jdmp.json new file mode 100644 index 0000000000..2238594272 --- /dev/null +++ b/infrastructure/bicep/container-apps/apps/parameters/dev-jdmp.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "fileShareQuota": { + "value": 1 + }, + "containerImage": { + "value": "juicedollar-ponder:beta" + }, + "containerVolumeMounts": { + "value": [ + { + "volumeName": "volume", + "mountPath": "/app/.ponder" + } + ] + }, + "containerCPU": { + "value": "0.5" + }, + "containerMemory": { + "value": "1Gi" + }, + "containerMinReplicas": { + "value": 1 + }, + "containerMaxReplicas": { + "value": 1 + }, + "containerIngressTargetPort": { + "value": 3000 + }, + "containerIngressAdditionalPorts": { + "value": [] + }, + "containerProbes": { + "value": [] + }, + "containerEnv": { + "value": [ + { + "name": "PORT", + "value": "3000" + }, + { + "name": "PONDER_PROFILE", + "value": "mainnet" + }, + { + "name": "PONDER_SCHEMA_VERSION", + "value": "6" + }, + { + "name": "DATABASE_URL", + "value": "[DATABASE_URL]" + }, + { + "name": "RPC_URL_MAINNET", + "value": "https://rpc.juiceswap.com" + } + ] + }, + "containerCommand": { + "value": [] + }, + "containerArgs": { + "value": [] + } + } +} diff --git a/infrastructure/bicep/container-apps/apps/parameters/dev-jdta.json b/infrastructure/bicep/container-apps/apps/parameters/dev-jdta.json index 7cd76ffdf7..de41e7f068 100644 --- a/infrastructure/bicep/container-apps/apps/parameters/dev-jdta.json +++ b/infrastructure/bicep/container-apps/apps/parameters/dev-jdta.json @@ -6,7 +6,7 @@ "value": 1 }, "containerImage": { - "value": "dfxswiss/deuro-api:beta" + "value": "juicedollar-api:beta" }, "containerVolumeMounts": { "value": [ @@ -39,13 +39,21 @@ }, "containerEnv": { "value": [ + { + "name": "API_ENVIRONMENT", + "value": "dev" + }, + { + "name": "LOG_LEVEL", + "value": "info" + }, { "name": "PORT", "value": "3000" }, { "name": "CONFIG_CHAIN", - "value": "ethereum" + "value": "testnet" }, { "name": "CONFIG_APP_URL", @@ -61,11 +69,7 @@ }, { "name": "RPC_URL_MAINNET", - "value": "https://eth-mainnet.g.alchemy.com/v2/[API-KEY]" - }, - { - "name": "RPC_URL_POLYGON", - "value": "https://polygon-mainnet.g.alchemy.com/v2/[API-KEY]" + "value": "https://rpc.testnet.juiceswap.com/" }, { "name": "TELEGRAM_BOT_TOKEN", @@ -74,6 +78,26 @@ { "name": "TELEGRAM_GROUPS_JSON", "value": "/app/.api/telegram.groups.json" + }, + { + "name": "TWITTER_CLIENT_APP_KEY", + "value": "[TWITTER_CLIENT_APP_KEY]" + }, + { + "name": "TWITTER_CLIENT_APP_SECRET", + "value": "[TWITTER_CLIENT_APP_SECRET]" + }, + { + "name": "TWITTER_ACCESS_TOKEN", + "value": "[TWITTER_ACCESS_TOKEN]" + }, + { + "name": "TWITTER_ACCESS_SECRET", + "value": "[TWITTER_ACCESS_SECRET]" + }, + { + "name": "TWITTER_IMAGES_DIR", + "value": "/app/.api/images/twitter" } ] }, @@ -84,4 +108,4 @@ "value": [] } } -} +} \ No newline at end of file diff --git a/infrastructure/bicep/container-apps/apps/parameters/dev-jdtd.json b/infrastructure/bicep/container-apps/apps/parameters/dev-jdtd.json index 1dce360eba..a3e863c813 100644 --- a/infrastructure/bicep/container-apps/apps/parameters/dev-jdtd.json +++ b/infrastructure/bicep/container-apps/apps/parameters/dev-jdtd.json @@ -6,7 +6,7 @@ "value": 1 }, "containerImage": { - "value": "dfxswiss/deuro-dapp:beta" + "value": "juicedollar-dapp:beta" }, "containerVolumeMounts": { "value": [] @@ -54,21 +54,21 @@ "name": "NEXT_PUBLIC_WAGMI_ID", "value": "[API-KEY]" }, - { - "name": "NEXT_PUBLIC_ALCHEMY_API_KEY", - "value": "[API-KEY]" - }, { "name": "NEXT_PUBLIC_CHAIN_NAME", - "value": "mainnet" + "value": "testnet" }, { "name": "NEXT_PUBLIC_RPC_URL_MAINNET", - "value": "https://eth-mainnet.g.alchemy.com/v2" + "value": "https://rpc.testnet.juiceswap.com" }, { - "name": "NEXT_PUBLIC_RPC_URL_POLYGON", - "value": "https://polygon-mainnet.g.alchemy.com/v2" + "name": "NEXT_PUBLIC_RPC_URL_TESTNET", + "value": "https://rpc.testnet.juiceswap.com" + }, + { + "name": "NEXT_PUBLIC_PONDER_FALLBACK_URL", + "value": "https://dev.ponder.testnet.juicedollar.com" } ] }, @@ -79,4 +79,4 @@ "value": [] } } -} +} \ No newline at end of file diff --git a/infrastructure/bicep/container-apps/apps/parameters/dev-jdtp.json b/infrastructure/bicep/container-apps/apps/parameters/dev-jdtp.json index 970c078fba..0cbe9a39e2 100644 --- a/infrastructure/bicep/container-apps/apps/parameters/dev-jdtp.json +++ b/infrastructure/bicep/container-apps/apps/parameters/dev-jdtp.json @@ -6,7 +6,7 @@ "value": 1 }, "containerImage": { - "value": "dfxswiss/deuro-ponder:beta" + "value": "juicedollar-ponder:beta" }, "containerVolumeMounts": { "value": [ @@ -45,11 +45,19 @@ }, { "name": "PONDER_PROFILE", - "value": "mainnet" + "value": "testnet" }, { - "name": "RPC_URL_MAINNET", - "value": "https://eth-mainnet.g.alchemy.com/v2/[API-KEY]" + "name": "PONDER_SCHEMA_VERSION", + "value": "6" + }, + { + "name": "DATABASE_URL", + "value": "[DATABASE_URL]" + }, + { + "name": "RPC_URL_TESTNET", + "value": "http://10.0.1.6:8085" } ] }, @@ -60,4 +68,4 @@ "value": [] } } -} \ No newline at end of file +} diff --git a/infrastructure/bicep/container-apps/apps/parameters/prd-jdma.json b/infrastructure/bicep/container-apps/apps/parameters/prd-jdma.json new file mode 100644 index 0000000000..452a40f01a --- /dev/null +++ b/infrastructure/bicep/container-apps/apps/parameters/prd-jdma.json @@ -0,0 +1,111 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "fileShareQuota": { + "value": 1 + }, + "containerImage": { + "value": "juicedollar-api:latest" + }, + "containerVolumeMounts": { + "value": [ + { + "volumeName": "volume", + "mountPath": "/app/.api" + } + ] + }, + "containerCPU": { + "value": "0.5" + }, + "containerMemory": { + "value": "1Gi" + }, + "containerMinReplicas": { + "value": 1 + }, + "containerMaxReplicas": { + "value": 1 + }, + "containerIngressTargetPort": { + "value": 3000 + }, + "containerIngressAdditionalPorts": { + "value": [] + }, + "containerProbes": { + "value": [] + }, + "containerEnv": { + "value": [ + { + "name": "API_ENVIRONMENT", + "value": "prd" + }, + { + "name": "LOG_LEVEL", + "value": "info" + }, + { + "name": "PORT", + "value": "3000" + }, + { + "name": "CONFIG_CHAIN", + "value": "mainnet" + }, + { + "name": "CONFIG_APP_URL", + "value": "https://bapp.juicedollar.com" + }, + { + "name": "CONFIG_INDEXER_URL", + "value": "https://ponder.juicedollar.com" + }, + { + "name": "COINGECKO_API_KEY", + "value": "[API-KEY]" + }, + { + "name": "RPC_URL_MAINNET", + "value": "https://rpc.juiceswap.com" + }, + { + "name": "TELEGRAM_BOT_TOKEN", + "value": "[API-KEY]" + }, + { + "name": "TELEGRAM_GROUPS_JSON", + "value": "/app/.api/telegram.groups.json" + }, + { + "name": "TWITTER_CLIENT_APP_KEY", + "value": "[TWITTER_CLIENT_APP_KEY]" + }, + { + "name": "TWITTER_CLIENT_APP_SECRET", + "value": "[TWITTER_CLIENT_APP_SECRET]" + }, + { + "name": "TWITTER_ACCESS_TOKEN", + "value": "[TWITTER_ACCESS_TOKEN]" + }, + { + "name": "TWITTER_ACCESS_SECRET", + "value": "[TWITTER_ACCESS_SECRET]" + }, + { + "name": "TWITTER_IMAGES_DIR", + "value": "/app/.api/images/twitter" + } + ] + }, + "containerCommand": { + "value": [] + }, + "containerArgs": { + "value": [] + } + } +} diff --git a/infrastructure/bicep/container-apps/apps/parameters/prd-jdmd.json b/infrastructure/bicep/container-apps/apps/parameters/prd-jdmd.json new file mode 100644 index 0000000000..83bac31342 --- /dev/null +++ b/infrastructure/bicep/container-apps/apps/parameters/prd-jdmd.json @@ -0,0 +1,82 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "fileShareQuota": { + "value": 1 + }, + "containerImage": { + "value": "juicedollar-dapp:latest" + }, + "containerVolumeMounts": { + "value": [] + }, + "containerCPU": { + "value": "0.5" + }, + "containerMemory": { + "value": "1Gi" + }, + "containerMinReplicas": { + "value": 1 + }, + "containerMaxReplicas": { + "value": 1 + }, + "containerIngressTargetPort": { + "value": 3000 + }, + "containerIngressAdditionalPorts": { + "value": [] + }, + "containerProbes": { + "value": [] + }, + "containerEnv": { + "value": [ + { + "name": "NEXT_PUBLIC_LANDINGPAGE_URL", + "value": "https://juicedollar.com" + }, + { + "name": "NEXT_PUBLIC_APP_URL", + "value": "https://bapp.juicedollar.com" + }, + { + "name": "NEXT_PUBLIC_API_URL", + "value": "https://api.juicedollar.com" + }, + { + "name": "NEXT_PUBLIC_PONDER_URL", + "value": "https://ponder.juicedollar.com" + }, + { + "name": "NEXT_PUBLIC_WAGMI_ID", + "value": "[API-KEY]" + }, + { + "name": "NEXT_PUBLIC_CHAIN_NAME", + "value": "mainnet" + }, + { + "name": "NEXT_PUBLIC_RPC_URL_MAINNET", + "value": "https://rpc.juiceswap.com" + }, + { + "name": "NEXT_PUBLIC_RPC_URL_TESTNET", + "value": "https://rpc.testnet.juiceswap.com" + }, + { + "name": "NEXT_PUBLIC_PONDER_FALLBACK_URL", + "value": "https://dev.ponder.juicedollar.com/" + } + ] + }, + "containerCommand": { + "value": [] + }, + "containerArgs": { + "value": [] + } + } +} diff --git a/infrastructure/bicep/container-apps/apps/parameters/prd-jdmm.json b/infrastructure/bicep/container-apps/apps/parameters/prd-jdmm.json new file mode 100644 index 0000000000..f257c57906 --- /dev/null +++ b/infrastructure/bicep/container-apps/apps/parameters/prd-jdmm.json @@ -0,0 +1,98 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "fileShareQuota": { + "value": 100 + }, + "containerImage": { + "value": "dfxswiss/deuro-monitoring:beta" + }, + "containerVolumeMounts": { + "value": [] + }, + "containerCPU": { + "value": "0.25" + }, + "containerMemory": { + "value": "0.5Gi" + }, + "containerMinReplicas": { + "value": 1 + }, + "containerMaxReplicas": { + "value": 1 + }, + "containerIngressTargetPort": { + "value": 3000 + }, + "containerIngressAdditionalPorts": { + "value": [] + }, + "containerProbes": { + "value": [] + }, + "containerEnv": { + "value": [ + { + "name": "PORT", + "value": "3000" + }, + { + "name": "ALLOWED_ORIGINS", + "value": "https://dev.monitoring.testnet.juicedollar.com,https://monitoring.testnet.juicedollar.com" + }, + { + "name": "DATABASE_URL", + "value": "[DATABASE_URL]" + }, + { + "name": "RPC_URL", + "value": "https://eth-mainnet.g.alchemy.com/v2/[API-KEY]" + }, + { + "name": "DEPLOYMENT_BLOCK", + "value": "22088283" + }, + { + "name": "BLOCKCHAIN_ID", + "value": "1" + }, + { + "name": "PRICE_CACHE_TTL_MS", + "value": "120000" + }, + { + "name": "PG_MAX_CLIENTS", + "value": "10" + }, + { + "name": "MAX_BLOCKS_PER_BATCH", + "value": "1000" + }, + { + "name": "TELEGRAM_BOT_TOKEN", + "value": "[TELEGRAM_BOT_TOKEN]" + }, + { + "name": "TELEGRAM_CHAT_ID", + "value": "[TELEGRAM_CHAT_ID]" + }, + { + "name": "TELEGRAM_ALERTS_ENABLED", + "value": "true" + }, + { + "name": "ALERT_TIMEFRAME_HOURS", + "value": "12" + } + ] + }, + "containerCommand": { + "value": [] + }, + "containerArgs": { + "value": [] + } + } +} diff --git a/infrastructure/bicep/container-apps/apps/parameters/prd-jdmp.json b/infrastructure/bicep/container-apps/apps/parameters/prd-jdmp.json new file mode 100644 index 0000000000..f7ce0d2015 --- /dev/null +++ b/infrastructure/bicep/container-apps/apps/parameters/prd-jdmp.json @@ -0,0 +1,71 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "fileShareQuota": { + "value": 1 + }, + "containerImage": { + "value": "juicedollar-ponder:latest" + }, + "containerVolumeMounts": { + "value": [ + { + "volumeName": "volume", + "mountPath": "/app/.ponder" + } + ] + }, + "containerCPU": { + "value": "0.5" + }, + "containerMemory": { + "value": "1Gi" + }, + "containerMinReplicas": { + "value": 1 + }, + "containerMaxReplicas": { + "value": 1 + }, + "containerIngressTargetPort": { + "value": 3000 + }, + "containerIngressAdditionalPorts": { + "value": [] + }, + "containerProbes": { + "value": [] + }, + "containerEnv": { + "value": [ + { + "name": "PORT", + "value": "3000" + }, + { + "name": "PONDER_PROFILE", + "value": "mainnet" + }, + { + "name": "PONDER_SCHEMA_VERSION", + "value": "6" + }, + { + "name": "DATABASE_URL", + "value": "[DATABASE_URL]" + }, + { + "name": "RPC_URL_MAINNET", + "value": "http://10.0.1.6:8085" + } + ] + }, + "containerCommand": { + "value": [] + }, + "containerArgs": { + "value": [] + } + } +} \ No newline at end of file diff --git a/infrastructure/bicep/container-apps/apps/parameters/prd-jdta.json b/infrastructure/bicep/container-apps/apps/parameters/prd-jdta.json index 769e768e48..ae5ccb5495 100644 --- a/infrastructure/bicep/container-apps/apps/parameters/prd-jdta.json +++ b/infrastructure/bicep/container-apps/apps/parameters/prd-jdta.json @@ -6,7 +6,7 @@ "value": 1 }, "containerImage": { - "value": "dfxswiss/deuro-api:beta" + "value": "juicedollar-api:latest" }, "containerVolumeMounts": { "value": [ @@ -39,13 +39,21 @@ }, "containerEnv": { "value": [ + { + "name": "API_ENVIRONMENT", + "value": "dev" + }, + { + "name": "LOG_LEVEL", + "value": "info" + }, { "name": "PORT", "value": "3000" }, { "name": "CONFIG_CHAIN", - "value": "ethereum" + "value": "testnet" }, { "name": "CONFIG_APP_URL", @@ -61,11 +69,7 @@ }, { "name": "RPC_URL_MAINNET", - "value": "https://eth-mainnet.g.alchemy.com/v2/[API-KEY]" - }, - { - "name": "RPC_URL_POLYGON", - "value": "https://polygon-mainnet.g.alchemy.com/v2/[API-KEY]" + "value": "https://rpc.testnet.juiceswap.com" }, { "name": "TELEGRAM_BOT_TOKEN", @@ -74,6 +78,26 @@ { "name": "TELEGRAM_GROUPS_JSON", "value": "/app/.api/telegram.groups.json" + }, + { + "name": "TWITTER_CLIENT_APP_KEY", + "value": "[TWITTER_CLIENT_APP_KEY]" + }, + { + "name": "TWITTER_CLIENT_APP_SECRET", + "value": "[TWITTER_CLIENT_APP_SECRET]" + }, + { + "name": "TWITTER_ACCESS_TOKEN", + "value": "[TWITTER_ACCESS_TOKEN]" + }, + { + "name": "TWITTER_ACCESS_SECRET", + "value": "[TWITTER_ACCESS_SECRET]" + }, + { + "name": "TWITTER_IMAGES_DIR", + "value": "/app/.api/images/twitter" } ] }, @@ -84,4 +108,4 @@ "value": [] } } -} +} \ No newline at end of file diff --git a/infrastructure/bicep/container-apps/apps/parameters/prd-jdtd.json b/infrastructure/bicep/container-apps/apps/parameters/prd-jdtd.json index bfc5dbbc5d..2712914bc5 100644 --- a/infrastructure/bicep/container-apps/apps/parameters/prd-jdtd.json +++ b/infrastructure/bicep/container-apps/apps/parameters/prd-jdtd.json @@ -6,7 +6,7 @@ "value": 1 }, "containerImage": { - "value": "dfxswiss/deuro-dapp:beta" + "value": "juicedollar-dapp:latest" }, "containerVolumeMounts": { "value": [] @@ -54,21 +54,21 @@ "name": "NEXT_PUBLIC_WAGMI_ID", "value": "[API-KEY]" }, - { - "name": "NEXT_PUBLIC_ALCHEMY_API_KEY", - "value": "[API-KEY]" - }, { "name": "NEXT_PUBLIC_CHAIN_NAME", - "value": "mainnet" + "value": "testnet" }, { "name": "NEXT_PUBLIC_RPC_URL_MAINNET", - "value": "https://eth-mainnet.g.alchemy.com/v2" + "value": "https://rpc.testnet.juiceswap.com" + }, + { + "name": "NEXT_PUBLIC_RPC_URL_TESTNET", + "value": "https://rpc.testnet.juiceswap.com" }, { - "name": "NEXT_PUBLIC_RPC_URL_POLYGON", - "value": "https://polygon-mainnet.g.alchemy.com/v2" + "name": "NEXT_PUBLIC_PONDER_FALLBACK_URL", + "value": "https://dev.ponder.testnet.juicedollar.com/" } ] }, @@ -79,4 +79,4 @@ "value": [] } } -} +} \ No newline at end of file diff --git a/infrastructure/bicep/container-apps/apps/parameters/prd-jdtp.json b/infrastructure/bicep/container-apps/apps/parameters/prd-jdtp.json index 970c078fba..9eb5ae1141 100644 --- a/infrastructure/bicep/container-apps/apps/parameters/prd-jdtp.json +++ b/infrastructure/bicep/container-apps/apps/parameters/prd-jdtp.json @@ -6,7 +6,7 @@ "value": 1 }, "containerImage": { - "value": "dfxswiss/deuro-ponder:beta" + "value": "juicedollar-ponder:latest" }, "containerVolumeMounts": { "value": [ @@ -45,11 +45,19 @@ }, { "name": "PONDER_PROFILE", - "value": "mainnet" + "value": "testnet" }, { - "name": "RPC_URL_MAINNET", - "value": "https://eth-mainnet.g.alchemy.com/v2/[API-KEY]" + "name": "PONDER_SCHEMA_VERSION", + "value": "6" + }, + { + "name": "DATABASE_URL", + "value": "[DATABASE_URL]" + }, + { + "name": "RPC_URL_TESTNET", + "value": "https://rpc.testnet.juiceswap.com" } ] }, @@ -60,4 +68,4 @@ "value": [] } } -} \ No newline at end of file +} diff --git a/infrastructure/bicep/container-apps/manualFrontdoorSetup.sh b/infrastructure/bicep/container-apps/manualFrontdoorSetup.sh index 657613297b..3073ad692b 100755 --- a/infrastructure/bicep/container-apps/manualFrontdoorSetup.sh +++ b/infrastructure/bicep/container-apps/manualFrontdoorSetup.sh @@ -19,7 +19,11 @@ environmentOptions=("loc" "dev" "prd") # "jdta": JuiceDollar Testnet API # "jdtd": JuiceDollar Testnet dApp # "jdtm": JuiceDollar Testnet Monitoring -appNameOptions=("fcp" "dep" "dea" "ded" "dem" "jsp" "jsw" "n8n" "ctn" "jdtp" "jdta" "jdtd" "jdtm") +# "jdmp": JuiceDollar Mainnet Ponder +# "jdma": JuiceDollar Mainnet API +# "jdmd": JuiceDollar Mainnet dApp +# "jdmm": JuiceDollar Mainnet Monitoring +appNameOptions=("fcp" "dep" "dea" "ded" "dem" "jsp" "jsw" "n8n" "jdtp" "jdta" "jdtd" "jdtm" "jdmp" "jdma" "jdmd" "jdmm") # --- FUNCTIONS --- # selectOption() { diff --git a/infrastructure/bicep/container-apps/setup-custom-domains.sh b/infrastructure/bicep/container-apps/setup-custom-domains.sh new file mode 100644 index 0000000000..49519f4e3b --- /dev/null +++ b/infrastructure/bicep/container-apps/setup-custom-domains.sh @@ -0,0 +1,144 @@ +#!/bin/sh +set -e + +# Documentation: +# Creates custom domains on Azure Front Door and outputs DNS records needed + +# --- OPTIONS --- # +environmentOptions=("loc" "dev" "prd") + +# --- DOMAINS --- # +# Format: "custom-domain:app-code" +# App codes must match appNameOptions in manualFrontdoorSetup.sh +# Example: "example.com:dea" -> creates custom domain for dEuro API +CUSTOM_DOMAINS=( + "example.com:dea" +) + +# --- FUNCTIONS --- # +selectOption() { + PS3="${1}: " + shift + options=("$@") + + select opt in "${options[@]}" "quit"; do + case "$REPLY" in + *) selection="${opt}"; break ;; + esac + done + + if [[ ! $selection || $selection == "quit" ]]; then exit -1; fi + echo "${selection}" +} + +# --- MAIN --- # +ENV=$(selectOption "Select Environment" "${environmentOptions[@]}") + +# Global variables +COMP_NAME="dfx" +API_NAME="api" + +RESOURCE_GROUP="rg-${COMP_NAME}-${API_NAME}-${ENV}" +AFD_PROFILE="afd-${COMP_NAME}-${API_NAME}-${ENV}" + +echo "Resource Group: ${RESOURCE_GROUP}" +echo "Frontdoor Profile: ${AFD_PROFILE}" + +DNS_RECORDS="" + +for entry in "${CUSTOM_DOMAINS[@]}"; do + DOMAIN="${entry%%:*}" + APP="${entry##*:}" + + # Generate resource names + AFD_ENDPOINT="fde-${COMP_NAME}-${APP}-${ENV}" + DOMAIN_NAME="${DOMAIN//./-}" + + echo "" + echo "Custom Domain: ${DOMAIN}" + echo "Frontdoor Endpoint: ${AFD_ENDPOINT}" + echo "Domain Resource Name: ${DOMAIN_NAME}" + + # Get endpoint hostname + ENDPOINT_HOSTNAME=$(az afd endpoint show \ + --resource-group "$RESOURCE_GROUP" \ + --profile-name "$AFD_PROFILE" \ + --endpoint-name "$AFD_ENDPOINT" \ + --query "hostName" \ + --output tsv) + + echo "Endpoint Hostname:" + echo $ENDPOINT_HOSTNAME + + # Check if custom domain already exists + EXISTING=$(az afd custom-domain show \ + --resource-group "$RESOURCE_GROUP" \ + --profile-name "$AFD_PROFILE" \ + --custom-domain-name "$DOMAIN_NAME" \ + --query "hostName" \ + --output tsv 2>/dev/null || echo "") + + if [ -n "$EXISTING" ]; then + echo "Custom domain already exists, skipping creation..." + else + # Create the custom domain + az afd custom-domain create \ + --resource-group "$RESOURCE_GROUP" \ + --profile-name "$AFD_PROFILE" \ + --custom-domain-name "$DOMAIN_NAME" \ + --host-name "$DOMAIN" \ + --certificate-type ManagedCertificate \ + --minimum-tls-version TLS12 \ + --output none + fi + + # Get validation token + VALIDATION_TOKEN=$(az afd custom-domain show \ + --resource-group "$RESOURCE_GROUP" \ + --profile-name "$AFD_PROFILE" \ + --custom-domain-name "$DOMAIN_NAME" \ + --query "validationProperties.validationToken" \ + --output tsv) + + echo "Validation Token:" + echo $VALIDATION_TOKEN + + # Collect DNS records for summary + DNS_RECORDS="${DNS_RECORDS}${DOMAIN}|CNAME|${ENDPOINT_HOSTNAME}\n" + DNS_RECORDS="${DNS_RECORDS}_dnsauth.${DOMAIN}|TXT|${VALIDATION_TOKEN}\n\n" +done + +echo "" +echo "--- Associating domains with routes ---" + +for entry in "${CUSTOM_DOMAINS[@]}"; do + DOMAIN="${entry%%:*}" + APP="${entry##*:}" + AFD_ENDPOINT="fde-${COMP_NAME}-${APP}-${ENV}" + AFD_ROUTE="fdor-${COMP_NAME}-${APP}-${ENV}" + DOMAIN_NAME="${DOMAIN//./-}" + + echo "" + echo "Associating ${DOMAIN} with route ${AFD_ROUTE}..." + + az afd route update \ + --resource-group $RESOURCE_GROUP \ + --profile-name $AFD_PROFILE \ + --endpoint-name $AFD_ENDPOINT \ + --route-name $AFD_ROUTE \ + --custom-domains $DOMAIN_NAME +done + +echo "" +echo "--- DNS Records to Create ---" +echo "" +printf "%-40s %-8s %s\n" "NAME" "TYPE" "VALUE" +printf "%-40s %-8s %s\n" "---" "----" "-----" +printf "%b" "$DNS_RECORDS" | while IFS='|' read -r name type value; do + if [ -n "$name" ]; then + # Extract subdomain and root domain (assumes 2-part TLD like .com, .ch) + root_domain=$(echo "$name" | awk -F. '{print $(NF-1)"."$NF}') + subdomain=$(echo "$name" | sed "s/\.$root_domain$//") + printf "%-40s %-8s %s\n" "$subdomain (.$root_domain)" "$type" "$value" + fi +done diff --git a/infrastructure/bicep/virtual-machines/front-door/deploy.sh b/infrastructure/bicep/virtual-machines/front-door/deploy.sh old mode 100644 new mode 100755 index 51a913bdf7..6bb2709217 --- a/infrastructure/bicep/virtual-machines/front-door/deploy.sh +++ b/infrastructure/bicep/virtual-machines/front-door/deploy.sh @@ -11,7 +11,11 @@ environmentOptions=("loc" "dev" "prd") # "ctn": Citrea Testnet Node # "cteb": Citrea Testnet Explorer Backend # "ctef": Citrea Testnet Explorer Frontend -nodeNameOptions=("ctn" "cteb" "ctef") +# "cmn": Citrea Mainnet Node +# "cmeb": Citrea Mainnet Explorer Backend +# "cmef": Citrea Mainnet Explorer Frontend +# "cmdef": Citrea Mainnet Explorer Frontend (nur auf DEV) +nodeNameOptions=("ctn" "cteb" "ctef" "cmn" "cmeb" "cmef" "cmdef") # --- FUNCTIONS --- # selectOption() { diff --git a/infrastructure/bicep/virtual-machines/front-door/parameters/dev-cmdef.json b/infrastructure/bicep/virtual-machines/front-door/parameters/dev-cmdef.json new file mode 100644 index 0000000000..1e43f86c7f --- /dev/null +++ b/infrastructure/bicep/virtual-machines/front-door/parameters/dev-cmdef.json @@ -0,0 +1,12 @@ +{ + "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#", + "contentVersion": "1.0.0.0", + "parameters": { + "vmName": { + "value": "node" + }, + "originPath": { + "value": "/cmdef" + } + } +} \ No newline at end of file diff --git a/infrastructure/bicep/virtual-machines/front-door/parameters/prd-cteb.json b/infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmeb.json similarity index 90% rename from infrastructure/bicep/virtual-machines/front-door/parameters/prd-cteb.json rename to infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmeb.json index 8879bbed7c..7bf6cee972 100644 --- a/infrastructure/bicep/virtual-machines/front-door/parameters/prd-cteb.json +++ b/infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmeb.json @@ -6,7 +6,7 @@ "value": "node" }, "originPath": { - "value": "/cteb" + "value": "/cmeb" } } } \ No newline at end of file diff --git a/infrastructure/bicep/virtual-machines/front-door/parameters/prd-ctef.json b/infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmef.json similarity index 90% rename from infrastructure/bicep/virtual-machines/front-door/parameters/prd-ctef.json rename to infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmef.json index efe125a718..d5eb6b37a6 100644 --- a/infrastructure/bicep/virtual-machines/front-door/parameters/prd-ctef.json +++ b/infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmef.json @@ -6,7 +6,7 @@ "value": "node" }, "originPath": { - "value": "/ctef" + "value": "/cmef" } } } \ No newline at end of file diff --git a/infrastructure/bicep/virtual-machines/front-door/parameters/prd-ctn.json b/infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmn.json similarity index 91% rename from infrastructure/bicep/virtual-machines/front-door/parameters/prd-ctn.json rename to infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmn.json index 1c16ab65bf..cd720942ed 100644 --- a/infrastructure/bicep/virtual-machines/front-door/parameters/prd-ctn.json +++ b/infrastructure/bicep/virtual-machines/front-door/parameters/prd-cmn.json @@ -6,7 +6,7 @@ "value": "node" }, "originPath": { - "value": "/ctn" + "value": "/cmn" } } } \ No newline at end of file diff --git a/infrastructure/bicep/virtual-machines/load-balancer/deploy.sh b/infrastructure/bicep/virtual-machines/load-balancer/deploy.sh index a4d99de649..c0263837d4 100644 --- a/infrastructure/bicep/virtual-machines/load-balancer/deploy.sh +++ b/infrastructure/bicep/virtual-machines/load-balancer/deploy.sh @@ -11,8 +11,9 @@ environmentOptions=("loc" "dev" "prd") resourceGroupOptions=("api" "core") # "ctn": Citrea Testnet Node +# "cmn": Citrea Mainnet Node # "sln": Swiss Ledger Node -nodeNameOptions=("ctn" "sln") +nodeNameOptions=("ctn" "cmn" "sln") # --- FUNCTIONS --- # selectOption() { diff --git a/infrastructure/citrea/citreascan/config/bitcoind/bitcoin-mainnet.conf b/infrastructure/citrea/citreascan/config/bitcoind/bitcoin-mainnet.conf new file mode 100644 index 0000000000..db8040a472 --- /dev/null +++ b/infrastructure/citrea/citreascan/config/bitcoind/bitcoin-mainnet.conf @@ -0,0 +1,14 @@ +server=1 +rest=1 +txindex=1 + +rpcallowip=0.0.0.0/0 +rpcbind=0.0.0.0 +rpcport=8332 + +rpcauth=[rpcauth] +rpcuser=[rpcuser] +rpcpassword=[rpcpassword] + +zmqpubrawblock=tcp://0.0.0.0:28332 +zmqpubrawtx=tcp://0.0.0.0:28333 diff --git a/infrastructure/citrea/citreascan/config/docker/docker-compose-blockscout-citrea-mainnet.yml b/infrastructure/citrea/citreascan/config/docker/docker-compose-blockscout-citrea-mainnet.yml new file mode 100644 index 0000000000..57e2418cc6 --- /dev/null +++ b/infrastructure/citrea/citreascan/config/docker/docker-compose-blockscout-citrea-mainnet.yml @@ -0,0 +1,88 @@ +name: blockscout-citrea-mainnet + +services: + postgres: + image: postgres:17 + cpus: 2.0 + shm_size: '4gb' + restart: unless-stopped + networks: + - shared + volumes: + - ./volumes/blockscout/citrea/mainnet/postgres-data:/var/lib/postgresql/data + ports: + - '5432:5432' + healthcheck: + test: ['CMD-SHELL', 'pg_isready -U blockscout'] + interval: 30s + timeout: 5s + retries: 5 + logging: + driver: 'json-file' + options: + max-size: '100m' + max-file: '3' + environment: + - POSTGRES_PASSWORD=[POSTGRES_PASSWORD] + - POSTGRES_USER=[POSTGRES_USER] + - POSTGRES_DB=[POSTGRES_DB] + command: postgres -c max_connections=200 + + backend: + image: dfxswiss/citrea-backend:beta + restart: unless-stopped + networks: + - shared + depends_on: + postgres: + condition: service_healthy + ports: + - '4000:4000' + logging: + driver: 'json-file' + options: + max-size: '100m' + max-file: '3' + env_file: docker-compose-blockscout-citrea-mainnet.backend.env + environment: + - DATABASE_URL=[DATABASE_URL] + - MARKET_COINGECKO_API_KEY=[MARKET_COINGECKO_API_KEY] + command: sh -c "bin/blockscout eval \"Elixir.Explorer.ReleaseTasks.create_and_migrate()\" && bin/blockscout start" + + frontend: + image: dfxswiss/citrea-frontend:beta + restart: unless-stopped + networks: + - shared + depends_on: + - backend + ports: + - '3000:3000' + logging: + driver: 'json-file' + options: + max-size: '100m' + max-file: '3' + env_file: docker-compose-blockscout-citrea-mainnet.frontend.env + #environment: + + redis-db: + image: redis:alpine + restart: unless-stopped + networks: + - shared + volumes: + - ./volumes/redis/data:/data + ports: + - '6379:6379' + logging: + driver: 'json-file' + options: + max-size: '100m' + max-file: '3' + command: redis-server + +networks: + shared: + external: true + name: citrea-mainnet-network diff --git a/infrastructure/citrea/citreascan/config/docker/docker-compose-citrea-mainnet.yml b/infrastructure/citrea/citreascan/config/docker/docker-compose-citrea-mainnet.yml new file mode 100644 index 0000000000..e81972d860 --- /dev/null +++ b/infrastructure/citrea/citreascan/config/docker/docker-compose-citrea-mainnet.yml @@ -0,0 +1,73 @@ +name: 'citrea-mainnet' + +services: + bitcoind: + image: lightninglabs/bitcoin-core + restart: unless-stopped + networks: + - shared + volumes: + - ./volumes/bitcoin:/home/bitcoin/.bitcoin + - ./volumes/bitcoin/bitcoin-mainnet.conf:/home/bitcoin/.bitcoin/bitcoin.conf + ports: + - '18443:18443' + healthcheck: + test: curl --fail http://localhost:18443/rest/chaininfo.json || exit 1 + start_period: 120s + interval: 30s + timeout: 60s + retries: 10 + logging: + driver: 'json-file' + options: + max-size: '100m' + max-file: '3' + command: > + bitcoind -conf=/home/bitcoin/.bitcoin/bitcoin.conf + + citread: + depends_on: + - bitcoind + image: chainwayxyz/citrea-full-node:mainnet + restart: unless-stopped + networks: + - shared + volumes: + - ./volumes/citrea/mainnet:/mnt/task/citrea-db + ports: + - '8085:8085' + logging: + driver: 'json-file' + options: + max-size: '100m' + max-file: '3' + environment: + - SEQUENCER_PUBLIC_KEY=0201edff3b3ee593dbef54e2fbdd421070db55e2de2aebe75f398bd85ac97ed364 + - SEQUENCER_DA_PUB_KEY=03015a7c4d2cc1c771198686e2ebef6fe7004f4136d61f6225b061d1bb9b821b9b + - PROVER_DA_PUB_KEY=0357d255ab93638a2d880787ebaadfefdfc9bb51a26b4a37e5d588e04e54c60a42 + - NODE_URL=http://bitcoind:18443/ + - NODE_USERNAME=[NODE_USERNAME] + - NODE_PASSWORD=[NODE_PASSWORD] + - NETWORK=mainnet + - TX_BACKUP_DIR= + - STORAGE_PATH=/mnt/task/citrea-db + - DB_MAX_OPEN_FILES=5000 + - RPC_BIND_HOST=0.0.0.0 + - RPC_BIND_PORT=8085 + - RPC_MAX_CONNECTIONS=100 + - RPC_MAX_REQUEST_BODY_SIZE=10485760 + - RPC_MAX_RESPONSE_BODY_SIZE=10485760 + - RPC_BATCH_REQUESTS_LIMIT=100 + - RPC_ENABLE_SUBSCRIPTIONS=true + - RPC_MAX_SUBSCRIPTIONS_PER_CONNECTION=10 + - SEQUENCER_CLIENT_URL=https://rpc.mainnet.citrea.xyz + - INCLUDE_TX_BODY=false + - SCAN_L1_START_HEIGHT=45496 + - SYNC_BLOCKS_COUNT=10 + - RUST_LOG=info + - JSON_LOGS=1 + +networks: + shared: + external: true + name: citrea-mainnet-network diff --git a/infrastructure/citrea/citreascan/config/docker/docker-compose-nginx-mainnet.yml b/infrastructure/citrea/citreascan/config/docker/docker-compose-nginx-mainnet.yml new file mode 100644 index 0000000000..43034e25e1 --- /dev/null +++ b/infrastructure/citrea/citreascan/config/docker/docker-compose-nginx-mainnet.yml @@ -0,0 +1,18 @@ +name: 'nginx-citrea-mainnet' + +services: + nginx: + image: nginx:1.29.2-perl + restart: unless-stopped + networks: + - shared + volumes: + - ./volumes/nginx/default.conf:/etc/nginx/conf.d/default.conf + - ./volumes/nginx/www:/var/www + ports: + - '80:80' + +networks: + shared: + external: true + name: citrea-mainnet-network diff --git a/infrastructure/citrea/citreascan/config/docker/docker-compose-nginx.yml b/infrastructure/citrea/citreascan/config/docker/docker-compose-nginx-testnet.yml similarity index 100% rename from infrastructure/citrea/citreascan/config/docker/docker-compose-nginx.yml rename to infrastructure/citrea/citreascan/config/docker/docker-compose-nginx-testnet.yml diff --git a/infrastructure/citrea/citreascan/config/nginx/default-mainnet.conf b/infrastructure/citrea/citreascan/config/nginx/default-mainnet.conf new file mode 100644 index 0000000000..d9eb2271b6 --- /dev/null +++ b/infrastructure/citrea/citreascan/config/nginx/default-mainnet.conf @@ -0,0 +1,37 @@ +map $http_upgrade $connection_upgrade { + default upgrade; + '' close; +} + +server { + location /cmn/ { + proxy_pass http://citread:8085/; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location /cmeb/ { + proxy_pass http://backend:4000/; + + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } + + location /cmef/ { + proxy_pass http://frontend:3000/; + + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header X-Forwarded-Proto $scheme; + } +} diff --git a/infrastructure/citrea/citreascan/config/nginx/default.conf b/infrastructure/citrea/citreascan/config/nginx/default-testnet.conf similarity index 100% rename from infrastructure/citrea/citreascan/config/nginx/default.conf rename to infrastructure/citrea/citreascan/config/nginx/default-testnet.conf