You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This creates another mysql_testing database during db service setup Replace server with env tags in phpunit.xml in order to force override certain parameters when tests are run. See: sebastianbergmann/phpunit#2353 for more information. Rename primary developer Docker database from bookstack-test to bookstack-dev. bookstack-test is used as the mysql_testing database
Copy file name to clipboardExpand all lines: readme.md
+15-4Lines changed: 15 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,18 +96,29 @@ If all the conditions are met, you can proceed with the following steps:
96
96
1.**Copy `.env.example` to `.env`**, change `APP_KEY` to a random 32 char string and set `APP_ENV` to `local`.
97
97
2. Make sure **port 8080 is unused***or else* change `DEV_PORT` to a free port on your host.
98
98
3.**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.
99
-
4.**Run `echo -e "\n\nDOCKER_UID=$(id -u)" >> .env && echo "DOCKER_GID=$(id -g)" >> .env`** to add your UID/GID to the `.env` file. This is then used to set permissions inside the docker. This is necessary if you are working on Linux.
100
-
5.**Run `docker-compose up`** and wait until the image is built and all database migrations have been done.
101
-
6. You can now login with `admin@admin.com` and `password` as password on `localhost:8080` (or another port if specified).
99
+
4.**Run `docker-compose up`** and wait until the image is built and all database migrations have been done.
100
+
5. You can now login with `admin@admin.com` and `password` as password on `localhost:8080` (or another port if specified).
102
101
103
102
If needed, You'll be able to run any artisan commands via docker-compose like so:
104
103
105
-
```shell script
104
+
```shell script
106
105
docker-compose run app php artisan list
107
106
```
108
107
109
108
The docker-compose setup runs an instance of [MailHog](https://github.com/mailhog/MailHog) and sets environment variables to redirect any BookStack-sent emails to MailHog. You can view this mail via the MailHog web interface on `localhost:8025`. You can change the port MailHog is accessible on by setting a `DEV_MAIL_PORT` environment variable.
110
109
110
+
#### Running tests
111
+
112
+
After starting the general development Docker, seed the testing database:
113
+
```shell script
114
+
# this is to be done only once
115
+
docker-compose run app php artisan db:seed --class=DummyContentSeeder --database=mysql_testing
116
+
```
117
+
118
+
Once the database has been seeded, you can run the tests by:
119
+
```shell script
120
+
docker-compose run app php vendor/bin/phpunit
121
+
```
111
122
## 🌎 Translations
112
123
113
124
Translations for text within BookStack is managed through the [BookStack project on Crowdin](https://crowdin.com/project/bookstack). Some strings have colon-prefixed variables in such as `:userName`. Leave these values as they are as they will be replaced at run-time. Crowdin is the preferred way to provide translations, otherwise the raw translations files can be found within the `resources/lang` path.
0 commit comments