diff --git a/.env.desmos b/.env.desmos.example similarity index 70% rename from .env.desmos rename to .env.desmos.example index a737e5a..0b2bc92 100644 --- a/.env.desmos +++ b/.env.desmos.example @@ -32,6 +32,10 @@ OPERATOR_ORGANIZATION_IDENTIFIER= # This domain must be reachable from the public internet and # properly configured with DNS records and valid TLS certificates. # +# Note: The API_EXTERNAL_DOMAIN must be set to a valid domain name that points to the Desmos service. This domain is used for external access to the Desmos API and should be configured with appropriate DNS records and SSL/TLS certificates. +# Please be sure to use the full URL, including the protocol (http:// or https://), and ensure that the domain is publicly accessible and properly configured with DNS records and valid TLS certificates. + # Example: -# API_EXTERNAL_DOMAIN=https://desmos.example.org -API_EXTERNAL_DOMAIN= \ No newline at end of file +#API_EXTERNAL_DOMAIN=https://desmos.example.org +API_EXTERNAL_DOMAIN= + diff --git a/.env.dlt-adapter-alastria b/.env.dlt-adapter-alastria.example similarity index 83% rename from .env.dlt-adapter-alastria rename to .env.dlt-adapter-alastria.example index 49fe6e0..2d3f2fd 100644 --- a/.env.dlt-adapter-alastria +++ b/.env.dlt-adapter-alastria.example @@ -1,7 +1,20 @@ DEBUG=* + +# Use the private key obtained from Dome Access Node Keys Generator ( https://dome-marketplace.github.io/dome-crypto-generator/ ) +# Example +# PRIVATE_KEY=0xcc80... PRIVATE_KEY= -DOME_EVENTS_CONTRACT_ADDRESS=0xeBA8507227af9e6DfB8D4575549C52457112C957 + +# Use the DLT address obtained from Dome Access Node Keys Generator ( https://dome-marketplace.github.io/dome-crypto-generator/ ) +# Example +# DOME_EVENTS_CONTRACT_ADDRESS=0xeBA850... +DOME_EVENTS_CONTRACT_ADDRESS= + DOME_EVENTS_CONTRACT_ABI=[ { "anonymous": false, "inputs": [ { "indexed": false, "internalType": "uint256", "name": "index", "type": "uint256" }, { "indexed": false, "internalType": "uint256", "name": "timestamp", "type": "uint256" }, { "indexed": true, "internalType": "bytes32", "name": "publisherAddress", "type": "bytes32" }, { "indexed": false, "internalType": "address", "name": "authorAddress", "type": "address\"AuthorAddress", "type": "address" }, { "indexed": true, "internalType": "bytes32", "name": "entityIDHash", "type": "bytes32" }, { "indexed": true, "internalType": "bytes32", "name": "previousEntityHash", "type": "bytes32" }, { "indexed": false, "internalType": "string", "name": "eventType", "type": "string" }, { "indexed": false, "internalType": "string", "name": "dataLocation", "type": "string" }, { "indexed": false, "internalType": "string[]", "name": "metadata", "type": "string[]" } ], "name": "EventDOMEv1", "type": "event" }, { "anonymous": false, "inputs": [ { "indexed": true, "internalType": "address", "name": "previousOwner", "type": "address" }, { "indexed": true, "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "OwnershipTransferred", "type": "event" }, { "inputs": [ { "internalType": "bytes32", "name": "_publisherAddress", "type": "bytes32" }, { "internalType": "address", "name": "_authorAdress", "type": "address" }, { "internalType": "bytes32", "name": "_entityIDHash", "type": "bytes32" }, { "internalType": "bytes32", "name": "_previousEntityHash", "type": "bytes32" }, { "internalType": "string", "name": "_eventType", "type": "string" }, { "internalType": "string", "name": "_dataLocation", "type": "string" }, { "internalType": "string[]", "name": "_metadata", "type": "string[]" } ], "name": "emitNewEvent", "outputs": [ { "internalType": "bool", "name": "", "type": "bool" } ], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [], "name": "index", "outputs": [ { "internalType": "uint256", "name": "", "type": "uint256" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "owner", "outputs": [ { "internalType": "address", "name": "", "type": "address" } ], "stateMutability": "view", "type": "function" }, { "inputs": [], "name": "renounceOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" }, { "inputs": [ { "internalType": "address", "name": "newOwner", "type": "address" } ], "name": "transferOwnership", "outputs": [], "stateMutability": "nonpayable", "type": "function" } ] DOME_PRODUCTION_BLOCK_NUMBER=118733266 RPC_ADDRESS=https://red-t.alastria.io/v0/9461d9f4292b41230527d57ee90652a6 -ISS=0x6a2f383855cba0fff292455ccd908c4a08d6c07f5ef139b5afcef4cf62d4798b + +Use the ISS obtained from Dome Access Node Keys Generator ( https://dome-marketplace.github.io/dome-crypto-generator/ ) +# Example +# ISS=0x6a2f383... +ISS= diff --git a/.gitignore b/.gitignore index 5a6a8e4..a84f2f4 100644 --- a/.gitignore +++ b/.gitignore @@ -22,3 +22,10 @@ assets/* # Ignore everything in postgres-init except SQL files postgres-init/* !postgres-init/*.sql + + +#Ignore customized .env files +.env.desmos +.env.dlt-adapter-alastria +.secrets.desmos +Caddyfile.example diff --git a/.secrets.desmos b/.secrets.desmos.example similarity index 84% rename from .secrets.desmos rename to .secrets.desmos.example index ece9e76..865dea8 100644 --- a/.secrets.desmos +++ b/.secrets.desmos.example @@ -17,9 +17,11 @@ # SECURITY_PRIVATE_KEY=0xabc123... SECURITY_PRIVATE_KEY= + # Base64-encoded LEAR credential obtained from the LEARCredentialMachine # stored in your wallet. +# Note: the LEAR credential string is a JWT, so it seems to be a Base64 string, but it is Note. You have to encode it in base64 again # # Example: # SECURITY_LEAR_CREDENTIAL_MACHINE_IN_BASE64=ZXlKaGJHY2lPaUpJVXpJMU5pSXNJbXRwWkNJNkltRjFZV3h6SWpwN0ltbGtJam9pYkd4aGJtNWxJam9pT0RZME5Ea3hOakV3TWpBeE1 -SECURITY_LEAR_CREDENTIAL_MACHINE_IN_BASE64= \ No newline at end of file +SECURITY_LEAR_CREDENTIAL_MACHINE_IN_BASE64= diff --git a/Caddyfile b/Caddyfile.example similarity index 73% rename from Caddyfile rename to Caddyfile.example index 8d6ddbb..41d8b26 100644 --- a/Caddyfile +++ b/Caddyfile.example @@ -3,6 +3,12 @@ } # Access Node API Gateway + +# Replace with full domain name to enable https and TLS certificates, without specifying the protocol +# Do NOT use the protocol, just the domain name +# example: desmos.example.org + +# use ":80" only for testing (http, without certificates) :80 { # TMForum APIs handle_path /tmf-api/accountManagement* { @@ -62,6 +68,19 @@ reverse_proxy desmos:8080 } + # DOZZLE + # Please uncomment this directive to enable proxy for dozzle + # If you disable it, Dozzle will only be reachable from the local dozzle port (usually only from your private network) + # Ex. https://dome.mydomain.com:8888 + # + # If you enable proxy, Dozzle will be available to everyone in the /dozzle folder + # ex: https://dome.mydomain.com/dozzle + + handle /dozzle* { + reverse_proxy dozzle:8080 + } + + # Fallback handle { error "Not Found" 404 diff --git a/README.md b/README.md index c454dde..73fc256 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ This README defines the formal requirements for the description of the Docker Compose file which implements a DOME Access Node using Docker Compose. The objective of this repo is to facilitate an Access Node implementation which is easy to understand, install and operate for those entities external to DOME which wish to use this form of Access Node. -The Docker Compose version of the Access Node is intended to be run externally to the DOME instance, so it should be self-contained and do not require any access to any service inside the DOME instance. The only communication between with the Access Node runnin in the DOME instance is for the replication protocol, implemented by the Desmos service. +The Docker Compose version of the Access Node is intended to be run externally to the DOME instance, so it should be self-contained and do not require any access to any service inside the DOME instance. The only communication between with the Access Node running in the DOME instance is for the replication protocol, implemented by the Desmos service. -To ensure all services remain integrated and documented, we use a metadata-as-code approach, including information about the services and their dependencies directly in the `compose.yaml` file. +To ensure that all services remain integrated and documented, we use a metadata-as-code approach, including information about the services and their dependencies directly in the `compose.yaml` file. Every service defined in this `compose.yaml` **must** include specific labels. These labels allow the generation of documentation and dependency graphs, which can be used to better implement safe and controlled deployments. @@ -19,7 +19,7 @@ When adding or updating your service, please follow this template: ```yaml services: desmos: - image: in2workspace/in2-desmos-api:v2.0.3 + image: in2workspace/in2-desmos-api:v2.0.11 # ... standard docker configs (ports, volumes, etc) ... labels: # Description @@ -62,3 +62,45 @@ All architectural metadata must be prefixed with `dome.`, acting as our namespac 2. **No Comments for Metadata:** Do not use YAML comments (`#`) for owner or dependency info. 3. **Sync Required:** If you add a new API call from Service A to Service B, you **must** update the `dome.dependsOn` label for Service A in the same PR. 4. **CI Validation:** Our (WIP) CI pipeline runs a checker. If a service is missing the `dome.owner` or `dome.type` labels, the build will fail. + + +## Configuration + +To correctly configure the stack, you need to edit the following configuration files. + +Please take a look at the provided samples and customize them for your own environment. + +Inside every file, you will details for the parameters that you should customize for your environment. + +- _**.env.desmos**_ +- _**.env.dlt-adapter**_ +- _**.secrets.desmos**_ +- _**Caddyfile**_ + +Other env files should not be changed + + +## Execution +You can execute the Access Node using the following command + +
 docker compose up -d
