From c1dbabe9369be09c1ebe8cf916db43f84a55272c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Sch=C3=A4r?= Date: Wed, 26 Jun 2024 11:17:00 +0200 Subject: [PATCH 1/2] update docker compose commands in readme --- readme.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/readme.md b/readme.md index c89f45b..a58130f 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -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 From de132f3016520115a7e6ef333ec7915641dff272 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Sch=C3=A4r?= Date: Wed, 26 Jun 2024 15:09:41 +0200 Subject: [PATCH 2/2] Curl example --- readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/readme.md b/readme.md index a58130f..c5f479f 100644 --- a/readme.md +++ b/readme.md @@ -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)