Giter Site home page Giter Site logo

webjobs-docker-sample's Introduction

ASP.NET + Azure WebJobs SDK docker example

This is an example of how to host a ASP.NET site and an Azure WebJob in the same container. This is useful for when you want to run on Azure App Service Linux, as it has yet to provide out of the box WebJobs support. This sample uses an Azure WebJobs SDK sample, but this would work with any console application.

Getting started locally

This assumes that you have docker and dotnet core 2.0 installed.

  1. Clone the repo
  2. Run docker build -t webandwebjobs .
  3. Run docker run -d --rm -p 80:80 -e "AzureWebJobsStorage=<REPLACETHIS>" -e "AzureWebJobsDashboard=<REPLACETHIS>" --name myapp webandwebjobs with the "" tags replaced with your connections strings.
  4. You should be able to see the "Hello world" response from your website now (for instance at 0.0.0.0).
  5. If you add a queue message to your Storage Queue (default is testqueue, you should see it disappear
  6. To access the logs, you can use an interactive bash session: sudo docker exec -i -t myapp /bin/bash. The logs are under /app/logs.

You can also set an Environment variable for APPINSIGHTS_INSTRUMENTATIONKEY and see some data flow up to App Insights. There is usally a latency of a few minutes, so be patient.

Deploying to Azure App Service Linux

TBD

LICENSE

MIT

webjobs-docker-sample's People

Contributors

chrisgoddard avatar

Stargazers

 avatar Csaba Menyhárt avatar  avatar Eliezer Almeida avatar Roberto Sanz avatar Ralph Willgoss avatar Jeffrey Loiola avatar Viktor Ekholm avatar Rafael dos Santos avatar Waylon Martinez avatar Jorge L. Fatta avatar Alexander Gnauck avatar

Watchers

James Cloos avatar

Forkers

rsantosdev bdvp

webjobs-docker-sample's Issues

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.