Skip to content

Instantly share code, notes, and snippets.

@TahirNaushad

TahirNaushad/dockerstack.md Secret

Last active Sep 29, 2017
Embed
What would you like to do?
Docker Stack File Example

ASP.NET Core and Docker Swarm

Below is a compose file for my blog post here

version: '3.3'

services:
  viz: 
    image: dockersamples/visualizer
    volumes:
      - "/var/run/docker.sock:/var/run/docker.sock"
    ports:
      - "8070:8080"
    deploy:
      placement:
        constraints:
          - node.role == manager
  api:
    image: naushadt25/api
    ports:
      - "8080:80"
    environment:
      MOVIES_DB_CONN: "..."
    deploy:
      replicas: 3
  web:
    image: naushadt25/web
    ports:
      - "8090:80"
    environment:
      API_URL: "http://api/movies"
    depends_on:
      - api
    deploy:
      replicas: 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.