diff --git a/.cspell.project-words.txt b/.cspell.project-words.txt index 41f1fc9..a27ddbb 100644 --- a/.cspell.project-words.txt +++ b/.cspell.project-words.txt @@ -97,3 +97,4 @@ itest TENV tenv chrono +dozzle diff --git a/local-dev/.env-example b/local-dev/.env-example index c953306..7fb407d 100644 --- a/local-dev/.env-example +++ b/local-dev/.env-example @@ -6,13 +6,14 @@ DOCKER_PORT_GRPC=50051 STORAGE_PORT_GRPC=50051 LOG_CONFIG=/log4rs.yaml REST_CONCURRENCY_LIMIT_PER_SERVICE=5 -REST_CORS_ALLOWED_ORIGIN=http://localhost:3000 +REST_CORS_ALLOWED_ORIGIN=* REST_REQUEST_LIMIT_PER_SECOND=2 +DOZZLE_PORT=9998 # ----------------------------------------------------------- # Rabbitmq Settings # ----------------------------------------------------------- -AMQP__URL=amqp://arrow-rabbitmq:5672 +AMQP__URL=amqp://aetheric-rabbitmq:5672 AMQP__POOL__MAX_SIZE=16 AMQP__POOL__TIMEOUTS__WAIT__SECS=2 AMQP__POOL__TIMEOUTS__WAIT__NANOS=0 @@ -20,7 +21,7 @@ AMQP__POOL__TIMEOUTS__WAIT__NANOS=0 # ----------------------------------------------------------- # Redis Settings # ----------------------------------------------------------- -REDIS__URL=redis://arrow-redis:6379 +REDIS__URL=redis://aetheric-redis:6379 REDIS__POOL__MAX_SIZE=16 REDIS__POOL__TIMEOUTS__WAIT__SECS=2 REDIS__POOL__TIMEOUTS__WAIT__NANOS=0 @@ -39,16 +40,16 @@ SERVER_HOSTNAME=localhost # ----------------------------------------------------------- # svc-assets # ----------------------------------------------------------- -ASSETS_IMAGE=ghcr.io/arrow-air/svc-assets +ASSETS_IMAGE=ghcr.io/aetheric-oss/svc-assets ASSETS_TAG=latest-develop ASSETS_HOST_PORT_GRPC=50000 -ASSETS_HOST_PORT_REST=8000 +ASSETS_HOST_PORT_REST=8030 ASSETS_HOST_GRPC=svc-assets # ----------------------------------------------------------- # svc-atc # ----------------------------------------------------------- -ATC_IMAGE=ghcr.io/arrow-air/svc-atc +ATC_IMAGE=ghcr.io/aetheric-oss/svc-atc ATC_TAG=latest-develop ATC_HOST_PORT_GRPC=50001 ATC_HOST_PORT_REST=8001 @@ -57,7 +58,7 @@ ATC_HOST_GRPC=svc-atc # ----------------------------------------------------------- # svc-cargo # ----------------------------------------------------------- -CARGO_IMAGE=ghcr.io/arrow-air/svc-cargo +CARGO_IMAGE=ghcr.io/aetheric-oss/svc-cargo CARGO_TAG=latest-develop CARGO_HOST_PORT_GRPC=50002 CARGO_HOST_PORT_REST=8002 @@ -66,7 +67,7 @@ CARGO_HOST_GRPC=svc-cargo # ----------------------------------------------------------- # svc-compliance # ----------------------------------------------------------- -COMPLIANCE_IMAGE=ghcr.io/arrow-air/svc-compliance +COMPLIANCE_IMAGE=ghcr.io/aetheric-oss/svc-compliance COMPLIANCE_TAG=latest-develop COMPLIANCE_HOST_PORT_GRPC=50003 COMPLIANCE_HOST_PORT_REST=8003 @@ -75,7 +76,7 @@ COMPLIANCE_HOST_GRPC=svc-compliance # ----------------------------------------------------------- # svc-gis # ----------------------------------------------------------- -GIS_IMAGE=ghcr.io/arrow-air/svc-gis +GIS_IMAGE=ghcr.io/aetheric-oss/svc-gis GIS_TAG=latest-develop GIS_HOST_PORT_GRPC=50008 GIS_HOST_GRPC=svc-gis @@ -83,7 +84,7 @@ GIS_HOST_GRPC=svc-gis # ----------------------------------------------------------- # svc-pricing # ----------------------------------------------------------- -PRICING_IMAGE=ghcr.io/arrow-air/svc-pricing +PRICING_IMAGE=ghcr.io/aetheric-oss/svc-pricing PRICING_TAG=latest-develop PRICING_HOST_PORT_GRPC=50009 PRICING_HOST_GRPC=svc-pricing @@ -91,7 +92,7 @@ PRICING_HOST_GRPC=svc-pricing # ----------------------------------------------------------- # svc-scheduler # ----------------------------------------------------------- -SCHEDULER_IMAGE=ghcr.io/arrow-air/svc-scheduler +SCHEDULER_IMAGE=ghcr.io/aetheric-oss/svc-scheduler SCHEDULER_TAG=latest-develop SCHEDULER_HOST_PORT_GRPC=50010 SCHEDULER_HOST_GRPC=svc-scheduler @@ -99,7 +100,7 @@ SCHEDULER_HOST_GRPC=svc-scheduler # ----------------------------------------------------------- # svc-storage # ----------------------------------------------------------- -STORAGE_IMAGE=ghcr.io/arrow-air/svc-storage +STORAGE_IMAGE=ghcr.io/aetheric-oss/svc-storage STORAGE_TAG=latest-develop STORAGE_HOST_PORT_GRPC=50011 STORAGE_HOST_GRPC=svc-storage @@ -107,7 +108,7 @@ STORAGE_HOST_GRPC=svc-storage # ----------------------------------------------------------- # svc-telemetry # ----------------------------------------------------------- -TELEMETRY_IMAGE=ghcr.io/arrow-air/svc-telemetry +TELEMETRY_IMAGE=ghcr.io/aetheric-oss/svc-telemetry TELEMETRY_TAG=latest-develop TELEMETRY_HOST_PORT_GRPC=50012 TELEMETRY_HOST_PORT_REST=8012 @@ -116,7 +117,7 @@ TELEMETRY_HOST_GRPC=svc-telemetry # ----------------------------------------------------------- # svc-discovery # ----------------------------------------------------------- -DISCOVERY_IMAGE=ghcr.io/arrow-air/svc-discovery +DISCOVERY_IMAGE=ghcr.io/aetheric-oss/svc-discovery DISCOVERY_TAG=latest-develop DISCOVERY_HOST_PORT_GRPC=50013 DISCOVERY_HOST_PORT_REST=8013 @@ -125,17 +126,18 @@ DISCOVERY_HOST_GRPC=svc-discovery # ----------------------------------------------------------- # svc-contact # ----------------------------------------------------------- -CONTACT_IMAGE=ghcr.io/arrow-air/svc-contact +CONTACT_IMAGE=ghcr.io/aetheric-oss/svc-contact CONTACT_TAG=latest-develop CONTACT_HOST_PORT_GRPC=50014 CONTACT_HOST_PORT_REST=8014 CONTACT_HOST_GRPC=svc-contact +POSTMARK_TOKEN=REPLACE_ME # ----------------------------------------------------------- # svc-itest # ----------------------------------------------------------- -ITEST_IMAGE=ghcr.io/arrow-air/svc-itest +ITEST_IMAGE=ghcr.io/aetheric-oss/svc-itest ITEST_TAG=latest-develop -ITEST_HOST_PORT_GRPC=50014 +ITEST_HOST_PORT_GRPC=50099 ITEST_HOST_PORT_REST=8099 ITEST_HOST_GRPC=svc-itest diff --git a/local-dev/docker-compose.yml b/local-dev/docker-compose.yml index 0aa479a..5f8c5dc 100644 --- a/local-dev/docker-compose.yml +++ b/local-dev/docker-compose.yml @@ -27,25 +27,25 @@ services: cockroachdb-init: condition: service_completed_successfully - arrow-gis-init-ssl: + aetheric-gis-init-ssl: extends: - file: docker-compose/arrow-gis/svc.yml + file: docker-compose/aetheric-gis/svc.yml service: init-ssl - arrow-gis-init: + aetheric-gis-init: extends: - file: docker-compose/arrow-gis/svc.yml + file: docker-compose/aetheric-gis/svc.yml service: init depends_on: - arrow-gis-init-ssl: + aetheric-gis-init-ssl: condition: service_completed_successfully - arrow-gis: + aetheric-gis: extends: - file: docker-compose/arrow-gis/svc.yml + file: docker-compose/aetheric-gis/svc.yml service: server depends_on: - arrow-gis-init: + aetheric-gis-init: condition: service_completed_successfully redis: @@ -60,9 +60,9 @@ services: svc-storage: image: ${STORAGE_IMAGE}:${STORAGE_TAG} - container_name: arrow-svc-storage + container_name: aetheric-svc-storage extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: cockroachdb: @@ -74,23 +74,24 @@ services: read_only: true command: --rebuild-psql=true --init-psql=true environment: + - USE_TLS=true - PG__USER=svc_storage - - PG__DBNAME=arrow + - PG__DBNAME=realm - PG__HOST=cockroachdb - PG__PORT=26257 - - PG__SSLMODE=require + - PG__SSLMODE=Require - DB_CA_CERT=/cockroach/ssl/certs/ca.crt - DB_CLIENT_CERT=/cockroach/ssl/certs/client.svc_storage.crt - DB_CLIENT_KEY=/cockroach/ssl/certs/client.svc_storage.key.pk8 svc-gis: image: ${GIS_IMAGE}:${GIS_TAG} - container_name: arrow-svc-gis + container_name: aetheric-svc-gis extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: - arrow-gis: + aetheric-gis: condition: service_healthy redis: condition: service_healthy @@ -102,7 +103,7 @@ services: environment: - PG__USER=svc_gis - PG__DBNAME=gis - - PG__HOST=arrow-gis + - PG__HOST=aetheric-gis - PG__PORT=5432 - PG__SSLMODE=require - DB_CA_CERT=/ssl/certs/root.crt @@ -111,9 +112,9 @@ services: svc-compliance: image: ${COMPLIANCE_IMAGE}:${COMPLIANCE_TAG} - container_name: arrow-svc-compliance + container_name: aetheric-svc-compliance extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: svc-gis: @@ -126,9 +127,9 @@ services: svc-scheduler: image: ${SCHEDULER_IMAGE}:${SCHEDULER_TAG} - container_name: arrow-svc-scheduler + container_name: aetheric-svc-scheduler extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: svc-gis: @@ -138,16 +139,16 @@ services: svc-pricing: image: ${PRICING_IMAGE}:${PRICING_TAG} - container_name: arrow-svc-pricing + container_name: aetheric-svc-pricing extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server svc-cargo: image: ${CARGO_IMAGE}:${CARGO_TAG} - container_name: arrow-svc-cargo + container_name: aetheric-svc-cargo extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server ports: - ${CARGO_HOST_PORT_REST}:8000 @@ -165,9 +166,11 @@ services: svc-assets: image: ${ASSETS_IMAGE}:${ASSETS_TAG} - container_name: arrow-svc-assets + container_name: aetheric-svc-assets + ports: + - ${ASSETS_HOST_PORT_REST}:8000 extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: svc-storage: @@ -175,11 +178,11 @@ services: svc-contact: image: ${CONTACT_IMAGE}:${CONTACT_TAG} - container_name: arrow-svc-contact + container_name: aetheric-svc-contact ports: - ${CONTACT_HOST_PORT_REST}:8000 extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: svc-storage: @@ -187,9 +190,11 @@ services: svc-atc: image: ${ATC_IMAGE}:${ATC_TAG} - container_name: arrow-svc-atc + container_name: aetheric-svc-atc + ports: + - ${ATC_HOST_PORT_REST}:8000 extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: svc-storage: @@ -197,11 +202,11 @@ services: svc-telemetry: image: ${TELEMETRY_IMAGE}:${TELEMETRY_TAG} - container_name: arrow-svc-telemetry + container_name: aetheric-svc-telemetry ports: - ${TELEMETRY_HOST_PORT_REST}:8000 extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: svc-gis: @@ -217,11 +222,11 @@ services: svc-discovery: image: ${DISCOVERY_IMAGE}:${DISCOVERY_TAG} - container_name: arrow-svc-discovery + container_name: aetheric-svc-discovery ports: - ${DISCOVERY_HOST_PORT_REST}:8000 extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: svc-gis: @@ -231,11 +236,11 @@ services: svc-itest: image: ${ITEST_IMAGE}:${ITEST_TAG} - container_name: arrow-svc-itest + container_name: aetheric-svc-itest ports: - ${ITEST_HOST_PORT_REST}:8000 extends: - file: docker-compose/arrow-svc.yml + file: docker-compose/aetheric-svc.yml service: server depends_on: svc-telemetry: @@ -248,3 +253,12 @@ services: condition: service_healthy svc-compliance: condition: service_healthy + + dozzle: + container_name: aetheric-dozzle + image: amir20/dozzle:latest + volumes: + - /var/run/docker.sock:/var/run/docker.sock + ports: + - ${DOZZLE_PORT}:8080 + restart: always diff --git a/local-dev/docker-compose/arrow-gis/scripts/docker-entrypoint-init.sh b/local-dev/docker-compose/aetheric-gis/scripts/docker-entrypoint-init.sh similarity index 100% rename from local-dev/docker-compose/arrow-gis/scripts/docker-entrypoint-init.sh rename to local-dev/docker-compose/aetheric-gis/scripts/docker-entrypoint-init.sh diff --git a/local-dev/docker-compose/arrow-gis/scripts/init.sql b/local-dev/docker-compose/aetheric-gis/scripts/init.sql similarity index 100% rename from local-dev/docker-compose/arrow-gis/scripts/init.sql rename to local-dev/docker-compose/aetheric-gis/scripts/init.sql diff --git a/local-dev/docker-compose/arrow-gis/scripts/postgis-init.sh b/local-dev/docker-compose/aetheric-gis/scripts/postgis-init.sh similarity index 100% rename from local-dev/docker-compose/arrow-gis/scripts/postgis-init.sh rename to local-dev/docker-compose/aetheric-gis/scripts/postgis-init.sh diff --git a/local-dev/docker-compose/arrow-gis/svc.yml b/local-dev/docker-compose/aetheric-gis/svc.yml similarity index 94% rename from local-dev/docker-compose/arrow-gis/svc.yml rename to local-dev/docker-compose/aetheric-gis/svc.yml index e86f60e..d69c3fe 100644 --- a/local-dev/docker-compose/arrow-gis/svc.yml +++ b/local-dev/docker-compose/aetheric-gis/svc.yml @@ -6,7 +6,7 @@ volumes: services: init-ssl: - container_name: arrow-gis-init-ssl + container_name: aetheric-gis-init-ssl image: ghcr.io/arrow-air/tools/arrow-gis:1.0 volumes: - type: volume @@ -26,7 +26,7 @@ services: - GID=1001 init: - container_name: arrow-gis-init + container_name: aetheric-gis-init image: ghcr.io/arrow-air/tools/arrow-gis:1.0 user: "postgres:1001" volumes: @@ -53,7 +53,7 @@ services: - SERVER_HOSTNAME server: - container_name: arrow-gis + container_name: aetheric-gis image: ghcr.io/arrow-air/tools/arrow-gis:1.0 restart: always user: "postgres:1001" diff --git a/local-dev/docker-compose/aetheric-svc.yml b/local-dev/docker-compose/aetheric-svc.yml new file mode 100644 index 0000000..bd58e58 --- /dev/null +++ b/local-dev/docker-compose/aetheric-svc.yml @@ -0,0 +1,38 @@ +--- +version: "3.6" + +services: + server: + healthcheck: + test: + [ + "CMD", + "grpc_health_probe", + "-addr", + "localhost:${DOCKER_PORT_GRPC}" + ] + interval: 5s + timeout: 5s + retries: 3 + start_period: 30s + volumes: + - type: bind + source: logs/ + target: /logs/ + configs: + - source: log4rs + target: ${LOG_CONFIG} + - source: dot-env + target: /.env + environment: + - ASSETS_PORT_GRPC=${DOCKER_PORT_GRPC} + - ATC_PORT_GRPC=${DOCKER_PORT_GRPC} + - CARGO_PORT_GRPC=${DOCKER_PORT_GRPC} + - COMPLIANCE_PORT_GRPC=${DOCKER_PORT_GRPC} + - CONTACT_PORT_GRPC=${DOCKER_PORT_GRPC} + - DISCOVERY_PORT_GRPC=${DOCKER_PORT_GRPC} + - GIS_PORT_GRPC=${DOCKER_PORT_GRPC} + - PRICING_PORT_GRPC=${DOCKER_PORT_GRPC} + - SCHEDULER_PORT_GRPC=${DOCKER_PORT_GRPC} + - STORAGE_PORT_GRPC=${DOCKER_PORT_GRPC} + - TELEMETRY_PORT_GRPC=${DOCKER_PORT_GRPC} diff --git a/local-dev/docker-compose/arrow-svc.yml b/local-dev/docker-compose/arrow-svc.yml deleted file mode 100644 index c7bc372..0000000 --- a/local-dev/docker-compose/arrow-svc.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -version: "3.6" - -services: - server: - healthcheck: - test: - [ - "CMD", - "grpc_health_probe", - "-addr", - "localhost:${DOCKER_PORT_GRPC}" - ] - interval: 2s - timeout: 1s - retries: 3 - start_period: 30s - volumes: - - type: bind - source: logs/ - target: /logs/ - configs: - - source: log4rs - target: ${LOG_CONFIG} - - source: dot-env - target: /.env - environment: - - DOCKER_PORT_REST - - DOCKER_PORT_GRPC - - LOG_CONFIG - - REDIS__URL - - REDIS__POOL__MAX_SIZE - - REDIS__POOL__TIMEOUTS__WAIT__SECS - - REDIS__POOL__TIMEOUTS__WAIT__NANOS - - AMQP__URL - - AMQP__POOL__MAX_SIZE - - AMQP__POOL__TIMEOUTS__WAIT__SECS - - AMQP__POOL__TIMEOUTS__WAIT__NANOS - - ASSETS_PORT_GRPC=$DOCKER_PORT_GRPC - - ASSETS_PORT_REST - - ASSETS_HOST_GRPC - - ATC_PORT_GRPC=$DOCKER_PORT_GRPC - - ATC_PORT_REST - - ATC_HOST_GRPC - - CARGO_PORT_GRPC=$DOCKER_PORT_GRPC - - CARGO_PORT_REST - - CARGO_HOST_GRPC - - COMPLIANCE_PORT_GRPC=$DOCKER_PORT_GRPC - - COMPLIANCE_PORT_REST - - COMPLIANCE_HOST_GRPC - - GIS_PORT_GRPC=$DOCKER_PORT_GRPC - - GIS_HOST_GRPC - - PRICING_PORT_GRPC=$DOCKER_PORT_GRPC - - PRICING_HOST_GRPC - - SCHEDULER_PORT_GRPC=$DOCKER_PORT_GRPC - - SCHEDULER_HOST_GRPC - - STORAGE_PORT_GRPC=$DOCKER_PORT_GRPC - - STORAGE_HOST_GRPC - - TELEMETRY_PORT_GRPC=$DOCKER_PORT_GRPC - - TELEMETRY_PORT_REST - - TELEMETRY_HOST_GRPC - - DISCOVERY_PORT_GRPC=$DOCKER_PORT_GRPC - - DISCOVERY_PORT_REST - - DISCOVERY_HOST_GRPC - - REST_CONCURRENCY_LIMIT_PER_SERVICE - - REST_CORS_ALLOWED_ORIGIN - - REST_REQUEST_LIMIT_PER_SECOND diff --git a/local-dev/docker-compose/cockroachdb/scripts/init.sql b/local-dev/docker-compose/cockroachdb/scripts/init.sql index 48102c6..41467d8 100644 --- a/local-dev/docker-compose/cockroachdb/scripts/init.sql +++ b/local-dev/docker-compose/cockroachdb/scripts/init.sql @@ -1,4 +1,4 @@ /* Initializes empty arrow database with svc_storage user, only on first database run */ -CREATE DATABASE arrow; +CREATE DATABASE realm; CREATE USER svc_storage; -GRANT ALL PRIVILEGES ON DATABASE arrow TO svc_storage; +GRANT ALL PRIVILEGES ON DATABASE realm TO svc_storage; diff --git a/local-dev/docker-compose/cockroachdb/svc.yml b/local-dev/docker-compose/cockroachdb/svc.yml index e63ff77..4c10fbb 100644 --- a/local-dev/docker-compose/cockroachdb/svc.yml +++ b/local-dev/docker-compose/cockroachdb/svc.yml @@ -6,7 +6,7 @@ volumes: services: init: - container_name: arrow-cockroachdb-init + container_name: aetheric-cockroachdb-init image: cockroachdb/cockroach:latest-v22.1 volumes: - type: volume @@ -23,7 +23,7 @@ services: command: ["/scripts/cockroachdb-init.sh"] server: - container_name: arrow-cockroachdb + container_name: aetheric-cockroachdb image: cockroachdb/cockroach:latest-v22.1 volumes: - type: bind @@ -38,8 +38,8 @@ services: read_only: true healthcheck: test: "curl -sf http://localhost:8080 > /dev/null" - interval: 2s - timeout: 1s + interval: 5s + timeout: 5s retries: 3 ports: - 26257:26257 diff --git a/local-dev/docker-compose/rabbitmq/svc.yml b/local-dev/docker-compose/rabbitmq/svc.yml index 364600b..ab1d1ec 100644 --- a/local-dev/docker-compose/rabbitmq/svc.yml +++ b/local-dev/docker-compose/rabbitmq/svc.yml @@ -5,7 +5,7 @@ volumes: services: server: - container_name: arrow-rabbitmq + container_name: aetheric-rabbitmq image: rabbitmq:3.11-alpine restart: always ports: diff --git a/local-dev/docker-compose/redis/svc.yml b/local-dev/docker-compose/redis/svc.yml index 7c5e4f6..83e70ec 100644 --- a/local-dev/docker-compose/redis/svc.yml +++ b/local-dev/docker-compose/redis/svc.yml @@ -5,16 +5,16 @@ volumes: services: server: - container_name: arrow-redis - image: redis:6.2-alpine + container_name: aetheric-redis + image: redis:7.4-alpine restart: always ports: - 6379:6379 command: redis-server --save 20 1 --loglevel warning healthcheck: test: ["CMD", "redis-cli", "ping"] - interval: 2s - timeout: 1s + interval: 5s + timeout: 5s retries: 3 volumes: - redis-data:/data