bagisto / bagisto-docker

Bagisto Docker
41 stars 42 forks source link

your bagisto docker repo is seriously messed up #20

Closed nyck33 closed 1 month ago

nyck33 commented 5 months ago

Terms

Bagisto Version(s) affected

check docker repo

Issue Description

nyck33@lenovo-gtx1650:/mnt/d/web/bagisto-docker$ docker logs bagisto-mysql
2024-04-30 14:41:25+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2024-04-30 14:41:25+00:00 [Note] [Entrypoint]: Switching to dedicated user 'mysql'
2024-04-30 14:41:26+00:00 [Note] [Entrypoint]: Entrypoint script for MySQL Server 8.0.30-1.el8 started.
2024-04-30 14:41:26+00:00 [Note] [Entrypoint]: Initializing database files
2024-04-30T14:41:26.127627Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2024-04-30T14:41:26.127642Z 0 [Warning] [MY-011068] [Server] The syntax '--ssl=off' is deprecated and will be removed in a future release. Please use --tls-version=invalid instead.
2024-04-30T14:41:26.127760Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2024-04-30T14:41:26.127776Z 0 [System] [MY-013169] [Server] /usr/sbin/mysqld (mysqld 8.0.30) initializing of server in progress as process 80
2024-04-30T14:41:26.187068Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-04-30T14:41:26.626582Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-04-30T14:41:27.728122Z 6 [Warning] [MY-010453] [Server] root@localhost is created with an empty password ! Please consider switching off the --initialize-insecure option.
2024-04-30 14:41:31+00:00 [Note] [Entrypoint]: Database files initialized
2024-04-30 14:41:31+00:00 [Note] [Entrypoint]: Starting temporary server
2024-04-30T14:41:31.446104Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2024-04-30T14:41:31.446123Z 0 [Warning] [MY-011068] [Server] The syntax '--ssl=off' is deprecated and will be removed in a future release. Please use --tls-version=invalid instead.
2024-04-30T14:41:31.447116Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2024-04-30T14:41:31.447130Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 154
2024-04-30T14:41:31.457481Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
2024-04-30T14:41:31.582397Z 1 [System] [MY-013577] [InnoDB] InnoDB initialization has ended.
2024-04-30T14:41:31.791511Z 0 [Warning] [MY-011810] [Server] Insecure configuration for --pid-file: Location '/var/run/mysqld' in the path is accessible to all OS users. Consider choosing a different directory.
2024-04-30T14:41:31.816268Z 0 [Warning] [MY-011302] [Server] Plugin mysqlx reported: 'Failed at SSL configuration: "SSL context is not usable without certificate and private key"'
2024-04-30T14:41:31.816627Z 0 [System] [MY-011323] [Server] X Plugin ready for connections. Socket: /var/run/mysqld/mysqlx.sock
2024-04-30T14:41:31.816819Z 0 [System] [MY-010931] [Server] /usr/sbin/mysqld: ready for connections. Version: '8.0.30'  socket: '/var/run/mysqld/mysqld.sock'  port: 0  MySQL Community Server - GPL.
2024-04-30 14:41:31+00:00 [Note] [Entrypoint]: Temporary server started.
'/var/lib/mysql/mysql.sock' -> '/var/run/mysqld/mysqld.sock'
Warning: Unable to load '/usr/share/zoneinfo/iso3166.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/leapseconds' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/tzdata.zi' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone.tab' as time zone. Skipping it.
Warning: Unable to load '/usr/share/zoneinfo/zone1970.tab' as time zone. Skipping it.
2024-04-30 14:41:33+00:00 [Note] [Entrypoint]: Creating database bagisto
2024-04-30 14:41:33+00:00 [Note] [Entrypoint]: Creating user bagisto
2024-04-30 14:41:33+00:00 [Note] [Entrypoint]: Giving user bagisto access to schema bagisto

2024-04-30 14:41:33+00:00 [Note] [Entrypoint]: Stopping temporary server
2024-04-30T14:41:33.641863Z 15 [System] [MY-013172] [Server] Received SHUTDOWN from user root. Shutting down mysqld (Version: 8.0.30).
2024-04-30T14:41:34.461633Z 0 [System] [MY-010910] [Server] /usr/sbin/mysqld: Shutdown complete (mysqld 8.0.30)  MySQL Community Server - GPL.
2024-04-30 14:41:34+00:00 [Note] [Entrypoint]: Temporary server stopped

2024-04-30 14:41:34+00:00 [Note] [Entrypoint]: MySQL init process done. Ready for start up.

