Wizard
Wizard Local Storage
WizardDockerWizard
docker-compose up
Wizard http://localhost:8080
ShowDoc Markdown Markdown Swagger Swagger
SwaggerAPI ** Markdown Swagger ** Wizard
Wizard Markdown Swagger Wizard
Laravel 5.85.4 Laravel AuthenticationAuthorizationEventsMailNotifications LaravelLaravel
DockerDockerDockerDocker
Docker Hub mylxsw/wizard
docker run -it --rm --name wizard \
-e DB_HOST=host.docker.internal \
-e DB_PORT=3306 \
-e DB_DATABASE=wizard \
-e DB_USERNAME=wizard \
-e DB_PASSWORD=wizard \
mylxsw/wizard
Docker
docker run -d --name wizard \
-e DB_HOST=host.docker.internal \
-e DB_PORT=3306 \
-e DB_DATABASE=wizard \
-e DB_USERNAME=wizard \
-e DB_PASSWORD=wizard \
-p 8080:80 \
-v /Users/mylxsw/Downloads:/webroot/storage/app/public \
mylxsw/wizard
-e
.env
-d
-p
80 8080 http://localhost:8080
-v
DockerfileDockerfileMySQLDockerfile
FROM mylxsw/wizard:latest
#
# Env.env.example
ENV DB_CONNECTION=mysql
ENV DB_HOST=host.docker.internal
ENV DB_PORT=3306
ENV DB_DATABASE=wizard_2
ENV DB_USERNAME=wizard
ENV DB_PASSWORD=wizard
ENV WIZARD_NEED_ACTIVATE=false
# markdown
ENV APP_URL=http://localhost:8080
#
VOLUME /webroot/storage/app/public
RUN php artisan config:cache
docker build -t my-wizard .
docker run -it --rm --name my-wizard my-wizard php artisan migrate:install
docker run -it --rm --name my-wizard my-wizard php artisan migrate
docker run -d --name my-wizard -p 8080:80 my-wizard
http://localhost:8080 Wizard
PHP PHP-FPM/Nginx
PHP https://gist.github.com/mylxsw/4b7bbe81fb7f59714423f3284c867149
git /data/webroot
cd /data/webroot
git clone https://github.com/mylxsw/wizard.git
cd wizard
composer
composer install --prefer-dist --ignore-platform-reqs
composer vender
cp .env.example .env
.env
MySQL
MySQL
php artisan migrate:install
php artisan migrate
php artisan storage:link
public storage/app/public
Nginx
server {
listen 80;
server_name wizard.example.com;
root /data/webroot/wizard/public;
index index.php;
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ .*\.(gif|jpg|png|bmp|swf|js|css)$ {
try_files $uri =302;
}
location ~ .*\.php$ {
# php-fpm socket
fastcgi_pass unix:/usr/local/php/var/run/php-cgi.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_index index.php;
include fastcgi_params;
}
}
gitgit pullOK
composer install --prefer-dist --ignore-platform-reqs
php artisan migrate
Docker
docker run -it --rm my-wizard php artisan migrate
Wizard
http:///register
php artisan migrate
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes
MySQL 5.7 MySQL
.env
DB_CHARSET=utf8
DB_COLLATION=utf8_unicode_ci
php artisan migrate
EmojiSQLSTATE[HY000] [2054] The server requested authentication method unknown to the client
The server requested authentication method unknown to the client [caching_sha2_password]
MariadbMySQL8.0caching_sha2_password
mysql_native_password
ALTER USER 'USERNAME'@'HOSTNAME' IDENTIFIED WITH mysql_native_password BY 'PASSWORD';
Mariadb 10.0+ Unknown storage engine 'ARCHIVE'
ARCHIVE Mariadb 10.0
The ARCHIVE storage engine was installed by default until MariaDB 10.0. In MariaDB 10.1 and later, the storage engine's plugin will have to be installed.
MariadbMariadb INSTALL SONAME 'ha_archive';
****
ARCHIVE $WIZARD_HOME/database/migrations/2017_08_03_232417_create_operation_logs_table.php
17 $table->engine = 'ARCHIVE';
git pull
Schema::create('wz_operation_logs', function (Blueprint $table) {
-$table->engine = 'ARCHIVE';
+// $table->engine = 'ARCHIVE';
$table->increments('id');
2M Wizard
PHP php.ini
; upload_max_filesize = 100M ; upload_max_filesize 0 post_max_size = 0
web
client_max_body_size 120M;
body docker-compose/nginx.conf
public/.htaccess
LimitRequestBody 0
0Markdown
APP_URL
.env
APP_URL
URL
500
storage/logs/
.env
APP_DEBUG=true
Docker -e APP_DEBUG=true
DEBUG