Skip to content

Commit

Permalink
Merge pull request #91 from grueneschweiz/doc_readme_docker_compose
Browse files Browse the repository at this point in the history
Readme Update
  • Loading branch information
Michael-Schaer authored Jul 2, 2024
2 parents 452521b + de132f3 commit 8f4eee1
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ and start contributing 😍.
1. Start docker
1. Clone this repo `git clone https://github.com/grueneschweiz/weblingservice.git`
1. `cd` into the folder containing the repo
1. Execute `docker-compose run app composer install` and have a ☕️ while
1. Execute `docker compose run app composer install` and have a ☕️ while
it installs.
1. Execute `docker-compose up -d` to start up the stack. The first time you run
1. Execute `docker compose up -d` to start up the stack. The first time you run
this command, it will take a minute or two. Subsequent calls will be much faster.
1. Execute `docker exec wsapp cp .env.example .env` to get an instance of the environment variables
1. Execute `docker exec wsapp php artisan key:generate` to generate the app secrets
Expand All @@ -32,16 +32,16 @@ and start contributing 😍.

Yupii, you're nearly done. Just add the `WEBLING_API_KEY`, `WEBLING_FINANCE_ADMIN_API_KEY`, `WEBLING_BASE_URL`
to the `.env` file and you're ready to go. From now on, you can just start up the
stack with a single `docker-compose up -d`, without repeating all the commands
stack with a single `docker compose up -d`, without repeating all the commands
from above.

### Docker Cheat Sheet

- Start up: `docker-compose up -d`
- Shut down: `docker-compose down`
- Start up: `docker compose up -d`
- Shut down: `docker compose down`
- Execute Laravel CLI commands (enter container): `docker exec -it wsapp bash` use `exit` to escape the
container.
- Add dependency using composer: `docker-compose run wsapp composer require DEPENDENCY`
- Add dependency using composer: `docker compose run wsapp composer require DEPENDENCY`

### Tooling

Expand Down Expand Up @@ -78,3 +78,12 @@ curl -X POST \
-F "scope=" \
https://%mydomain.tld%/oauth/token
```

### Example request
```
curl -X GET "https://%mydomain.tld%/api/v1/member/%member-id%" \
-H "Authorization: Bearer %token%" \
-H "Content-Type: application/json"
```

[Other API routes](https://github.com/grueneschweiz/weblingservice/blob/master/routes/api.php)

0 comments on commit 8f4eee1

Please sign in to comment.