https://github.com/drago-ex/project
:bulb: Basis for new modules projects on Drago Extension (@drago-ex)
https://github.com/drago-ex/project
nette project
Last synced: 10 months ago
JSON representation
:bulb: Basis for new modules projects on Drago Extension (@drago-ex)
- Host: GitHub
- URL: https://github.com/drago-ex/project
- Owner: drago-ex
- Created: 2015-10-17T09:54:48.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2024-08-31T09:47:13.000Z (almost 2 years ago)
- Last Synced: 2024-11-13T14:34:27.044Z (over 1 year ago)
- Topics: nette, project
- Language: PHP
- Homepage:
- Size: 299 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
## Drago Project
Basis for new modules projects on Drago Extension
[](https://badge.fury.io/ph/drago-ex%2Fproject)
[](https://github.com/drago-ex/project/actions/workflows/coding-style.yml)
[](https://www.codefactor.io/repository/github/drago-ex/project)
## Technology
- PHP 8.3 or higher
- composer
- docker
- node.js
## Installation
```bash
composer create-project drago-ex/project
```
## Basic information
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.
First, run `npm install`
## Docker
Docker is set to the minimum configuration for running the project.
If we want to add, for example, MySQL, we add these lines to the dockerfile:
```dockerfile
# 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:
```yml
# 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.
## 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`
Then edit the configuration including the database in `bin/config.neon`
And run the command: `php .\bin\generator app:entity`
## Info
The project with the database set up in this way is available in the `database-project` branch.