Dance studio management software.
- Windows 10 64bit
- Hyper-V
- Docker for Windows
- NodeJS
-
Up-to-date Linux distribution
-
Note: please keep in mind your SELinux configuration!
-
docker-compose
-
Clone repository
Note: Rest of
Getting Started
section can be done automatically usingprepenv.sh
script. Run./prepenv.sh -k -p -w
. Run./prepenv.sh -h
for more info about this script. This script doesn't cover (Windows Only) parts. After running script go toWorking with PhpStorm
section. -
(Windows Only) Setup Docker:
- Click the whale icon in the tray
- Select
Shared Drives
and enableC
(or drive where you have cloned the repository)
-
Boot up machines:
-
Go to the repository you cloned
-
(Windows Only) If you have used port 80 you need to update docker-compose.yml: change line 18 to
- "8080:80"
- your server will be available at http://localhost:8080Note: Remember not to commit this changed file!
-
Run
docker-compose up -d
- this will build and boot required Docker images in backgroundNote: drop
-d
to see all logs in the console. Note: If, for any other reasondocker-compose up
doesn't build your image - try again. -
To stop containers use
docker-compose stop
-
-
Install required dependencies:
-
docker exec -it dncr_php_1 composer install
-
cd frontend && npm install
For Windows: add
-no-bin-links
tonpm install
command so it properly installs required dependencies.
-
-
Setup application:
cp .env.dev .env
docker exec -it dncr_php_1 php artisan key:generate
-
Create and seed database:
docker exec -it dncr_php_1 php artisan migrate:refresh --seed
-
Generate frontend application:
-
cd frontend && npm run build:dev
For problems with Windows: npm install MISSING_PACKAGE
-
-
(Linux only) Update cache permissions:
chmod 777 -R storage/*
chmod 777 bootstrap/cache
-
Go to http://localhost:8080 to see the application.
When you open the project (cloned directory) in PhpStorm you need to:
- Install Docker Integration:
- PhpStorm Settings -> Plugins -> Browse repositories...
- "Docker integration" -> install
- Setup Docker integration:
- Go to PhpStorm Settings
- Enter
Build, Execution, Deployment
tab - Enter
Docker
tab - Click green +
- For Windows
- Enter
http://127.0.0.1:2375
as API URL - Clear
Certificates folder
- Enter
- For Linux enter:
unix:///var/run/docker.sock
as API URL
- For Windows
- Select proper PHP interpreter in PhpStorm:
- Go to PhpStorm Settings
- Enter
Languages & Frameworks
tab - Enter
PHP
tab - Select
Remote PHP7
interpreter.
- Setup ability to debug PHP application:
-
Toggle the “Start Listening for PHP Debug Connections” button. No special debug run configuration is needed.
Note: Remember to repeat this step after PhpStorm restart.
-
Enter
PhpStorm Settings
>Language & Frameworks
>PHP
>Servers
-
Click
+
and inName
andHost
enterlocalhost
-
(Windows Only) Change
port
to8080
-
Select
Use path mappings
checkbox -
In the
Absolute path on the server
column enter/var/www/html
next to project main directory.
-
- Setup NPM integration:
- Press Alt + F11
- Select
npm
in the top left corner - Click + and select
dncr/frontend/package.json
- You should see a list of commands
- Setup TSLint integration:
- Enter
PhpStorm Settings
>Language & Frameworks
>TypeScript
>TSLint
Enable
at the top should be checked- Set
TSLint package
todncr/frontend/node_modules/tslint
Configuration file
should be set todncr/frontend/tslint.json
- Enter
- Setup database integration:
- Make sure that docker container
dncr_db_1
is running - Open
View
>Tool windows
>Database
- In
Database
view on the right and click+
- Select
Data sources
>MySQL
- Leave default
Host: localhost
andPort: 3306
. As forDatabase
,User
andPassword
- ask somebody on the team - Click
Test Connection
and save changes - To open database query editor, click console icon (first from the right) in
Database
view
- Make sure that docker container
- Setup polish dictionary integration:
- Enter
PhpStorm Settings
>Editor
>Spelling
- Enter
Dictionaries
tab - Click
+
inCustom Dictionaries Folder
- Select
dncr/.idea/dictionaries
directory
- Enter
- Install Laravel Plugin.
- Enter
PhpStorm Settings
>Plugins
>Spelling
>Browse repositories...
- Search for
Laravel Plugin
, select it andInstall
- Enter
PhpStorm allows you to:
- Run frontend build (NodeJS on your computer is required)
- Run Docker containers (boot up application)
- Run PHP tests
- Run frontend tests
- Press Alt + F11
- Run
watch
command
This will build dev version of application into public
directory served by Docker container.
- Press Alt + Shift + F10 (or go to Run -> Run...) and select 'Application'
- Visit http://localhost
This command will properly stop and start Docker containers defined in docker-compose.yml
Note: You can also select 'Application' in main toolbox and press play.
- Press Alt + Shift + F10 (or go to Run -> Run...) and select 'Tests'
- Press play for all tests
Note: You can also select 'Tests' in main toolbox and press play.
We are developing a new app so we are using brand new technologies:
- Laravel 5.2 as backend server
- Angular2 with TypeScript
- Bootstrap 4
For development purposes we are using webpack
This is a weird issue and can be fixed by running several commands:
- Open PowerShell as Administrator
- Run
Remove-VMSwitch -Name DockerNAT
- Open Docker settings
- Go to
Reset
and clickReset to factory defaults...
- Setup Docker once again
You can also check netstat -ab
in PowerShell to see whether Docker is listening on 127.0.0.1:2375
(com.docker.proxy.exe
).
Unfortunately we have no idea why is it coming up like this.
- Visit https://github.com/barryvdh/laravel-ide-helper
- Download L5 gist
- Place it in application directory (cloned repository)
- Use
dartisan.sh
script. Type./dartisan.sh -h
for more info.
Code copyright 2016 by Tomasz Legutko, Amadeusz Starzykiewicz, Bartosz Rakoczy, Szymon Łabuz and Marek Łakomy under the Apache 2.0 License.