Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
APP_NAME=WbStack
APP_ENV=local
APP_KEY=TODO
APP_DEBUG=true
# make sure URL (and port!) match the docker-compose setup
APP_URL=http://localhost:8082
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/composer.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

- name: Setup - Other things
run: |
docker compose exec -T api bash -c 'php artisan key:generate && php artisan passport:install --no-interaction'
docker compose exec -T api php artisan passport:install --no-interaction

- name: PHPUnit
run: docker compose exec -e APP_ENV=testing -T api vendor/bin/phpunit
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ test:
docker compose exec api bash -c 'LOG_CHANNEL=stderr LOG_LEVEL=debug vendor/bin/phpunit ${FILTER}'

init:
docker compose exec api bash -c 'php artisan migrate:fresh && php artisan passport:install --no-interaction && php artisan key:generate'
docker compose exec api bash -c 'php artisan migrate:fresh && php artisan passport:install --no-interaction'

test-fresh: init test

Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ docker run --rm -it -v $PWD:/app -u $(id -u):$(id -g) composer:2.9.2 --ignore-pl

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

Docker Compose supplies a fixed development-only `APP_KEY`. Never reuse it outside local development.

### Docker compose

You should be able to run some amount of this application in docker compose.
Expand All @@ -50,7 +52,7 @@ docker compose down --volumes
Run everything in one go:

```sh
docker compose exec api bash -c 'php artisan migrate:fresh && php artisan passport:install --no-interaction && php artisan db:seed && php artisan key:generate && php artisan storage:link'
docker compose exec api bash -c 'php artisan migrate:fresh && php artisan passport:install --no-interaction && php artisan db:seed && php artisan storage:link'
```

Or each command separately:
Expand All @@ -65,9 +67,6 @@ docker compose exec api php artisan passport:install --no-interaction
# Seed some useful development data
docker compose exec api php artisan db:seed

# Generate and set the APP_KEY env variable.
docker compose exec api php artisan key:generate

# Create a symlink from `public/storage` to `storage/app/public`
docker compose exec api php artisan storage:link
```
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ services:
- redis
environment:
- CONTAINER_ROLE=app
# Development-only key. Never reuse outside local Docker Compose.
- APP_KEY=base64:7CtZbRpmIO4valwzbXDiCT0CQAo309naCXpEqkwtv5c=
sql:
image: "${DOCKER_DATABASE_IMAGE_NAME}"
environment:
Expand Down
Loading