rewored monetix gateawy to port 8084
This commit is contained in:
@@ -4,7 +4,7 @@ This service now supports Monetix “payout by card”.
|
|||||||
|
|
||||||
## Runtime entry points
|
## Runtime entry points
|
||||||
- gRPC: `MntxGatewayService.CreateCardPayout` and `GetCardPayoutStatus`.
|
- gRPC: `MntxGatewayService.CreateCardPayout` and `GetCardPayoutStatus`.
|
||||||
- Callback HTTP server (default): `:8080/monetix/callback` for Monetix payout status notifications.
|
- Callback HTTP server (default): `:8084/monetix/callback` for Monetix payout status notifications.
|
||||||
- Metrics: Prometheus on `:9404/metrics`.
|
- Metrics: Prometheus on `:9404/metrics`.
|
||||||
|
|
||||||
## Required config/env
|
## Required config/env
|
||||||
@@ -13,7 +13,7 @@ This service now supports Monetix “payout by card”.
|
|||||||
- `MONETIX_PROJECT_ID` – integer project ID
|
- `MONETIX_PROJECT_ID` – integer project ID
|
||||||
- `MONETIX_SECRET_KEY` – signature secret
|
- `MONETIX_SECRET_KEY` – signature secret
|
||||||
- Optional: `allowed_currencies`, `require_customer_address`, `request_timeout_seconds`
|
- Optional: `allowed_currencies`, `require_customer_address`, `request_timeout_seconds`
|
||||||
- Callback server: `MNTX_GATEWAY_HTTP_PORT` (exposed as 8080), `http.callback.path`, optional `allowed_cidrs`
|
- Callback server: `MNTX_GATEWAY_HTTP_PORT` (exposed as 8084), `http.callback.path`, optional `allowed_cidrs`
|
||||||
|
|
||||||
## Outbound request (CreateCardPayout)
|
## Outbound request (CreateCardPayout)
|
||||||
Payload is built per Monetix spec:
|
Payload is built per Monetix spec:
|
||||||
|
|||||||
@@ -34,7 +34,7 @@ monetix:
|
|||||||
|
|
||||||
http:
|
http:
|
||||||
callback:
|
callback:
|
||||||
address: ":8080"
|
address: ":8084"
|
||||||
path: "/monetix/callback"
|
path: "/monetix/callback"
|
||||||
allowed_cidrs: []
|
allowed_cidrs: []
|
||||||
max_body_bytes: 1048576
|
max_body_bytes: 1048576
|
||||||
|
|||||||
@@ -226,7 +226,7 @@ type callbackRuntimeConfig struct {
|
|||||||
func (i *Imp) resolveCallbackConfig(cfg callbackConfig) (callbackRuntimeConfig, error) {
|
func (i *Imp) resolveCallbackConfig(cfg callbackConfig) (callbackRuntimeConfig, error) {
|
||||||
addr := strings.TrimSpace(cfg.Address)
|
addr := strings.TrimSpace(cfg.Address)
|
||||||
if addr == "" {
|
if addr == "" {
|
||||||
addr = ":8080"
|
addr = ":8084"
|
||||||
}
|
}
|
||||||
path := strings.TrimSpace(cfg.Path)
|
path := strings.TrimSpace(cfg.Path)
|
||||||
if path == "" {
|
if path == "" {
|
||||||
|
|||||||
@@ -37,6 +37,6 @@ COPY api/gateway/mntx/config.yml /app/config.yml
|
|||||||
COPY api/gateway/mntx/entrypoint.sh /app/entrypoint.sh
|
COPY api/gateway/mntx/entrypoint.sh /app/entrypoint.sh
|
||||||
COPY --from=build /out/mntx-gateway /app/mntx-gateway
|
COPY --from=build /out/mntx-gateway /app/mntx-gateway
|
||||||
RUN chmod +x /app/entrypoint.sh
|
RUN chmod +x /app/entrypoint.sh
|
||||||
EXPOSE 50075 9404 8080
|
EXPOSE 50075 9404 8084
|
||||||
ENTRYPOINT ["/app/entrypoint.sh"]
|
ENTRYPOINT ["/app/entrypoint.sh"]
|
||||||
CMD ["/app/mntx-gateway","--config.file","/app/config.yml"]
|
CMD ["/app/mntx-gateway","--config.file","/app/config.yml"]
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "0.0.0.0:${MNTX_GATEWAY_GRPC_PORT:-50075}:50075"
|
- "0.0.0.0:${MNTX_GATEWAY_GRPC_PORT:-50075}:50075"
|
||||||
- "0.0.0.0:${MNTX_GATEWAY_METRICS_PORT:-9404}:9404"
|
- "0.0.0.0:${MNTX_GATEWAY_METRICS_PORT:-9404}:9404"
|
||||||
- "0.0.0.0:${MNTX_GATEWAY_HTTP_PORT:-8080}:8080"
|
- "0.0.0.0:${MNTX_GATEWAY_HTTP_PORT:-8084}:8084"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL","wget -qO- http://localhost:9404/health | grep -q '\"status\":\"ok\"'"]
|
test: ["CMD-SHELL","wget -qO- http://localhost:9404/health | grep -q '\"status\":\"ok\"'"]
|
||||||
interval: 30s
|
interval: 30s
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
}
|
}
|
||||||
handle @monetixSuccess {
|
handle @monetixSuccess {
|
||||||
rewrite * /monetix/callback
|
rewrite * /monetix/callback
|
||||||
reverse_proxy sendico_mntx_gateway:8080
|
reverse_proxy sendico_mntx_gateway:8084
|
||||||
header Cache-Control "no-cache, no-store, must-revalidate"
|
header Cache-Control "no-cache, no-store, must-revalidate"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +54,7 @@
|
|||||||
}
|
}
|
||||||
handle @monetixFail {
|
handle @monetixFail {
|
||||||
rewrite * /monetix/callback
|
rewrite * /monetix/callback
|
||||||
reverse_proxy sendico_mntx_gateway:8080
|
reverse_proxy sendico_mntx_gateway:8084
|
||||||
header Cache-Control "no-cache, no-store, must-revalidate"
|
header Cache-Control "no-cache, no-store, must-revalidate"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user