2024-04-30T14:41:34.853289Z 0 [Warning] [MY-011068] [Server] The syntax '--skip-host-cache' is deprecated and will be removed in a future release. Please use SET GLOBAL host_cache_size=0 instead.
2024-04-30T14:41:34.853309Z 0 [Warning] [MY-011068] [Server] The syntax '--ssl=off' is deprecated and will be removed in a future release. Please use --tls-version=invalid instead.
2024-04-30T14:41:34.854270Z 0 [Warning] [MY-010918] [Server] 'default_authentication_plugin' is deprecated and will be removed in a future release. Please use authentication_policy instead.
2024-04-30T14:41:34.854328Z 0 [System] [MY-010116] [Server] /usr/sbin/mysqld (mysqld 8.0.30) starting as process 1 
2024-04-30T14:41:34.867492Z 1 [System] [MY-013576] [InnoDB] InnoDB initialization has started.
nyck33@lenovo-gtx1650:/mnt/d/web/bagisto-docker$

Other ecommerce solutions like Saleor? Docker is included in the main repo at root and then it's really just a no brainer to do docker-compose up and get going so this looks very bad on Bagisto. I am going to try to convince my company to not use it if this is not fixed within a few days.

Preconditions

I'm on WSL2, if that is a problem say so in the Readme.

Steps to reproduce

please do your own homework.

Expected Result

should be typing in one command to be up and running. Do you really need setup.sh or are there other ways to get this done? I tried to pull the image from Docker Hub but got an error too. It looks stale and probably needs to be updated. Docker is so important for dev teams and you are neglecting it which is unfortunate.

Actual Result

It does not work.

Docker is the best way to ensure dev teams use same environment. Please fix it.

Screenshots

No response

Additional context

No response

devansh-webkul commented 5 months ago

@nyck33,

We have a separate repo, and requirements can vary from user to user. The setup.sh file is provided specifically for Linux users. If you believe something can be fixed for Windows users as well, feel free to submit a pull request to the Docker repository.

I will check one more time for the latest version to see if that script is working. However, as this is open source, I cannot guarantee the time of the fix.

devansh-webkul commented 5 months ago

I am transfering this issue to bagisto docker repo.

devansh-webkul commented 5 months ago

I just tested and its working fine without any issues. Seems like issue with the connection in WSL2.

nyck33 commented 5 months ago

I don't think so:

+] Running 8/8
 ✔ Network bagisto-docker_default   Created                                                       0.0s 
 ✔ Container bagisto-php-apache     Started                                                       2.0s 
 ✔ Container bagisto-elasticsearch  Started                                                       2.0s 
 ✔ Container bagisto-mysql          Started                                                       0.7s 
 ✔ Container bagisto-mailhog        Started                                                       0.6s 
 ✔ Container bagisto-redis          Started                                                       2.0s 
 ✔ Container bagisto-phpmyadmin     Started                                                       0.6s 
 ✔ Container bagisto-kibana         Started                                                       2.0s 
Please wait... Waiting for MySQL connection...
Creating empty database for bagisto...
^C
(base) nyck33@lenovo-15ACH6:~/web/bagisto-docker$ docker exec bagisto-mysql --user root -p root
OCI runtime exec failed: exec failed: unable to start container process: exec: "--user": executable file not found in $PATH: unknown
(base) nyck33@lenovo-15ACH6:~/web/bagisto-docker$ docker exec bagisto-mysql -u root -p root
OCI runtime exec failed: exec failed: unable to start container process: exec: "-u": executable file not found in $PATH: unknown
(base) nyck33@lenovo-15ACH6:~/web/bagisto-docker$ docker exec -it bagisto-mysql mysql -uroot -proot
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 193
Server version: 8.0.37 MySQL Community Server - GPL

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> CREATE DATABASE bagisto CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ERROR 1007 (HY000): Can't create database 'bagisto'; database exists
mysql> use bagisto;
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> CREATE DATABASE bagisto_testing CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ERROR 1007 (HY000): Can't create database 'bagisto_testing'; database exists
mysql> use bagisto_testing
Database changed
mysql> show tables;
Empty set (0.00 sec)

mysql> 

it gets stuck so I tried to manually create those databases but they are there...as empty databases. I'm on Ubuntu 23.10 now not WSL2 so your testing procedures are not thorough enough. Also what is this? ```base) nyck33@lenovo-15ACH6:~/Downloads$ docker pull webkul/bagisto Using default tag: latest Error response from daemon: manifest for webkul/bagisto:latest not found: manifest unknown: manifest unknown

devansh-webkul commented 5 months ago

If database is already present there, then you need to delete the database. Somehow in earlier stage we didnt delete the existing database because of data loss.

Which is the reason script stucked there.

devansh-webkul commented 5 months ago

But i think now its not needed, i will add a check there to fix this.