Drago Project
Basis for new modules projects on Drago Extension, (*1)
, (*2)
Technology
- PHP 8.3 or higher
- composer
- docker
- node.js
Installation
composer create-project drago-ex/project
Basic package for applications where the basis for Bootstrap, Vite, Docker, Naja is already prepared.
You can find all commands in package.json
like running Docker or Vite., (*3)
First, run npm install
, (*4)
Docker
Docker is set to the minimum configuration for running the project., (*5)
If we want to add, for example, MySQL, we add these lines to the dockerfile:, (*6)
# php extensions
RUN docker-php-ext-install mysqli
RUN docker-php-ext-enable mysqli
And add these lines to docker-compose.yml
to configure the MySQL server as needed:, (*7)
# database
db:
image: library/mariadb:latest
command: --character-set-server=utf8 --collation-server=utf8_unicode_ci
restart: always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: app
MYSQL_USER: super
MYSQL_PASSWORD: pass
volumes:
- ./docker/mysql/:/var/lib/mysql
ports:
- '6033:3306'
As for further configuration on Docker, you can find it in the documentation., (*8)
If we use database, we can use Entity generation
composer require drago-ex/generator --dev
Use the command to copy the necessary files: copy .\vendor\drago-ex\generator\bin\* bin
, (*9)
Then edit the configuration including the database in bin/config.neon
, (*10)
And run the command: php .\bin\generator app:entity
, (*11)
Info
The project with the database set up in this way is available in the database-project
branch., (*12)