Skip to content

Commit

Permalink
Merge branch 'miner-automine' of github.com:cloudwalk/stratus into mi…
Browse files Browse the repository at this point in the history
…ner-automine
  • Loading branch information
dinhani-cw committed May 22, 2024
2 parents 63ad511 + d1f2bc5 commit 503310e
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 8 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
!docker/Dockerfile.run_with_importer
!src/
!.cargo/
!config/
!Cargo.toml
!Cargo.lock
!static/
Expand Down
27 changes: 25 additions & 2 deletions chaos/local-deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ spec:
containers:
- name: stratus-api
image: local/run_with_importer:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 3000
name: http
Expand Down Expand Up @@ -57,9 +58,31 @@ spec:
fieldRef:
fieldPath: spec.serviceAccountName
- name: ENVIRONMENT
value: staging
value: local
- name: ENV
value: staging
value: local
livenessProbe:
httpGet:
path: /liveness
port: 3000
initialDelaySeconds: 15
periodSeconds: 10
timeoutSeconds: 5
readinessProbe:
httpGet:
path: /readiness
port: 3000
initialDelaySeconds: 5
periodSeconds: 5
timeoutSeconds: 5
startupProbe:
httpGet:
path: /startup
port: 3000
initialDelaySeconds: 10
periodSeconds: 5
failureThreshold: 60
timeoutSeconds: 5
volumeMounts:
- mountPath: /app/data
name: rocksdata
Expand Down
14 changes: 8 additions & 6 deletions chaos/local-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,11 @@ spec:
selector:
app: stratus-api
ports:
- protocol: TCP
port: 3000
targetPort: 3000
- protocol: TCP
port: 9000
targetPort: 9000
- name: http
protocol: TCP
port: 80
targetPort: 8080
- name: https
protocol: TCP
port: 443
targetPort: 8443
7 changes: 7 additions & 0 deletions config/run-with-importer.env.local
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,10 @@ PERM_STORAGE_CONNECTIONS=2
PERM_STORAGE_TIMEOUT=1000

TEMP_STORAGE=inmemory

RUST_LOG=debug
RUST_BACKTRACE=1,
LEADER_NODE=stratus-api-0
SYNC_INTERVAL=10ms
FORWARD_TO=http://spec.testnet.cloudwalk.network:9934
JSON_LOGS=1
2 changes: 2 additions & 0 deletions docker/Dockerfile.run_with_importer
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ COPY build.rs /app/build.rs
COPY Cargo.toml /app/Cargo.toml
COPY Cargo.lock /app/Cargo.lock
COPY .cargo .cargo
COPY config /app/config

RUN apt update
RUN apt-get install -y libclang-dev cmake
Expand All @@ -22,5 +23,6 @@ RUN cargo build --release --bin run-with-importer --features metrics,rocks
FROM rust:1.75 as runtime
WORKDIR /app
COPY --from=builder /app/target/release/run-with-importer /app/run-with-importer
COPY --from=builder /app/config/* /app/config/

CMD ["sh", "-c", "/app/run-with-importer"]

0 comments on commit 503310e

Please sign in to comment.