defualt in compose file
simple dimple Doocker File:
FROM nginx:mainline
SHELL [ "bash", "-c" ]
# need this to make nginx nginx variables substitution correct
# when using envsubst command
#
# Example:
# proxy_set_header Host $host;
# in this exmaple envsubst comand will substitue nginx variable
# and we don't wanna this.
#
# Solution:
# proxy_set_header Host ${DOLLAR}host;
ENV DOLLAR="$"
# Port that nginx listens
ENV NGINX_SERVER_PORT=80
# server_name directive value
ENV NGINX_SERVER_HOST=0.0.0.1
# proxy_pass directive value
ENV NGINX_PROXY_PASS=lime-django:8000
EXPOSE 80/tcp
COPY . /nginx/
WORKDIR /nginx/
RUN envsubst < nginx.template > nginx.conf
CMD nginx -c nginx.conf
Doocker Compose File:
version: '2.17.3'
services:
django:
env_file:
- app-django/.env
build: ./app-django
ports:
- 8000:8000
nginx:
build: ./nginx
ports:
- 80:80
The problem is that container with nginx stops (django works fine) with logs bellow:
2023-05-25 17:47:20 2023/05/25 14:47:20 [notice] 1#1: using the "epoll" event method
2023-05-25 17:47:20 2023/05/25 14:47:20 [notice] 1#1: nginx/1.25.0
2023-05-25 17:47:20 2023/05/25 14:47:20 [notice] 1#1: built by gcc 10.2.1 20210110 (Debian 10.2.1-6)
2023-05-25 17:47:20 2023/05/25 14:47:20 [notice] 1#1: OS: Linux 5.15.49-linuxkit
2023-05-25 17:47:20 2023/05/25 14:47:20 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576
So i wanna know how to fix this?
чувак, прочитай уже хотя бы немного про сети и адресацию, облегчишь себе жизнь. переменная с 0.0.0.1 уже ничего хорошего не обещает
Я поменял, чувак, на 0.0.0.0. я єто понимаю. Но все равно не решилось, чувак.
Обсуждают сегодня