+ +To stop the stack, use this command + +
 docker compose down
+ +### Dozzle +During setup/debug it is possible to start an instance of **Dozzle**, a service that provide a simple web UI to view container logs for all services, without having to view them from console. + +Dozzle will NOT be started automatically with docker compose unless you run the stack using this command + +
 docker compose up -d --profile debug
+ +Also, please note that with provided configuration, Dozzle will NOT be exposed via proxy in https, but it will only be reachable from exposed Dozzle port (i.e. 8888), usually from you private network (depending on your firewall rule). + +Ex: http://dome.mydomain.com:8888/dozzle + + +If you want to enable proxy for Dozzle, please comment the related lines in Caddyfile + +The service will be available from this URL: https://dome.mydomain.com/dozzle \ No newline at end of file diff --git a/compose.yaml b/compose.yaml index 128f98c..2ff82a2 100644 --- a/compose.yaml +++ b/compose.yaml @@ -7,7 +7,7 @@ services: # Service: TMF666 - Account Management # Purpose: Manages user accounts and profiles. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-account:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-account:sbx_1.5.4 container_name: TMF666_account restart: always labels: @@ -17,12 +17,10 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: @@ -32,7 +30,7 @@ services: # Service: TMF651 - Agreement Management # Purpose: Manages commercial and technical agreements. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-agreement:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-agreement:sbx_1.5.4 container_name: TMF651_agreement restart: always labels: @@ -42,23 +40,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - customer-bill-management: # Service: TMF678 - Customer Bill Management # Purpose: Handles invoicing and billing information. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-customer-bill-management:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-customer-bill-management:sbx_1.5.4 container_name: TMF678_customer-bill-management restart: always labels: @@ -68,23 +63,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - customer-management: # Service: TMF629 - Customer Management # Purpose: Manages customer information and lifecycle. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-customer-management:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-customer-management:sbx_1.5.4 # Service: TMF629 - Customer Management # Service: TMF629 - Customer Management container_name: TMF629_customer-management @@ -96,23 +88,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - party-catalog: # Service: TMF632 - Party Management # Purpose: Repository for parties (organizations/individuals). # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-party-catalog:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-party-catalog:sbx_1.5.4 container_name: TMF632_party-catalog restart: always labels: @@ -122,23 +111,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - party-role: # Service: TMF669 - Party Role Management # Purpose: Manages the roles played by parties. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-party-role:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-party-role:sbx_1.5.4 container_name: TMF669_party-role restart: always labels: @@ -148,23 +134,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - product-catalog: # Service: TMF620 - Product Catalog Management # Purpose: Repository for products and services. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-product-catalog:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-product-catalog:sbx_1.5.4 container_name: TMF620_product-catalog restart: always labels: @@ -174,23 +157,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - product-inventory: # Service: TMF637 - Product Inventory Management # Purpose: Manages the inventory of products. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-product-inventory:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-product-inventory:sbx_1.5.4 container_name: TMF637_product-inventory restart: always labels: @@ -200,23 +180,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - product-ordering-management: # Service: TMF622 - Product Ordering Management # Purpose: Manages product orders. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-product-ordering-management:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-product-ordering-management:sbx_1.5.4 container_name: TMF622_product-ordering-management restart: always labels: @@ -226,23 +203,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - quote: # Service: TMF648 - Quote Management # Purpose: Manages product quotes. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-quote:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-quote:sbx_1.5.4 container_name: TMF648_quote restart: always labels: @@ -252,23 +226,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - resource-catalog: # Service: TMF634 - Resource Catalog Management # Purpose: Repository for resources. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-resource-catalog:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-resource-catalog:sbx_1.5.4 container_name: TMF634_resource-catalog restart: always labels: @@ -278,23 +249,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - resource-function-activation: # Service: TMF664 - Resource Function Activation Management # Purpose: Manages resource function lifecycle. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-resource-function-activation:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-resource-function-activation:sbx_1.5.4 container_name: TMF664_resource-function-activation restart: always labels: @@ -304,23 +272,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - resource-inventory: # Service: TMF639 - Resource Inventory Management # Purpose: Manages resource inventory. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-resource-inventory:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-resource-inventory:sbx_1.5.4 container_name: TMF639_resource-inventory restart: always labels: @@ -330,23 +295,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - service-catalog: # Service: TMF633 - Service Catalog Management # Purpose: Repository for service definitions. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-service-catalog:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-service-catalog:sbx_1.5.4 container_name: TMF633_service-catalog restart: always labels: @@ -356,23 +318,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - service-inventory: # Service: TMF638 - Service Inventory Management # Purpose: Manages service inventory. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-service-inventory:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-service-inventory:sbx_1.5.4 container_name: TMF638_service-inventory restart: always labels: @@ -382,23 +341,20 @@ services: - "dome.type=service" - "dome.lifecycle=sandbox" - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: - access-node - usage-management: # Service: TMF635 - Usage Management # Purpose: Manages service usage records. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-usage-management:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-usage-management:sbx_1.5.4 container_name: TMF635_usage-management restart: always labels: @@ -407,13 +363,11 @@ services: - "dome.owner=Libelium" - "dome.type=service" - "dome.lifecycle=sandbox" - - "dome.dependsOn=component:scorpio" - - "dome.versions=scorpio:>=4,<6" + - "dome.dependsOn=" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio env_file: - .env.tmforum-common networks: @@ -423,23 +377,20 @@ services: # Service: TMF667 - Usage Management # Purpose: Manages service usage records. # Internal Ports: 8080 (API), 9090 (Admin/Metrics) - image: docker.io/drllbl18/tmforum-document-management:sbx_1.5.6 + image: docker.io/drllbl18/tmforum-document-management:sbx_1.5.4 container_name: TMF667_document-management restart: always labels: - - "dome.name=document-management" - - "dome.description=Manages documents and file attachments" + - "dome.name=usage-management" + - "dome.description=Manages service usage" - "dome.owner=Libelium" - "dome.type=service" - "dome.lifecycle=sandbox" - - "dome.dependsOn=component:scorpio,component:minio" - - "dome.versions=scorpio:>=4,<6" + - "dome.dependsOn=" + - "dome.versions=" # ports: # - "8080:8080" # - "9090:9090" - depends_on: - - scorpio - - minio env_file: - .env.tmforum-common environment: @@ -449,8 +400,10 @@ services: S3_BUCKET: "document-attachments" networks: - access-node - + minio: + # Service: MINIO S3 STORAGE + # Purpose: This service provides S3-compatible object storage for the Access Node. image: minio/minio:latest command: server /data --console-address :9001 ports: @@ -467,13 +420,6 @@ services: timeout: 5s retries: 3 start_period: 10s - labels: - - "dome.name=minio" - - "dome.description=S3-compatible object storage for document attachments" - - "dome.owner=MinIO" - - "dome.type=service" - - "dome.lifecycle=sandbox" - - "dome.versions=any" networks: - access-node @@ -535,6 +481,7 @@ services: DLT_ADAPTER_EXTERNAL_DOMAIN: http://dlt-adapter-alastria:8080 env_file: - .env.desmos + - .secrets.desmos networks: - access-node healthcheck: @@ -544,6 +491,7 @@ services: retries: 6 start_period: 40s + dlt-adapter-alastria: # Service: DLT Adapter Alastria # Purpose: Interface for Alastria DLT. @@ -566,6 +514,7 @@ services: networks: - access-node + scorpio: # Service: Scorpio Broker # Purpose: Context Broker for NGSI-LD data. @@ -622,8 +571,8 @@ services: container_name: caddy restart: always ports: - - "80:80" - # - "443:443" + #- "80:80" + - "443:443" volumes: - ./Caddyfile:/etc/caddy/Caddyfile - caddy_data:/data @@ -639,6 +588,31 @@ services: networks: - access-node + dozzle: + # Service: Dozzle - Realtime log viewer for Docker containers + # Purpose: Provides a web interface to view logs of all running containers in real-time. + # Internal Ports: 8080 (Web UI) + # Redirected to https:///dozzle via Caddy reverse proxy. + # Note: Dozzle is disabled by default and can be enabled via Docker Compose profiles, or by running the stack with `docker compose --profile debug up -d`. + # If you want to enable Dozzle by default, remove or comment the `profiles` directive below, or run the stack with `docker compose --profile debug up -d`. + container_name: dozzle + image: amir20/dozzle:latest + environment: + - DOZZLE_BASE=/dozzle + ports: + - "8888:8080" + restart: always + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + networks: + - access-node + # Comment the profile directive to have dozzle always enabled. + # if profile is active (dozzle disabled by default), you can still manually enable dozzle with the command: docker compose --profile debug up -d + profiles: + - debug + + + networks: access-node: name: access-node diff --git a/desmos.md b/desmos.md index 4320665..8516f41 100644 --- a/desmos.md +++ b/desmos.md @@ -248,7 +248,7 @@ SECURITY_PRIVATE_KEY=0xabc123def456789... ```bash # Encode your LEARCredentialMachine to base64 -$ cat lear-credential.txt | base64 -w 0 +$ cat lear-credential.json | base64 -w 0 ``` ```properties diff --git a/setup.sh b/setup.sh new file mode 100644 index 0000000..06ea834 --- /dev/null +++ b/setup.sh @@ -0,0 +1,15 @@ +#!/bin/bash +# setup.sh —init configuration files from examples + +for template in $(find . -name "*.example" -not -path "./.git/*"); do + target="${template%.example}" + if [ ! -f "$target" ]; then + cp "$template" "$target" + echo "Created: $target" + else + echo "· Already exists: $target (skipped)" + fi +done + +echo "" +echo "Modify the .env files with your values before starting the services." \ No newline at end of file