Code Monkey home page Code Monkey logo

dapr-backend's Introduction

Dapr Back-End Web Api

Build and Push Docker Images

$ docker build -t thara0402/dapr-backend:0.1.0 ./
$ docker run --rm -it -p 8000:80 --name backend thara0402/dapr-backend:0.1.0
$ docker push thara0402/dapr-backend:0.1.0

Create Azure Container Apps environment

$ az group create -n <ResourceGroup Name> -l japaneast
$ az deployment group create -f ./deploy/env/main.bicep -g <ResourceGroup Name>

Dapr - Service to Service calls

Create Azure Container Apps for backend

$ az deployment group create -f ./deploy/app-dapr/main.bicep -g <ResourceGroup Name>

Create Azure Container Apps for frontend

Dapr Front-End Web Application

Local Development

Install Dapr CLI

Install

$ dapr init
$ docker ps -a
CONTAINER ID   IMAGE               COMMAND                  CREATED       STATUS                PORTS                                                 NAMES
8f669c78ed71   daprio/dapr:1.4.3   "./placement"            2 weeks ago   Up 8 days             0.0.0.0:6050->50005/tcp, :::6050->50005/tcp           dapr_placement
7c6ffeb5723c   openzipkin/zipkin   "start-zipkin"           2 weeks ago   Up 8 days (healthy)   9410/tcp, 0.0.0.0:9411->9411/tcp, :::9411->9411/tcp   dapr_zipkin
09d482bdba03   redis               "docker-entrypoint.sā€¦"   2 weeks ago   Up 8 days             0.0.0.0:6379->6379/tcp, :::6379->6379/tcp             dapr_redis

Reconfigure

$ dapr unisntall --all
$ dapr init

Docker Compose

version: '3.4'

services:
  daprfrontend:
    image: ${DOCKER_REGISTRY-}daprfrontend
    build:
      context: .
      dockerfile: DaprFrontEnd/Dockerfile
    ports:
      - "51000:50001"

  daprfrontend-dapr:
    image: "daprio/daprd:latest"
    command: [ "./daprd", "-app-id", "daprfrontend", "-app-port", "80" ]
    depends_on:
      - daprfrontend
    network_mode: "service:daprfrontend"

  daprbackend:
    image: ${DOCKER_REGISTRY-}daprbackend
    build:
      context: .
      dockerfile: DaprBackEnd/Dockerfile
    ports:
      - "52000:50001"

  daprbackend-dapr:
    image: "daprio/daprd:latest"
    command: [ "./daprd", "-app-id", "daprbackend", "-app-port", "80" ]
    depends_on:
      - daprbackend
    network_mode: "service:daprbackend"

dapr-backend's People

Contributors

thara0402 avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.