Skip to content

talentedev/symfony-vue-coreui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup

First, make sure you are running the latest version of Docker and Docker Compose.

Windows is not supported, period.

On macOS, add those lines in your /etc/hosts file:

127.0.0.1   web.localhost
127.0.0.1   phpmyadmin.web.localhost

Clone the project, move to its root directory and run:

$ cp .env.template .env
$ make up

This command will start the stack and also run the following commands in the web service:

  • composer install: installs PHP dependencies
  • yarn install: installs frontend dependencies
  • php bin/console doctrine:migrations:migrate --no-interaction: runs the migration patches on the database

Once the web service is ready, you may now run bash inside it with:

$ make bash

Here you have to run the following commands:

$ yarn dev
# builds the frontend application...
$ php bin/console doctrine:fixtures:load --append
# adds fake data in the database...

Note: a watcher is also available with yarn watch.

Available commands

$ make up

Starts the stack.


$ make down

Stops the stack


$ make bash

Runs bash inside the web service.

Workflow before each push

Run the following command in the web service:

$ composer run csfix && composer run cscheck && composer run phpstan

Workflow for database tables generation

Go the web service:

$ make bash

Create your PHP entity:

$ php bin/console make:entity

Generate the migration script:

$ php bin/console doctrine:migrations:diff

Execute the migration script to generate your db:

$ php bin/console doctrine:migrations:migrate