mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-07-14 12:38:45 +00:00
1.5 KiB
1.5 KiB
title | slug |
---|---|
Docker Volumes | /deployment/docker/volumes |
Named volumes can persist data after we restart or remove a container. Also, it’s accessible by other containers.
For example:
version: 3.8
services:
db:
image:mysql
restart:always
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: test_db
ports:
- "3306:3306"
volumes:
- db_data:/var/lib/mysql
volumes:
db_data
Here, the first field is a unique name of the volume on a host machine. The second field is the path in the container.
Following are the changes we have to do while mounting the volume for ingestion in OpenMetadata
Update or add the volume in the docker-compose.yml file
Open the file docker-compose.yml
downloaded from the Release page.
First, define the volumes at the top level of the file. Example:
volumes:
ingestion-volume-dag-airflow:
ingestion-volume-dags:
ingestion-volume-tmp:
Then, add them in the service. Example:
- ingestion-volume-dag-airflow:/airflow/dag_generated_configs
- ingestion-volume-dags:/airflow/dags
- ingestion-volume-tmp:/tmp
Once these changes are done, restart the container via:
docker compose down && docker compose up -d
Verify the Named Volumes
Running docker volume ls
will list all the volumes which are available on the host machine.
The default path where volumes get created in Linux is as follows:
/var/lib/docker/volumes/