Skip to content

Commit a1552ce

Browse files
authored
Update documentation for Docker commands (#939)
1 parent 9a7377c commit a1552ce

1 file changed

Lines changed: 16 additions & 12 deletions

File tree

README.md

Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ If the address includes the placeholder `<subject>`, it gets replaced with a sho
2626

2727
It is recommened to install the php dependencies via a composer docker container as that contains the required php extensions:
2828
```
29-
docker run --rm -it -v $PWD:/app -u $(id -u):$(id -g) composer install
29+
docker run --rm -it -v $PWD:/app -u $(id -u):$(id -g) composer install --ignore-platform-reqs
3030
```
3131

3232
Alternatively, you can run `composer` on your local machine (ignoring platform requirements):
@@ -38,46 +38,50 @@ composer install --ignore-platform-reqs
3838

3939
`cp .env.example .env` and modify the contents accordingly.
4040

41-
### docker-compose
41+
### Docker compose
4242

43-
You should be able to run some amount of this application in docker-compose.
43+
You should be able to run some amount of this application in docker compose.
4444

4545
Though the experience is not that refined...
4646

4747
```sh
48-
docker-compose up -d
48+
# Start the stack in the background
49+
docker compose up -d
50+
51+
# Stop the stack and delete all volumes
52+
docker compose down --volumes
4953
```
5054

5155
### Migrations
5256

5357
Run everything in one go ...
5458

5559
```sh
56-
docker-compose exec api bash -c 'php artisan migrate:fresh && php artisan passport:install && php artisan db:seed && php artisan key:generate && php artisan storage:link'
60+
docker compose exec api bash -c 'php artisan migrate:fresh && php artisan passport:install && php artisan db:seed && php artisan key:generate && php artisan storage:link'
5761
```
5862

5963
Or each command separately ...
6064

6165
```sh
6266
# Create the SQL tables needed
63-
docker-compose exec api php artisan migrate:fresh
67+
docker compose exec api php artisan migrate:fresh
6468

6569
# Create some certs needed for authentication (passport is a laravel plugin)
66-
docker-compose exec api php artisan passport:install
70+
docker compose exec api php artisan passport:install
6771

6872
# Seed some useful development data
69-
docker-compose exec api php artisan db:seed
73+
docker compose exec api php artisan db:seed
7074

7175
# Generate and set the APP_KEY env variable.
72-
docker-compose exec api php artisan key:generate
76+
docker compose exec api php artisan key:generate
7377

7478
# Create a symlink from `public/storage` to `storage/app/public`
75-
docker-compose exec api php artisan storage:link
79+
docker compose exec api php artisan storage:link
7680
```
7781

7882
Try loading http://localhost:8070/ until the DB is up and the connection works.
7983

80-
If you want to develop with the UI then simply point the UI docker-compose setup to localhost:8082
84+
If you want to develop with the UI then simply point the UI docker compose setup to localhost:8082
8185

8286
### Seeded data
8387

@@ -95,7 +99,7 @@ And create a wiki.
9599
Currently most of the tests require the DB connection to exist.
96100

97101
```sh
98-
docker-compose exec api vendor/bin/phpunit
102+
docker compose exec api vendor/bin/phpunit
99103
```
100104

101105
#### Debugging

0 commit comments

Comments
 (0)