openclassify docker

This commit is contained in:
Moradii 2022-06-07 16:17:55 +03:00
parent 916e749156
commit 64a12c49cd
4 changed files with 101 additions and 50 deletions

18
.env-sail Normal file
View File

@ -0,0 +1,18 @@
APP_ENV=local
INSTALLED="false"
APP_KEY=DYKEBxfEHK1PP4mUbP3gWPtsPZgXh0qX
APP_DEBUG=true
DEBUG_BAR=false
DB_CONNECTION=mysql
DB_HOST=mysql
DB_DATABASE=oopenclassify
DB_USERNAME=root
DB_PASSWORD=
APPLICATION_NAME=Default
APPLICATION_REFERENCE=default
APPLICATION_DOMAIN=http://localhost
ADMIN_USERNAME=admin
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=admin
APP_LOCALE=en
APP_TIMEZONE=UTC

View File

@ -104,7 +104,7 @@
"fzaninotto/faker": "~1.4",
"symfony/css-selector": "3.1.*",
"symfony/dom-crawler": "3.1.*",
"anomaly/installer-module": "~2.4.0"
"laravel/sail": "^1.14"
},
"repositories": [
{
@ -149,6 +149,9 @@
"config": {
"bin-dir": "bin",
"preferred-install": "dist",
"optimize-autoloader": true
"optimize-autoloader": true,
"allow-plugins": {
"visiosoft/composer-merge-plugin": true
}
}
}

View File

@ -208,7 +208,8 @@ return [
* Streams Service Provider
*/
Anomaly\Streams\Platform\StreamsServiceProvider::class,
Sentry\Laravel\ServiceProvider::class
Sentry\Laravel\ServiceProvider::class,
\Laravel\Sail\SailServiceProvider::class
],
/*
@ -259,8 +260,6 @@ return [
'URL' => Illuminate\Support\Facades\URL::class,
'Validator' => Illuminate\Support\Facades\Validator::class,
'View' => Illuminate\Support\Facades\View::class,
'Sentry' => Sentry\Laravel\Facade::class,
'Sentry' => Sentry\Laravel\Facade::class
],
];

View File

@ -1,54 +1,85 @@
# For more information: https://laravel.com/docs/sail
version: '3'
services:
web:
image: nginx:alpine
volumes:
- "./etc/nginx/default.conf:/etc/nginx/conf.d/default.conf"
- "./etc/ssl:/etc/ssl"
- "./:/var/www/html"
- "./etc/nginx/default.template.conf:/etc/nginx/conf.d/default.template"
laravel.test:
build:
context: ./vendor/laravel/sail/runtimes/8.1
dockerfile: Dockerfile
args:
WWWGROUP: '${WWWGROUP}'
image: sail-8.1/app
extra_hosts:
- 'host.docker.internal:host-gateway'
ports:
- "8000:80"
- "3000:443"
- '${APP_PORT:-80}:80'
- '${HMR_PORT:-8080}:8080'
environment:
- NGINX_HOST=${NGINX_HOST}
command: /bin/sh -c "envsubst '$$NGINX_HOST' < /etc/nginx/conf.d/default.template > /etc/nginx/conf.d/default.conf && nginx -g 'daemon off;'"
restart: always
WWWUSER: '${WWWUSER}'
LARAVEL_SAIL: 1
XDEBUG_MODE: '${SAIL_XDEBUG_MODE:-off}'
XDEBUG_CONFIG: '${SAIL_XDEBUG_CONFIG:-client_host=host.docker.internal}'
volumes:
- '.:/var/www/html'
networks:
- sail
depends_on:
- php
- mysqldb
php:
image: nanoninja/php-fpm:${PHP_VERSION}
restart: always
volumes:
- "./etc/php/php.ini:/usr/local/etc/php/conf.d/php.ini"
- "./:/var/www/html"
composer:
image: "composer"
command: install
myadmin:
image: phpmyadmin/phpmyadmin
container_name: phpmyadmin
- mysql
- redis
phpmyadmin:
image: 'phpmyadmin:latest'
ports:
- "8080:80"
- 8888:80
environment:
- PMA_ARBITRARY=1
- PMA_HOST=${MYSQL_HOST}
restart: always
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
links:
- "mysql:db"
depends_on:
- mysqldb
mysqldb:
image: mysql:${MYSQL_VERSION}
container_name: ${MYSQL_HOST}
restart: always
env_file:
- ".env"
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE}
- MYSQL_ROOT_PASSWORD=${MYSQL_ROOT_PASSWORD}
- MYSQL_USER=${MYSQL_USER}
- MYSQL_PASSWORD=${MYSQL_PASSWORD}
- mysql
networks:
- sail
mysql:
image: 'mysql/mysql-server:8.0'
ports:
- "8989:3306"
- '${FORWARD_DB_PORT:-3306}:3306'
environment:
MYSQL_ROOT_PASSWORD: '${DB_PASSWORD}'
MYSQL_ROOT_HOST: "%"
MYSQL_DATABASE: '${DB_DATABASE}'
MYSQL_USER: '${DB_USERNAME}'
MYSQL_PASSWORD: '${DB_PASSWORD}'
MYSQL_ALLOW_EMPTY_PASSWORD: 1
volumes:
- "./data/db/mysql:/var/lib/mysql"
- 'sail-mysql:/var/lib/mysql'
- './vendor/laravel/sail/database/mysql/create-testing-database.sh:/docker-entrypoint-initdb.d/10-create-testing-database.sh'
networks:
- sail
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-p${DB_PASSWORD}"]
retries: 3
timeout: 5s
redis:
image: 'redis:alpine'
ports:
- '${FORWARD_REDIS_PORT:-6379}:6379'
volumes:
- 'sail-redis:/data'
networks:
- sail
healthcheck:
test: ["CMD", "redis-cli", "ping"]
retries: 3
timeout: 5s
memcached:
image: 'memcached:alpine'
ports:
- '11211:11211'
networks:
- sail
networks:
sail:
driver: bridge
volumes:
sail-mysql:
driver: local
sail-redis:
driver: local