From cbd901040ede5556b7e9d26c8bbde1fe11274844 Mon Sep 17 00:00:00 2001 From: Sandro Tanner Date: Thu, 14 Mar 2024 10:36:41 +0100 Subject: [PATCH] doc: docker compose v2 --- readme.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/readme.md b/readme.md index ab4f8ae..a7dbfa1 100644 --- a/readme.md +++ b/readme.md @@ -17,23 +17,23 @@ and start contributing 😍. 1. Start docker 1. Clone this repo `git clone https://github.com/grueneschweiz/mailchimpservice.git` 1. `cd` into the folder containing the repo -1. Execute `docker-compose run wsapp_mailchimp composer install` and have a ☕️ while +1. Execute `docker compose run app composer install` and have a ☕️ while it installs. -1. Execute `docker-compose run wsapp_mailchimp sh -c 'cp .env.example .env && php artisan key:generate'` to generate the +1. Execute `docker compose run app sh -c 'cp .env.example .env && php artisan key:generate'` to generate the app secrets. -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. After a few seconds: Visit [localhost:9001](http://localhost:9001). If you get a connection error, wait 30 seconds then try again. ### Docker Cheat Sheet -- Install: `docker-compose run wsapp_mailchimp composer install` -- Start up: `docker-compose up -d` -- Shut down: `docker-compose down` +- Install: `docker compose run app composer install` +- Start up: `docker compose up -d` +- Shut down: `docker compose down` - Execute Laravel CLI commands (enter container): `docker exec -it wsapp_mailchimp bash` use `exit` to escape the container. -- Add dependency using composer: `docker-compose un wsapp_mailchimp composer require DEPENDENCY` +- Add dependency using composer: `docker compose run app composer require DEPENDENCY` ### Testing In the main folder run `php vendor/phpunit/phpunit/phpunit tests` to run the tests locally.