Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 32 additions & 2 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,36 @@ export default withNextra({
destination: '/getting-started/coding-with-ai/skills.md',
permanent: true
},
{
source: '/getting-started/build-memgraph-from-source',
destination: '/getting-started/install-memgraph/build-from-source',
permanent: true
},
{
source: '/getting-started/build-memgraph-from-source.md',
destination: '/getting-started/install-memgraph/build-from-source.md',
permanent: true
},
{
source: '/getting-started/packaging-memgraph',
destination: '/getting-started/install-memgraph/packaging',
permanent: true
},
{
source: '/getting-started/packaging-memgraph.md',
destination: '/getting-started/install-memgraph/packaging.md',
permanent: true
},
{
source: '/getting-started/first-steps-with-docker',
destination: '/deployment/environments/docker',
permanent: true
},
{
source: '/getting-started/first-steps-with-docker.md',
destination: '/deployment/environments/docker.md',
permanent: true
},
{
source: '/use-cases',
destination: '/ai-ecosystem',
Expand Down Expand Up @@ -2474,7 +2504,7 @@ export default withNextra({
},
{
source: '/memgraph/how-to-guides-overview/work-with-docker',
destination: '/getting-started/first-steps-with-docker',
destination: '/deployment/environments/docker',
permanent: true
},
{
Expand All @@ -2484,7 +2514,7 @@ export default withNextra({
},
{
source: '/memgraph/how-to-work-with-docker',
destination: '/getting-started/first-steps-with-docker',
destination: '/deployment/environments/docker',
permanent: true
},
{
Expand Down
12 changes: 6 additions & 6 deletions pages/advanced-algorithms/available-algorithms/export_util.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ The `path` is the path to the JSON file inside the

<Callout type="info">

You can [**copy the exported JSON file to your local file
system**](/getting-started/first-steps-with-docker#copy-files-from-a-docker-container)
You can [copy the exported JSON file to your local file
system](/deployment/environments/docker#copy-files-with-docker-cp)
using the [`docker
cp`](https://docs.docker.com/engine/reference/commandline/cp/) command.

Expand Down Expand Up @@ -203,8 +203,8 @@ The `path` is the path to a CSV file inside the

<Callout type="info">

You can [**copy the exported CSV file to your local file
system**](/getting-started/first-steps-with-docker#copy-files-from-a-docker-container)
You can [copy the exported CSV file to your local file
system](/deployment/environments/docker#copy-files-with-docker-cp)
using the [`docker
cp`](https://docs.docker.com/engine/reference/commandline/cp/) command.

Expand Down Expand Up @@ -518,8 +518,8 @@ The `path` is the path to the graphML file inside the

<Callout type="info">

You can [**copy the exported file to your local file
system**](/getting-started/first-steps-with-docker#copy-files-from-a-docker-container)
You can [copy the exported file to your local file
system](/deployment/environments/docker#copy-files-with-docker-cp)
using the [`docker
cp`](https://docs.docker.com/engine/reference/commandline/cp/) command.

Expand Down
2 changes: 1 addition & 1 deletion pages/advanced-algorithms/install-mage.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ sudo ./environment/os/install_deps.sh install MEMGRAPH_BUILD_DEPS

{<h3 id="set-up-the-toolchain" className="custom-header">Set up the toolchain</h3>}

Download and install the [Memgraph Toolchain](/getting-started/build-memgraph-from-source#about-the-toolchain):
Download and install the [Memgraph Toolchain](/getting-started/install-memgraph/build-from-source#about-the-toolchain):
```bash
curl -L https://s3-eu-west-1.amazonaws.com/deps.memgraph.io/toolchain-v8/toolchain-v8-binaries-x86_64.tar.gz -o toolchain.tar.gz
sudo tar xzvfm toolchain.tar.gz -C /opt
Expand Down
11 changes: 7 additions & 4 deletions pages/ai-ecosystem/integrations/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,23 @@ docker build -f integrations/mcp-memgraph/Dockerfile -t memgraph/mcp-memgraph:la
Publish port 8000 to make the server available at `http://localhost:8000/mcp/`:

```bash
docker run --rm -p 8000:8000 memgraph/mcp-memgraph:latest
docker run --rm -p 8000:8000 --add-host=host.docker.internal:host-gateway memgraph/mcp-memgraph:latest
```

**Stdio mode, for MCP clients that use stdio**

Configure your MCP host to run the `docker` command and use stdio:

```bash
docker run --rm -i -e MCP_TRANSPORT=stdio memgraph/mcp-memgraph:latest
docker run --rm -i -e MCP_TRANSPORT=stdio --add-host=host.docker.internal:host-gateway memgraph/mcp-memgraph:latest
```

<Callout type="info">
By default, the server connects to Memgraph on the host at
`bolt://host.docker.internal:7687`. To connect to Memgraph on another host or
port, set the environment variables shown below.
`bolt://host.docker.internal:7687`. Docker on Linux resolves
`host.docker.internal` only with the
`--add-host=host.docker.internal:host-gateway` flag used above. To connect to
Memgraph on another host or port, set the environment variables shown below.
</Callout>

**Custom Memgraph connection**
Expand Down Expand Up @@ -196,6 +198,7 @@ When the settings open, enhance the args as follows:
"--rm",
"-i",
"-e", "MCP_TRANSPORT=stdio",
"--add-host=host.docker.internal:host-gateway",
"memgraph/mcp-memgraph:latest"
]
}
Expand Down
2 changes: 1 addition & 1 deletion pages/data-migration/best-practices.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Assuming that the files have been correctly split, and [Memgraph is
running](/getting-started) in `IN_MEMORY_ANALYTICAL` mode, the import process
can start. If you're running Memgraph with Docker, you need to first [copy the
CSV
files](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
files](/deployment/environments/docker#share-files-with-the-container)
into the container where Memgraph is running. Based on the paths of the files,
you can generate the queries, each using a different file from the total pool of
files.
Expand Down
6 changes: 3 additions & 3 deletions pages/data-migration/csv.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ LOAD CSV FROM <csv-location> ( WITH CONFIG configsMap=configMap ) ? ( WITH | NO

If you are using Docker to run Memgraph, you will need to
[copy the files from your local directory into
Docker](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
Docker](/deployment/environments/docker#share-files-with-the-container)
container where Memgraph can access them. <br/> If using `http://`,
`https://`, or `ftp://` the CSV file will be fetched over the network.

Expand Down Expand Up @@ -385,7 +385,7 @@ There are also two variations of the files: files with a header and files withou

{<h3 className="custom-header">Check the location of the CSV files</h3>}
If you are working with Docker, [copy the files from your local directory into
the Docker container](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
the Docker container](/deployment/environments/docker#share-files-with-the-container)
so that Memgraph can access them.

{<h3 className="custom-header">Import nodes</h3>}
Expand Down Expand Up @@ -611,7 +611,7 @@ of a single label or relationships of a single type. All files have a header.

{<h3 className="custom-header">Check the location of the CSV files</h3>}
If you are working with Docker, [copy the files from your local directory into
the Docker container](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
the Docker container](/deployment/environments/docker#share-files-with-the-container)
so that Memgraph can access them.

{<h3 className="custom-header">Import nodes</h3>}
Expand Down
2 changes: 1 addition & 1 deletion pages/data-migration/cypherl.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ the CYPHERL file.
If you installed and started Memgraph using **Docker**, follow these steps:

1. Open a new terminal and check the Docker container ID by running `docker ps`.
2. Copy the `queries.cypherl` [to your Docker container](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container).
2. Copy the `queries.cypherl` [to your Docker container](/deployment/environments/docker#share-files-with-the-container).
3. Run the following command

```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ To create a transformation module, you need to:
3. Load the file into Memgraph either on startup (automatically) or by running a
`CALL mg.load_all();` query.

If you are using Docker to run Memgraph, check [how to transfer the file into the container](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container).
If you are using Docker to run Memgraph, check [how to transfer the file into the container](/deployment/environments/docker#share-files-with-the-container).

If you are using Memgraph Lab you can [create transformation module within the
application](/data-migration/data-streams/transformation-modules#creating-transformation-modules-within-memgraph-lab).
Expand Down
4 changes: 2 additions & 2 deletions pages/data-migration/json.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ LOAD JSONL FROM <jsonl-location> ( WITH CONFIG configsMap=configMap ) ? AS <vari
the file exists). Files can be imported directly from the public URL and S3.
If you are using Docker to run Memgraph, you will need to
[copy the files from your local directory into
Docker](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
Docker](/deployment/environments/docker#share-files-with-the-container)
container where Memgraph can access them. <br/>
- `<configs>` Represents an optional configuration map through which you can
specify configuration options: `aws_region`, `aws_access_key`,
Expand Down Expand Up @@ -483,7 +483,7 @@ Let's import data from a file `data.json` with the following content:

If you are using Docker to run Memgraph, you will need to [copy the files from
your local directory into the
Docker](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
Docker](/deployment/environments/docker#share-files-with-the-container)
container where Memgraph can access them.

To create a node with the label `Person` and `first_name`, `last_name` and `pets`
Expand Down
4 changes: 2 additions & 2 deletions pages/data-migration/migrate-memgraph-platform.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Starting with version 2.15, the platform has transitioned to a multi-container
application. This upgrade separates the previous single Docker image into
individual containers for Memgraph+MAGE and Memgraph Lab.

If you are running an older version of Memgraph Platform (versions up to 2.15),
If you are running an older version of Memgraph Platform (versions up to 2.14),
you can migrate your data to the newer version of Memgraph MAGE.

## Using a database dump
Expand Down Expand Up @@ -51,7 +51,7 @@ Memgraph MAGE instance.
If you installed and started Memgraph MAGE using **Docker**, follow these steps:

1. Open a new terminal and check the Docker container ID by running `docker ps`.
2. Copy the `queries.cypherl` [to your Docker container](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container).
2. Copy the `queries.cypherl` [to your Docker container](/deployment/environments/docker#share-files-with-the-container).
3. Run the following command:

```
Expand Down
2 changes: 1 addition & 1 deletion pages/data-migration/parquet.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ LOAD PARQUET FROM <parquet-location> ( WITH CONFIG configs=configMap ) ? AS <var
file’s location within your local file system, as long as the path is valid
and the file exists. If you are using Docker to run Memgraph, you will need to
[copy the files from your local directory into
Docker](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
Docker](/deployment/environments/docker#share-files-with-the-container)
container where Memgraph can access them. <br/>

- `<configs>` Represents an optional configuration map through which you can
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This guide is designed for:
"https://install.memgraph.com" | sh` and for Windows run `iwr
https://install.memgraph.com/windows -useb | iex`. Read detailed instructions
in the [getting started guide](/getting-started).
- A CSV file containing your data [stored in a running Memgraph container](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container). For this guide, we provide a [dummy file with
- A CSV file containing your data [stored in a running Memgraph container](/deployment/environments/docker#share-files-with-the-container). For this guide, we provide a [dummy file with
random
data](/data/data-modeling/random_data.csv).
- Basic knowledge of databases (helpful but not mandatory).
Expand Down Expand Up @@ -537,7 +537,7 @@ Results:

To create the database in Memgraph from the provided dummy data, run the Cypher
queries provided below. The prerequisite is to [copy the CSV file into the
container](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
container](/deployment/environments/docker#share-files-with-the-container)
where Memgraph is running in the `usr/lib/memgraph` directory.

<details>
Expand Down
2 changes: 1 addition & 1 deletion pages/database-management/ssl-encryption.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Certification Authority. Memgraph contains a self-signed testing certificate

If you are using Docker and want to use your own certificates, you need to [copy
them into a Docker
container](/getting-started/first-steps-with-docker#copy-files-to-a-docker-container)
container](/deployment/environments/docker#share-files-with-the-container)
in order to utilize them.

## Configure the server
Expand Down
48 changes: 40 additions & 8 deletions pages/deployment/environments/docker.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -236,14 +236,46 @@ Additionally, here are some useful facts about Docker volumes:
straightforward. Docker volumes can be inspected even when the container is
down.

<Cards>
<div className="w-[260px]">
<Cards.Card
title="Learn more about Docker"
href="/getting-started/first-steps-with-docker"
/>
</div>
</Cards>
## Share files with the container

Memgraph in Docker reads and writes files inside its container. A file on your
machine has to be in the container before `LOAD CSV`, `LOAD PARQUET`,
`LOAD JSONL` or a CYPHERL import can read it, and a file that
[`export_util`](/advanced-algorithms/available-algorithms/export_util) writes
stays in the container until you copy it out.

### Mount a host folder

To share a folder with Memgraph, mount it with `-v` when you start the
container. Run this in the folder that holds your files:

```bash
docker run -p 7687:7687 -p 7444:7444 -v "$(pwd)":/data memgraph/memgraph-mage
```

Memgraph then sees the folder as `/data`. Import a file from it with
`LOAD CSV FROM "/data/people.csv" WITH HEADER AS row ...`, and export to it with
`CALL export_util.json("/data/export.json")`; the exported file appears in the
same folder on your machine. On Linux, exports work only if the container's
`memgraph` user (UID 101) can write to the folder.

Mount the folder at its own path, such as `/data`, not over
`/usr/lib/memgraph`, which holds Memgraph and its query modules. Keep the
database's own data in [named volumes](#persist-data-with-docker-volumes).

### Copy files with docker cp

For a one-off file, copy it into or out of a running container with
`docker cp`:

```bash
docker cp people.csv CONTAINER:/usr/lib/memgraph/people.csv
docker cp CONTAINER:/usr/lib/memgraph/query_modules/export.json export.json
```

`CONTAINER` is the container's name or ID, as listed by `docker ps`. After the
first command, Memgraph can read the file as `/usr/lib/memgraph/people.csv`.


## Backup data

Expand Down
Loading
Loading