Skip to content

Commit 4a4dea0

Browse files
authored
Hide docker run details on docs (#364)
1 parent a3b146d commit 4a4dea0

File tree

3 files changed

+38
-41
lines changed

3 files changed

+38
-41
lines changed

docs/integrations/asyncpg.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,20 @@ demonstrate how to use **Logfire** with asyncpg.
1818
First, we need to initialize a PostgreSQL database. This can be easily done using Docker with the following command:
1919

2020
```bash
21-
docker run --name postgres \
22-
-e POSTGRES_USER=user \
23-
-e POSTGRES_PASSWORD=secret \
24-
-e POSTGRES_DB=database \
25-
-p 5432:5432 -d postgres
21+
docker run --name postgres \ # (1)!
22+
-e POSTGRES_USER=user \ # (2)!
23+
-e POSTGRES_PASSWORD=secret \ # (3)!
24+
-e POSTGRES_DB=database \ # (4)!
25+
-p 5432:5432 \ # (5)!
26+
-d postgres # (6)!
2627
```
2728

28-
This command accomplishes the following:
29-
30-
- `--name postgres`: This defines the name of the Docker container.
31-
- `-e POSTGRES_USER=user`: This sets a user for the PostgreSQL server.
32-
- `-e POSTGRES_PASSWORD=secret`: This sets a password for the PostgreSQL server.
33-
- `-e POSTGRES_DB=database`: This creates a new database named "database", the same as the one used in your Python script.
34-
- `-p 5432:5432`: This makes the PostgreSQL instance available on your local machine under port 5432.
35-
- `-d postgres`: This denotes the Docker image to be used, in this case, "postgres".
29+
1. `--name postgres`: This defines the name of the Docker container.
30+
2. `-e POSTGRES_USER=user`: This sets a user for the PostgreSQL server.
31+
3. `-e POSTGRES_PASSWORD=secret`: This sets a password for the PostgreSQL server.
32+
4. `-e POSTGRES_DB=database`: This creates a new database named "database", the same as the one used in your Python script.
33+
5. `-p 5432:5432`: This makes the PostgreSQL instance available on your local machine under port 5432.
34+
6. `-d postgres`: This denotes the Docker image to be used, in this case, "postgres", and starts the container in detached mode.
3635

3736
### Run the Python script
3837

docs/integrations/mysql.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,22 @@ demonstrate how to use **Logfire** with MySQL.
1818
First, we need to initialize a MySQL database. This can be easily done using Docker with the following command:
1919

2020
```bash
21-
docker run --name mysql \
22-
-e MYSQL_ROOT_PASSWORD=secret \
23-
-e MYSQL_DATABASE=database \
24-
-e MYSQL_USER=user \
25-
-e MYSQL_PASSWORD=secret \
26-
-p 3306:3306 -d mysql
21+
docker run --name mysql \ # (1)!
22+
-e MYSQL_ROOT_PASSWORD=secret \ # (2)!
23+
-e MYSQL_DATABASE=database \ # (3)!
24+
-e MYSQL_USER=user \ # (4)!
25+
-e MYSQL_PASSWORD=secret \ # (5)!
26+
-p 3306:3306 \ # (6)!
27+
-d mysql # (7)!
2728
```
2829

29-
This command accomplishes the following:
30-
31-
- `--name mysql`: gives the container a name of "mysql".
32-
- `-e MYSQL_ROOT_PASSWORD=secret` sets the root password to "secret".
33-
- `-e MYSQL_DATABASE=database` creates a new database named "database".
34-
- `-e MYSQL_USER=user` creates a new user named "user".
35-
- `-e MYSQL_PASSWORD=secret` sets the password for the new user to "secret".
36-
- `-p 3306:3306` maps port 3306 inside Docker as port 3306 on the host machine.
37-
- `-d mysql` runs the container in the background and prints the container ID. The image is "mysql".
30+
1. `--name mysql`: This defines the name of the Docker container.
31+
2. `-e MYSQL_ROOT_PASSWORD=secret`: This sets a password for the MySQL root user.
32+
3. `-e MYSQL_DATABASE=database`: This creates a new database named "database", the same as the one used in your Python script.
33+
4. `-e MYSQL_USER=user`: This sets a user for the MySQL server.
34+
5. `-e MYSQL_PASSWORD=secret`: This sets a password for the MySQL server.
35+
6. `-p 3306:3306`: This makes the MySQL instance available on your local machine under port 3306.
36+
7. `-d mysql`: This denotes the Docker image to be used, in this case, "mysql", and starts the container in detached mode.
3837

3938
### Run the Python script
4039

docs/integrations/psycopg.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,20 @@ demonstrate how to use **Logfire** with Psycopg.
2424
First, we need to initialize a PostgreSQL database. This can be easily done using Docker with the following command:
2525

2626
```bash
27-
docker run --name postgres \
28-
-e POSTGRES_USER=user \
29-
-e POSTGRES_PASSWORD=secret \
30-
-e POSTGRES_DB=database \
31-
-p 5432:5432 -d postgres
27+
docker run --name postgres \ # (1)!
28+
-e POSTGRES_USER=user \ # (2)!
29+
-e POSTGRES_PASSWORD=secret \ # (3)!
30+
-e POSTGRES_DB=database \ # (4)!
31+
-p 5432:5432 \ # (5)!
32+
-d postgres # (6)!
3233
```
3334

34-
This command accomplishes the following:
35-
36-
- `--name postgres`: This defines the name of the Docker container.
37-
- `-e POSTGRES_USER=user`: This sets a user for the PostgreSQL server.
38-
- `-e POSTGRES_PASSWORD=secret`: This sets a password for the PostgreSQL server.
39-
- `-e POSTGRES_DB=database`: This creates a new database named "database", the same as the one used in your Python script.
40-
- `-p 5432:5432`: This makes the PostgreSQL instance available on your local machine under port 5432.
41-
- `-d postgres`: This denotes the Docker image to be used, in this case, "postgres".
35+
1. `--name postgres`: This defines the name of the Docker container.
36+
2. `-e POSTGRES_USER=user`: This sets a user for the PostgreSQL server.
37+
3. `-e POSTGRES_PASSWORD=secret`: This sets a password for the PostgreSQL server.
38+
4. `-e POSTGRES_DB=database`: This creates a new database named "database", the same as the one used in your Python script.
39+
5. `-p 5432:5432`: This makes the PostgreSQL instance available on your local machine under port 5432.
40+
6. `-d postgres`: This denotes the Docker image to be used, in this case, "postgres", and starts the container in detached mode.
4241

4342
### Run the Python script
4443

0 commit comments

Comments
 (0)