From 8936f774ce14c263b50dc15b9bdb7c289f0f5f8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20B=C3=B6hme?= Date: Fri, 16 Aug 2024 22:54:28 +0200 Subject: [PATCH] Update docker compose file to use named volumes --- .gitignore | 1 - docker-compose.yml.example | 10 ++++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 545ab2f..1580afe 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,5 @@ Gemfile.lock docker-compose.yml /test/database.yml -/data/ /log/* !/log/.keep diff --git a/docker-compose.yml.example b/docker-compose.yml.example index 8ca0033..cb5470b 100644 --- a/docker-compose.yml.example +++ b/docker-compose.yml.example @@ -1,5 +1,3 @@ -version: "3.8" - services: postgresql: image: postgres:latest @@ -10,7 +8,7 @@ services: ports: - "5432:5432" volumes: - - ./data/postgres:/var/lib/postgresql/data + - postgres_data:/var/lib/postgresql/data mysql: image: mariadb @@ -21,4 +19,8 @@ services: ports: - "3306:3306" volumes: - - ./data/mysql:/var/lib/mysql + - mysql_data:/var/lib/mysql + +volumes: + postgres_data: + mysql_data: