Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modal popup design for Training > Checkmate Skills #20

Closed
programarivm opened this issue Feb 20, 2024 · 12 comments · Fixed by #188
Closed

Modal popup design for Training > Checkmate Skills #20

programarivm opened this issue Feb 20, 2024 · 12 comments · Fixed by #188
Assignees
Labels
good first issue Good for newcomers

Comments

@programarivm
Copy link
Member

A modal popup needs to open by clicking on Training > Checkmate Skills similar to the SPA version.

figure_01
Figure 1. Click on Training > Checkmate Skills.

figure_02
Figure 2. Click on the Checkmate field.

This modal is to be implemented using Bootstrap's JavaScript modal plugin. No additional programming is required to close this issue — just display the modal popup, it's a really good first issue to get familiar with the codebase!

Keep it up, and happy coding.

@programarivm programarivm added the good first issue Good for newcomers label Feb 20, 2024
@programarivm programarivm closed this as not planned Won't fix, can't repro, duplicate, stale Feb 29, 2024
@programarivm programarivm reopened this Mar 6, 2024
@varshareddyarrabelli
Copy link

Hi, I am interested in working on this issue. Seems like the setup is not proper. Could someone help me with that?

@programarivm
Copy link
Member Author

@varshareddyarrabelli welcome to ChesslaBlab.

Thank you for joining the community, please make sure to read the Contributing Guidelines.

Happy learning!

@varshareddyarrabelli
Copy link

After following the installation steps, I am not able to run the application locally,
Docker containers are not running properly.
image

@programarivm
Copy link
Member Author

programarivm commented Mar 28, 2024

The container logs will probably show helpful information about the problem as described at View container logs.

docker logs chess_website_nginx
docker logs chess_website_php_fpm

@varshareddyarrabelli
Copy link

varshareddyarrabelli commented Mar 29, 2024

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/03/28 17:35:50 [emerg] 1#1: cannot load certificate "/etc/nginx/ssl/fullchain.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)

These are the logs generated by docker logs chess_website_nginx

This is docker-compose.dev.yml file


services:
  php_fpm:
      build: .
      container_name: chess_website_php_fpm
      restart: always
      volumes:
          - ./:/usr/share/nginx/website
          - ./docker/php/8.3/cli/php.ini:/usr/local/etc/php/php.ini
      working_dir: /usr/share/nginx/website
  nginx:
      image: nginx:1.20
      container_name: chess_website_nginx
      ports:
          - "80:80"
          - "9443:9443"
      restart: always
      volumes:
          - ./:/usr/share/nginx/website
          - ./docker/nginx/conf.d/dev.conf:/etc/nginx/conf.d/dev.conf
          - ./docker/nginx/ssl/fullchain.pem:/etc/nginx/ssl/fullchain.pem
          - ./docker/nginx/ssl/privkey.pem:/etc/nginx/ssl/privkey.pem
      working_dir: /usr/share/nginx/website```

@programarivm
Copy link
Member Author

As per the docs at Run the MPA on a Docker Container:

First things first, make sure to have created the fullchain.pem and privkey.pem files into the docker/nginx/ssl folder.

The same thing goes for both the PHP Chess API and the PHP Chess Server. See chesslablab/spablab#533 (comment)

The certificates have been created using Cerbot.

Finally let me suggest to enclose the command-line output in three backticks (```) for better readability.

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/03/28 17:35:50 [emerg] 1#1: cannot load certificate "/etc/nginx/ssl/fullchain.pem": PEM_read_bio_X509_AUX() failed (SSL: error:0909006C:PEM routines:get_name:no start line:Expecting: TRUSTED CERTIFICATE)

I hope this helps. Happy coding!

@varshareddyarrabelli
Copy link

varshareddyarrabelli commented Mar 30, 2024

Hey, I have created the fullchain.pem and privkey.pem files, but the files are empty after the installation.

Moreover, after running docker compose -f docker-compose.dev.yml up -d

My docker status is

CONTAINER ID   IMAGE             COMMAND                  CREATED          STATUS                                  PORTS      NAMES
a1fd1c41e651   nginx:1.20        "/docker-entrypoint.…"   4 seconds ago    Restarting (1) Less than a second ago              chess_website_nginx
f9467b602deb   website-php_fpm   "docker-php-entrypoi…"   18 minutes ago   Up 3 seconds                            9000/tcp   chess_website_php_fpm

There is no port for chess_website_nginx.

@programarivm
Copy link
Member Author

The files should not be empty. The SSL certificate is necessary to keep the containers up and running on the development environment for these domain names:

  • chesslablab.org
  • www.chesslablab.org
  • api.chesslablab.org
  • async.chesslablab.org

What are the logs reporting on this occasion?

@varshareddyarrabelli
Copy link

varsha@DESKTOP-ODVRTM1:~/website$ docker logs chess_website_php_fpm
[31-Mar-2024 12:22:31] NOTICE: fpm is running, pid 1
[31-Mar-2024 12:22:31] NOTICE: ready to handle connections

chess_website_nginx

/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: IPv6 listen already enabled
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
2024/03/31 12:23:07 [emerg] 1#1: cannot load certificate "/../ssl/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/../ssl/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)
nginx: [emerg] cannot load certificate "/../ssl/fullchain.pem": BIO_new_file() failed (SSL: error:02001002:system library:fopen:No such file or directory:fopen('/../ssl/fullchain.pem','r') error:2006D080:BIO routines:BIO_new_file:no such file)

These are the docker logs

@programarivm
Copy link
Member Author

The log messages seem to be quite detailed in that the SSL certificate is not set up properly.

See chesslablab/spablab#704 (comment)

@varshareddyarrabelli
Copy link

This command sudo certbot certonly --standalone give this

  Domain: chesslablab.net
  Type:   dns
  Detail: DNS problem: NXDOMAIN looking up A for chesslablab.net - check that a DNS record exists for this domain; DNS problem: NXDOMAIN looking up AAAA for chesslablab.net - check that a DNS record exists for this domain

@programarivm
Copy link
Member Author

programarivm commented Apr 2, 2024

Well, more specifically, I was able to create the SSL certificate using DNS validation on an Ubuntu AWS instance. By the way, some Certbot documentation recommends to have a working web site that can already be accessed using HTTP on port 80.

Alternatively a self-signed SSL certificate can be created for development purposes using OpenSSL.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants