CI/CD / render (push) Waiting to run
The primary-network chains answer to either case; one spelling beats two. /v1/chain/c/rpc, /v1/chain/p, /v1/chain/x across the estate. Co-authored-by: Hanzo AI <[email protected]>
154 lines
5.4 KiB
YAML
154 lines
5.4 KiB
YAML
###############################################################################
|
|
# Pars Market — Lux Uniswap fork pinned to Pars app chain EVM (chainID 494949).
|
|
#
|
|
# Standalone overlay (no inheritance from ../../base): pars needs an extra
|
|
# /brand ConfigMap mount and a cp step in the init script that the base
|
|
# Deployment doesn't model. Once base supports an optional brand mount,
|
|
# pars can fold into it via patches.
|
|
###############################################################################
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: exchange-pars
|
|
labels:
|
|
app: lux-exchange
|
|
brand: pars
|
|
spec:
|
|
replicas: 1
|
|
selector:
|
|
matchLabels:
|
|
app: lux-exchange
|
|
brand: pars
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: lux-exchange
|
|
brand: pars
|
|
spec:
|
|
imagePullSecrets:
|
|
- name: ghcr-luxfi
|
|
volumes:
|
|
- name: patched
|
|
emptyDir: {}
|
|
- name: brand-config
|
|
configMap:
|
|
name: exchange-config-pars
|
|
initContainers:
|
|
- name: patch-api-url
|
|
image: ghcr.io/luxfi/exchange:v5.147.4
|
|
imagePullPolicy: Always
|
|
command:
|
|
- sh
|
|
- -c
|
|
- |
|
|
cp -r /public/* /patched/
|
|
|
|
for f in /patched/assets/*.js; do
|
|
sed -i 's|interface\.gateway\.lux\.org|gw.pars.market/gateway|g' "$f"
|
|
sed -i 's|\.gateway\.lux\.org|.gw.pars.market|g' "$f"
|
|
sed -i 's|liquidity\.backend-prod\.api\.lux\.org|gw.pars.market/liquidity|g' "$f"
|
|
sed -i 's|entry-gateway\.backend-prod\.api\.lux\.org|gw.pars.market/conversion|g' "$f"
|
|
sed -i 's|entry-gateway\.backend-dev\.api\.lux\.org|gw.pars.market/conversion|g' "$f"
|
|
sed -i 's|entry-gateway\.backend-staging\.api\.lux\.org|gw.pars.market/conversion|g' "$f"
|
|
sed -i 's|privy-embedded-wallet\.backend-dev\.api\.lux\.org|gw.pars.market/uniswap|g' "$f"
|
|
sed -i 's|websockets\.backend-prod\.api\.lux\.org|websockets.backend-prod.api.uniswap.org|g' "$f"
|
|
sed -i 's|"https://api\.lux\.org"|"https://gw.pars.market/uniswap"|g' "$f"
|
|
done
|
|
|
|
for f in /patched/assets/*.js; do
|
|
sed -i 's|if(!r){const [a-z]=new Error(`Feature|if(!r){return"__unmapped_gate_"+e}if(false){const x=new Error(`Feature|g' "$f"
|
|
sed -i 's|http://127\.0\.0\.1:8545/v1/chain/c/rpc|https://api.lux.network/mainnet/v1/chain/2pUskxqaL5Bpx7uRUGG1fDjPckjxQ4UKX4sLKeaS1NdSVBJd3F/rpc|g' "$f"
|
|
sed -i 's|http://127\.0\.0\.1:8545|https://api.lux.network/mainnet/v1/chain/2pUskxqaL5Bpx7uRUGG1fDjPckjxQ4UKX4sLKeaS1NdSVBJd3F/rpc|g' "$f"
|
|
sed -i 's|http://127\.0\.0\.1:8546|https://api.lux.network/mainnet/v1/chain/2pUskxqaL5Bpx7uRUGG1fDjPckjxQ4UKX4sLKeaS1NdSVBJd3F/rpc|g' "$f"
|
|
sed -i 's|http://localhost:8545/v1/chain/c/explorer/|https://explore.pars.network/|g' "$f"
|
|
sed -i 's|http://localhost:9630/v1/chain/G/graphql|https://api.pars.market/v1/graphql|g' "$f"
|
|
sed -i 's|http://localhost:9650/v1/chain/G/graphql|https://api.pars.market/v1/graphql|g' "$f"
|
|
sed -i 's|http://localhost:8080|https://gw.pars.market|g' "$f"
|
|
done
|
|
|
|
sed -i "s|script-src 'self' 'wasm-unsafe-eval'|script-src 'self' 'unsafe-eval' 'wasm-unsafe-eval'|g" /patched/index.html
|
|
sed -i "s|connect-src \(.*\);|connect-src \1 https://gw.pars.market https://*.gw.pars.market wss://gw.pars.market https://websockets.backend-prod.api.uniswap.org;|g" /patched/index.html
|
|
|
|
cp /brand/config.json /patched/config.json
|
|
volumeMounts:
|
|
- name: patched
|
|
mountPath: /patched
|
|
- name: brand-config
|
|
mountPath: /brand
|
|
containers:
|
|
- name: exchange
|
|
image: ghcr.io/luxfi/exchange:v5.147.4
|
|
imagePullPolicy: Always
|
|
envFrom:
|
|
- configMapRef:
|
|
name: exchange-brand-pars
|
|
ports:
|
|
- name: http
|
|
containerPort: 3000
|
|
protocol: TCP
|
|
volumeMounts:
|
|
- name: patched
|
|
mountPath: /public
|
|
resources:
|
|
requests:
|
|
cpu: 100m
|
|
memory: 256Mi
|
|
limits:
|
|
cpu: 500m
|
|
memory: 512Mi
|
|
readinessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 10
|
|
periodSeconds: 5
|
|
timeoutSeconds: 3
|
|
failureThreshold: 3
|
|
livenessProbe:
|
|
httpGet:
|
|
path: /
|
|
port: http
|
|
initialDelaySeconds: 30
|
|
periodSeconds: 10
|
|
timeoutSeconds: 5
|
|
failureThreshold: 3
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: exchange-pars
|
|
labels:
|
|
app: lux-exchange
|
|
brand: pars
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
app: lux-exchange
|
|
brand: pars
|
|
ports:
|
|
- name: http
|
|
port: 3000
|
|
targetPort: 3000
|
|
protocol: TCP
|
|
---
|
|
apiVersion: hanzo.ai/v1alpha1
|
|
kind: IngressRoute
|
|
metadata:
|
|
name: exchange-pars
|
|
labels:
|
|
app: lux-exchange
|
|
brand: pars
|
|
spec:
|
|
entryPoints:
|
|
- websecure
|
|
routes:
|
|
- kind: Rule
|
|
match: Host(`pars.market`)
|
|
services:
|
|
- name: exchange-pars
|
|
port: 3000
|
|
tls:
|
|
certResolver: letsencrypt
|
|
domains:
|
|
- main: pars.market
|