]> BookStack Code Mirror - bookstack/commitdiff
Merge branch 'docker-development-environment' of git://github.com/timoschwarzer/BookS...
authorDan Brown <redacted>
Mon, 26 Aug 2019 20:24:56 +0000 (21:24 +0100)
committerDan Brown <redacted>
Mon, 26 Aug 2019 20:24:56 +0000 (21:24 +0100)
1  2 
readme.md

diff --cc readme.md
index 4e93607b686471af955bc540aab8e1dc983004f1,9587529daf79a4c161f00363286ec003acd8b57b..0e25f97910275112378be2a76b6f11f0b5f3d10c
+++ b/readme.md
@@@ -75,11 -75,26 +75,31 @@@ php artisan db:seed --class=DummyConten
  
  Once done you can run `php vendor/bin/phpunit` in the application root directory to run all tests.
  
 -## Getting started with Development using Docker
 +### ðŸ“œ Code Standards
 +
 +PHP code within BookStack is generally to [PSR-2](http://www.php-fig.org/psr/psr-2/) standards. From the BookStack root folder you can run `./vendor/bin/phpcs` to check code is formatted correctly and `./vendor/bin/phpcbf` to auto-fix non-PSR-2 code.
 +
++### Getting started with Development using Docker
+ This repository ships with a Docker Compose configuration intended for development purposes. It'll build a PHP image with all needed extensions installed and start up a MySQL server and a Node image watching the UI assets.
+ To get started, make sure you meet the following requirements:
+ - Docker and Docker Compose are installed
+ - Your user is part of the `docker` group
+ - Composer is installed
+ If all the conditions are met, you can proceed with the following steps:
+ 1. Install Composer dependencies with **`docker-compose run app composer install`** (first time can take a while because the image has to be built)
+ 2. **Copy `.env.example` to `.env`** and change `APP_KEY` to a random 32 char string
+ 3. Make sure **port 8080 is unused** *or else* change `DEV_PORT` to a free port on your host
+ 4. **Run `chgrp -R docker storage`**. The development container will chown the `storage` directory to the `www-data` user inside the container so BookStack can write to it. You need to change the group to your host's `docker` group here to not lose access to the `storage` directory
+ 5. **Run `docker-compose up`** and wait until all database migrations have been done
+ 6. You can now login with `admin@admin.com` and `password` as password on `localhost:8080` (or another port if specified)
 -## Translations
++
 +## ðŸŒŽ Translations
  
  All text strings can be found in the `resources/lang` folder where each language option has its own folder. To add a new language you should copy the `en` folder to an new folder (eg. `fr` for french) then go through and translate all text strings in those files, leaving the keys and file-names intact. If a language string is missing then the `en` translation will be used. To show the language option in the user preferences language drop-down you will need to add your language to the options found at the bottom of the `resources/lang/en/settings.php` file. A system-wide language can also be set in the `.env` file like so: `APP_LANG=en`.
  
Morty Proxy This is a proxified and sanitized view of the page, visit original site.