-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RPP-5: Metalogix specific compose file (#24)
* RPP-5: Metalogix specific compose file * RPP-5: Metalogix specific compose file
- Loading branch information
1 parent
0d3027e
commit de00167
Showing
6 changed files
with
251 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: vth-gateway | ||
id: vth-gateway-1 | ||
|
||
logger: | ||
level: info | ||
mode: dev # or prd | ||
|
||
dapr: | ||
http_port: 6012 | ||
grpc_port: 6011 | ||
|
||
database: | ||
dsn: mongodb%3A%2F%2Fmongodb_dev%3A27017%2F%3FreplicaSet%3Drs0%26tls%3Dfalse%26connect%3Ddirect%26retryWrites%3Dtrue%26w%3Dmajority | ||
name: vth-gateway | ||
|
||
gateway: | ||
web_dir: /src/cmd/web/dist | ||
backoffice_org: org_hiUmCjtFR7ZgEckN | ||
http: | ||
address: 0.0.0.0 | ||
port: 6010 | ||
cors: | ||
allow_credentials: true | ||
allow_origins: | ||
- '*' | ||
allow_headers: | ||
- '*' | ||
allow_methods: | ||
- POST | ||
- GET | ||
- PUT | ||
- DELETE | ||
- PATCH | ||
- HEAD | ||
metrics: | ||
address: 0.0.0.0 | ||
port: 6015 | ||
services: [] | ||
|
||
auth: | ||
domain: ${AUTH_DOMAIN} | ||
jwt: | ||
auth_domain: https://auth.dev.cloud.azarc.dev | ||
aud: https://verathread.com/api/verify | ||
iss: https://dev-iq3b9wdl.us.auth0.com/ | ||
claims: https://verathread.com/claims | ||
|
||
# Enabled dapr in embedded mode, to only be used for local development | ||
# in K8S dapr is automatically injected into the pod as a container and this is not required | ||
development: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
name: gw-dev | ||
|
||
services: | ||
################################################################################## | ||
# GLOBAL COMMON SERVICES | ||
################################################################################## | ||
|
||
shell-fe: | ||
build: | ||
context: . | ||
dockerfile: "deployment/docker/web/Dockerfile.dev" | ||
networks: | ||
- frontend-network | ||
ports: | ||
- "3000:3000" | ||
environment: | ||
DAPR_PLACEMENT_METADATA_ENABLED: true | ||
NODE_ENV: development | ||
develop: | ||
watch: | ||
- action: sync | ||
path: cmd/web | ||
target: /src | ||
|
||
example-fe: | ||
build: | ||
context: . | ||
dockerfile: "example/docker/web/Dockerfile.dev" | ||
networks: | ||
- frontend-network | ||
ports: | ||
- "3001:3001" | ||
environment: | ||
DAPR_PLACEMENT_METADATA_ENABLED: true | ||
NODE_ENV: development | ||
develop: | ||
watch: | ||
- action: sync | ||
path: example/web | ||
target: /src | ||
|
||
gateway-dapr: | ||
image: "daprio/daprd:edge" | ||
command: [ | ||
"./daprd", | ||
"--app-id", "vth-gateway", | ||
"--app-port", "6010", | ||
"--placement-host-address", "placement:50006", # Dapr's placement service can be reach via the docker DNS entry | ||
"--resources-path", "./dapr", | ||
"--dapr-grpc-port", "6011", | ||
"--dapr-http-port", "6012", | ||
"--config", "dapr/config/config.yaml" | ||
] | ||
volumes: | ||
- "./dapr/:/dapr" # Mount our components folder for the runtime to use. The mounted location must match the --resources-path argument. | ||
depends_on: | ||
- gateway | ||
- placement | ||
network_mode: "service:gateway" # Attach the gateway-dapr service to the gateway network namespace | ||
|
||
gateway: | ||
image: ghcr.io/azarc-io/verathread-gateway/gateway-be:v1.51.0 | ||
networks: | ||
- frontend-network | ||
environment: | ||
CONFIG_DIR: /config | ||
BASE_CONTEXT: metalogix | ||
DAPRD_BIN_PATH: /src/.data/bin | ||
AUTH_DOMAIN: ${AUTH_DOMAIN} | ||
DAPR_GRPC_PORT: 6011 | ||
volumes: | ||
- ./cmd/app/config:/config | ||
ports: | ||
- "6010:6010" | ||
depends_on: | ||
- mongodb_dev | ||
|
||
example-dapr: | ||
image: "daprio/daprd:edge" | ||
command: [ | ||
"./daprd", | ||
"--app-id", "vth-gateway-example", | ||
"--app-port", "6110", | ||
"--placement-host-address", "placement:50006", # Dapr's placement service can be reach via the docker DNS entry | ||
"--resources-path", "./dapr", | ||
"--dapr-grpc-port", "6111", | ||
"--dapr-http-port", "6112", | ||
"--config", "dapr/config/config.yaml" | ||
] | ||
volumes: | ||
- "./dapr/:/dapr" # Mount our components folder for the runtime to use. The mounted location must match the --resources-path argument. | ||
depends_on: | ||
- example | ||
- placement | ||
network_mode: "service:example" # Attach the gateway-dapr service to the gateway network namespace | ||
|
||
example: | ||
image: ghcr.io/azarc-io/verathread-gateway/gateway-be-example:v1.51.0 | ||
networks: | ||
- frontend-network | ||
environment: | ||
CONFIG_DIR: /config | ||
BASE_CONTEXT: metalogix | ||
DAPR_GRPC_PORT: 6111 | ||
volumes: | ||
- ./example/app/config:/config | ||
ports: | ||
- "6110:6110" | ||
depends_on: | ||
- gateway | ||
|
||
mongodb_dev: | ||
image: mongo:latest | ||
container_name: mongodb_dev | ||
environment: | ||
MONGO_APP_DATABASE: vth-gateway | ||
MONGO_REPLICA_HOST: host.docker.internal | ||
MONGO_REPLICA_PORT: 27018 | ||
entrypoint: > | ||
/bin/bash -c ' | ||
echo "rs.initiate()" > /docker-entrypoint-initdb.d/1-init-replicaset.js && | ||
echo "db = db.getSiblingDB(process.env[$0]);" > /docker-entrypoint-initdb.d/2-init-db-collection.js && | ||
echo "db.createCollection($1, { capped: false });" >> /docker-entrypoint-initdb.d/2-init-db-collection.js && | ||
echo "db.init.insert([{ message: $2 }]);" >> /docker-entrypoint-initdb.d/2-init-db-collection.js && | ||
/usr/local/bin/docker-entrypoint.sh mongod --replSet rs0 --bind_ip_all --noauth' "'MONGO_APP_DATABASE'" "'init'" "'db initialized successfully'" | ||
networks: | ||
- frontend-network | ||
ports: | ||
- "27018:27017" | ||
volumes: | ||
- ./.data/mongodb:/data/db | ||
- ./.data/mongodb/opt:/opt/keyfile/ | ||
|
||
placement: | ||
image: "daprio/dapr" | ||
command: [ "./placement", "-port", "50006" ] | ||
networks: | ||
- frontend-network | ||
ports: | ||
- "8080:8080" | ||
- "50006:50006" | ||
environment: | ||
DAPR_PLACEMENT_METADATA_ENABLED: true | ||
|
||
networks: | ||
frontend-network: | ||
driver: bridge | ||
ipam: | ||
driver: default | ||
config: | ||
- subnet: 172.16.238.0/24 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: vth-gateway-example | ||
id: vth-gateway-example-1 | ||
webDir: web/dist | ||
|
||
logger: | ||
level: info | ||
mode: dev # or prd | ||
|
||
dapr: | ||
http_port: 6112 | ||
grpc_port: 6111 | ||
|
||
http: | ||
address: 0.0.0.0 | ||
port: 6110 | ||
|
||
registration: | ||
webBaseUrl: http://example:6110 | ||
baseWsUrl: ws://example:6110 | ||
|
||
# Enabled dapr in embedded mode, to only be used for local development | ||
# in K8S dapr is automatically injected into the pod as a container and this is not required | ||
development: | ||
enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
FROM alpine:3.20 | ||
LABEL authors="waeljammal" | ||
COPY bin/vth-gateway-example / | ||
ENTRYPOINT ["/vth-gateway-example"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters