From 3c2a7dbb924906036d459423b4c4af90267d94e4 Mon Sep 17 00:00:00 2001
From: Vincent Pochet <vincent@getlago.com>
Date: Tue, 2 Jul 2024 15:32:22 +0200
Subject: [PATCH] misc: Update start guide in README (#371)

---
 README.md | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/README.md b/README.md
index a402fc5..7380a14 100644
--- a/README.md
+++ b/README.md
@@ -88,7 +88,9 @@ Distributed under the AGPLv3 License. Read more [here](https://www.getlago.com/b
 ### Run the app
 To start using Lago, run the following commands in a shell:
 
-```
+
+#### On a fresh install
+```bash
 # Get the code
 git clone https://github.com/getlago/lago.git
 
@@ -99,8 +101,21 @@ cd lago
 echo "LAGO_RSA_PRIVATE_KEY=\"`openssl genrsa 2048 | base64`\"" >> .env
 source .env
 
-# Start
-docker-compose up
+# Start the api
+docker compose up -d api
+
+# Create the database
+docker compose exec api rails db:create
+docker compose exec api rails db:migrate
+
+# Start all other components
+docker compose up
+```
+
+#### After an update
+
+```bash
+docker compose up
 ```
 
 You can now open your browser and go to http://localhost to connect to the application. Lago's API is exposed at http://localhost:3000.