Git Product home page Git Product logo

aspnetcore-dockerswarm's Introduction

Stefan Prodan's Blog

Made with Material for MkDocs

aspnetcore-dockerswarm's People

Contributors

stefanprodan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

aspnetcore-dockerswarm's Issues

502 Bad Gateway

I want to run my asp.net application at nginx server, But I am facing the following error in dev environment
"502 Bad Gateway". Information of docker compose and nginx is given below respectively

-------docker compose ----------

`version: '3.4'

services:
webapplication1:
image: ${DOCKER_REGISTRY-}webapplication1
build:
context: .
dockerfile: WebApplication1/Dockerfile
expose:
- "5050"
networks:
- app-network

db1:
image: microsoft/mssql-server-linux
container_name: db1
environment:
SA_PASSWORD: "Thingtrax%1"
ACCEPT_EULA: "Y"
MSSQL_PID: Express
ports:
- "7004:1433"
networks:
app-network:
ipv4_address: 172.27.0.3

web_nginx:
image: nginx
ports:
- "8088:80"
volumes:
- ${APPDATA}/nginx/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- webapplication1
- db1
networks:
- app-network
container_name: web_nginx
restart: always

networks:
app-network:
ipam:
driver: default
config:
- subnet: 172.27.0.0/16`

nginx.conf###

worker_processes 4;

events { worker_connections 1024; }

http {
sendfile on;

upstream webapplication {
    server webapplication1:5050;
}

server {
    listen 80;

    location / {
        proxy_pass         http://webapplication;
        proxy_redirect     http://localhost http://webapplication;
        proxy_set_header   Host $host;
        proxy_set_header   X-Real-IP $remote_addr;
        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header   X-Forwarded-Host $server_name;

    }
}

}

Please help me to solve this issue

Great thanks

I just followed the guide on how to setup a rethinkdb cluster. It's the first time I did anything with docker swarm as well as rethinkdb.

I'm so grateful for the guide. It's exactly what I needed to evaluate rethinkdb on swarm. Big thanks!

(oh, just close the issue btw. it's just a praise.)

Don't use `dotnet run` as container entrypoint

using dotnet run as the entrypoint of a container isn't something you should do in a production container. dotnet run is for dev machines.

dotnet run compiles the app and then runs the output, in a Docker runtime image you should instead do a dotnet publish as part of the image build and then have dotnet <assemblyName> as the entrypoint of your container. That way you have faster start times for your container and you are more immutable because the app is fully baked during image build instead of doing compilation at runtime.

Does that make sense?

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.