Home>

Please help. In all these settings is not a specialist. All the head has already broken.

docker-compose.yaml

Version: "3.7"
Services:
  Redis:
    Image: Redis
    Networks:
      -mynet
  nginx:
    Image: Nginx: Alpine
    Links:
      -PHP-FPM
    Ports:
      -"8800: 80"
      -"4433: 443"
    Volumes:
      -.: /Home /User /Project
      -./docker/nginx/sites-available >/etc/nginx/sites-available
      -./docker/nginx/nginx.conf :/etc/nginx/NGINX.conf.
    Networks:
      -mynet
  PHP-FPM:
    Image: PHP: 7.4-FPM-Alpine
    Build: ./docker/php-fpm.
    Volumes:
      -.: /Home /User /Project
    Links:
      -DB.
    Networks:
      -mynet
  DB:
    Image: MySQL: 5
    Volumes:
      -./docker/db:/var/lib/mysql
    Ports:
      -'3308: 3306'
    Environment:
      -mysql_database= mybase
      -mysql_allow_empty_password= true
    Networks:
      -mynet
Networks:
  MyNet:
    Driver: Bridge.

DockerFile

from php: 7.4-FPM-Alpine
RUN LS.
Run Curl -ss https://getcomposer.org/installer | PHP ---Install-dir= /USR /Local /Bin --FileName= Composer
RUN APK Add --no-Cache Git
Run Docker-PHP-Ext-Install MySqli PDO Pdo_mysql
Run Docker-PHP-EXT-Install Bcmath
RUN APK Add --Update --no-Cache GMP GMP-DEV
Run Docker-PHP-EXT-Install GMP
Expose 9000.
CMD ["PHP-FPM"]

nginx.conf

worker_processes 1;
Events {
    Worker_Connections 1024;
}
http {
    include /etc/nginx/mime.Types;
    Default_type Application /OCTET-STREAM;
    Sendfile ON;
    keepalive_timeout 65;
    include /etc/nginx/sites-available/*.conf;
}

default.conf

Server {
    Listen 80;
    Charset UTF-8;
    error_log /var/log/nginx/ch.local.error.log WARN;
    access_log /var/log/nginx/ch.local.Access.log;
    Root /Home /User /Project /Public;
    client_max_body_size 100m;
    location /{
            index index.php;
            If (! -e $ Request_FileName) {
                rewrite ^ (. *) $ /index.php Last;
            }
        }
    location ~ \ .php $ {
        try_files $ Uri= 404;
        FastCGI_PASS PHP-FPM: 9000;
        Fastcgi_index index.php;
        Fastcgi_param script_filename $ document_root $ fastcgi_script_name;
        include fastcgi_params;
    }
    location ~ /.ht {
        DENY ALL;
    }
}

Server -Ubuntu 20 + Git + Docker. Nothing else costs anything.

Docker-Compose Up Runs all containers. All containers workers. NGINX and PHP work. In the logs of nothing. But in the browser -ERR_CONNEECTION_Refused at any address and port. Does not see, it seems. Just why?

And at what address do you try to go, exactly 8800 port? And mount you folder -.: /home /user /celeri-health and root specify /home /user /project /public; Is it like that?

Exploding Kitten2021-04-23 19:17:10

I'm trying to go on aipi server. And with the indication of the port and without. This is mistake. I guess the name of the project on Project did not change everywhere.

Максим Степанов2021-04-23 19:21:05

Yes, perhaps I am stupid. Thank you, helped. The 8080 port was closed. And he is a redirect for 80.

Максим Степанов2021-04-23 19:37:04