Skip to content

Commit

Permalink
Add two apis (#518)
Browse files Browse the repository at this point in the history
* Update Dockerfile to support container

* Update production yaml

- Remove worker;
- Add new api;
- Reduce to 1 replica.

---------

Co-authored-by: Maycon Amaro <[email protected]>
  • Loading branch information
scalone and mayconamaroCW authored Apr 3, 2024
1 parent 6c5ef83 commit d4dcfec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,5 @@ RUN cargo build --release
FROM rust:1.75 as runtime
WORKDIR /app
COPY --from=builder /app/target/release/stratus /app/stratus
CMD ["/app/stratus"]

CMD ["sh", "-c", "/app/stratus", "--pem-storage=$PERM_STORAGE", "--perm-storage-connections=$PERM_STORAGE_CONNECTIONS", "--perm-storage-timeout=$PERM_STORAGE_TIMEOUT", "--chain-id=$CHAIN_ID", "--blocking-threads=$BLOCKING_THREADS"]
15 changes: 10 additions & 5 deletions config/production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ kubernetes:
asmRevision: asm-managed-stable
apps:
# --------------------------------------------------------------------------
# EVM api
# EVM api hybrid storage
# --------------------------------------------------------------------------
- name: stratus-api
secretsManager:
Expand All @@ -34,7 +34,7 @@ kubernetes:
rollingUpdate:
maxSurge: 1
maxUnavailable: 0
replicas: 2
replicas: 1
resources:
requests:
cpu: 30000m
Expand All @@ -61,11 +61,10 @@ kubernetes:
path: /health
port: 3000
timeoutSeconds: 5

# --------------------------------------------------------------------------
# worker
# EVM api postgres storage
# --------------------------------------------------------------------------
- name: stratus-worker
- name: stratus-api-postgres
secretsManager:
enabled: true
provider: gcpsm
Expand All @@ -89,6 +88,12 @@ kubernetes:
path: "/"
port: "9000"
ports:
- containerPort: 3000
name: app
virtualservice:
gateway: internal
hosts:
- stratus-api-postgres.services.production.cloudwalk.network
- containerPort: 9000
name: metrics
healthcheck:
Expand Down

0 comments on commit d4dcfec

Please sign in to comment.