Instead page of wordpress I have file for nginx. How to fix it?

Solution for Instead page of wordpress I have file for nginx. How to fix it?
is Given Below:

I am beginner and need some answers.

Instead page of wordpress I have a page with file for nginx. How to fix it? Help pls.

In the picture my negative result – enter image description here

docker-compose.yaml

version: '3.7'

services:
    db:  
      image: mysql:8.0
      container_name: db
      restart: always
      networks:
        - app-network
      environment: 
        - MYSQL_ROOT_PASSWORD=Ruslan
        - MYSQL_ALLOW_EMPTY_PASSWORD=Ruslan
        - MYSQL_RANDOM_ROOT_PASSWORD=Ruslan
    wordpress:
      build: ./requirements/wordpress/
      depends_on: 
          - db
      container_name: wordpress
      restart: always
      networks:
        - app-network
    nginx:
      build: ./requirements/nginx/
      depends_on:
        - wordpress
      container_name: nginx
      restart: always
      ports:
          - 443:443
      networks:
          - app-network

Here I tried to build 3 services mysql, wordpress and nginx.

dockerfile for nginx

FROM debian:buster

RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get install -y nginx vim procps openssl net-tools php-gd php-xml
COPY ./nginx.conf /etc/nginx/sites-available/default
RUN mkdir -p /etc/ssl/private
RUN chmod 700 /etc/ssl/private
RUN openssl req -x509 -nodes -days 365 -subj "/C=RF/ST=London/L=London/O=innoaca/OU=student/CN=Ruslan" -newkey rsa:2048 -keyout /etc/ssl/nginx-selfsigned.key -out /etc/ssl/nginx-selfsigned.crt;
CMD ["nginx", "-g", "daemon off;"]

In dockerfile for nginx I just installed it.

nginx.conf

server {
    listen 443 ssl;
    listen [::]:443 ssl;
    server_name localhost;
    
    ssl on;

    ssl_certificate /etc/ssl/nginx-selfsigned.crt;
    ssl_certificate_key /etc/ssl/nginx-selfsigned.key;
    
    ssl_protocols TLSv1.3;
    autoindex on;
    root /var/www/html;
    index index.php;

    location / {
            try_files $uri $uri/ =405;
    }


    location ~ .php$ {
            include snippets/fastcgi-php.conf;
            fastcgi_pass wordpress:9000;
    }
}

Here I tried to use socket, I need that nginx and worpress communicate on 9000 port.

dockerfile for wordpress

FROM debian:buster

RUN apt-get -y update
RUN apt-get -y upgrade
RUN apt-get -y install vim wget php-cli php-fpm php-mysql php-json php-opcache php-mbstring php-xml php-gd php-curl mariadb-server php7.3 php7.3-fpm

WORKDIR /var/www/html/
RUN wget https://wordpress.org/latest.tar.gz
RUN tar -xvzf latest.tar.gz
RUN rm -rf latest.tar.gz
COPY ./wp-config.php ./wordpress/
RUN chown -R www-data:www-data /var/www/html/wordpress
RUN chmod -R 755 /var/www/html/wordpress
RUN sed -i '36 s//run/php/php7.3-fpm.sock/9000/' /etc/php/7.3/fpm/pool.d/www.conf
RUN service php7.3-fpm start
CMD ["/usr/sbin/php-fpm7.3", "-F"]

wp-config.php

<?php
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
define( 'DB_NAME', 'wpdb' );

/** MySQL database username */
define( 'DB_USER', 'wpuser' );

/** MySQL database password */
define( 'DB_PASSWORD', 'dbpassword' );

/** MySQL hostname */
define( 'DB_HOST', 'localhost' );

*/
define( 'AUTH_KEY',         'put your unique phrase here' );
define( 'SECURE_AUTH_KEY',  'put your unique phrase here' );
define( 'LOGGED_IN_KEY',    'put your unique phrase here' );
define( 'NONCE_KEY',        'put your unique phrase here' );
define( 'AUTH_SALT',        'put your unique phrase here' );
define( 'SECURE_AUTH_SALT', 'put your unique phrase here' );
define( 'LOGGED_IN_SALT',   'put your unique phrase here' );
define( 'NONCE_SALT',       'put your unique phrase here' );

/**#@-*/

/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each
 * a unique prefix. Only numbers, letters, and underscores please!
 */
$table_prefix = 'wp_';

/**
 * For developers: WordPress debugging mode.
 *
 * Change this to true to enable the display of notices during development.
 * It is strongly recommended that plugin and theme developers use WP_DEBUG
 * in their development environments.
 *
 * For information on other constants that can be used for debugging,
 * visit the Codex.
 *
 * @link https://codex.wordpress.org/Debugging_in_WordPress
 */
define( 'WP_DEBUG', false );

/* That's all, stop editing! Happy publishing. */

/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', dirname( __FILE__ ) . "https://stackoverflow.com/" );
}

/** Sets up WordPress vars and included files. */
require_once( ABSPATH . 'wp-settings.php' );
?>

The config for wordpress is default.

Anybody knows, what should I do? I’ve tried everything.