Пытаюсь настроить nginx реверс-прокси в докере, пробрасывающее в .net приложение, вот мой docker-compose:
version: "3.1"
services:
web:
image: imperialplugins/steam-openid-connect-provider:latest
container_name: web
ports:
- 3000:80
nginx:
build: ./nginx
container_name: nginx
ports:
- 80:80
- 443:443
links:
- web
Dockerfile самого прокси:
FROM ubuntu:14.04
MAINTAINER Eranga Bandara (erangaeb@gmail.com)
# install nginx
RUN apt-get update -y
RUN apt-get install -y python-software-properties
RUN apt-get install -y software-properties-common
RUN add-apt-repository -y ppa:nginx/stable
RUN apt-get update -y
RUN apt-get install -y nginx
# deamon mode off
RUN echo "\ndaemon off;" >> /etc/nginx/nginx.conf
RUN chown -R www-data:www-data /var/lib/nginx
# volume
VOLUME ["/etc/nginx/sites-enabled", "/etc/nginx/certs", "/var/log/nginx"]
# expose ports
EXPOSE 80 443
# add nginx conf
ADD config/nginx.conf /etc/nginx/conf.d/default.conf
WORKDIR /etc/nginx
CMD ["nginx"]
и nginx конфиг:
server {
listen 80;
server_name steamconnecttest.com www.steamconnecttest.com;
location / {
proxy_pass http://web:3000/;
}
}
Приложение работает через localhost:3000 как положено, однако при обращении просто к localhost получаю лишь стартовую страницу nginx, что я делаю не так?