From fa86224f538741f5a529f179cb8a63321f96d985 Mon Sep 17 00:00:00 2001 From: Daniel Axtens Date: Fri, 20 Oct 2017 16:36:54 +1100 Subject: Simplify docker-compose MySQL setup This moves the config from a separate Dockerfile to something integrated into the docker-compose.yml file. Signed-off-by: Daniel Axtens Reviewed-by: Stephen Finucane --- docker-compose.yml | 9 +++++++-- tools/docker/db/.dockerignore | 1 - tools/docker/db/Dockerfile | 10 ---------- 3 files changed, 7 insertions(+), 13 deletions(-) delete mode 100644 tools/docker/db/.dockerignore delete mode 100644 tools/docker/db/Dockerfile diff --git a/docker-compose.yml b/docker-compose.yml index 7db3486..47786ec 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,9 +5,14 @@ # or upgrade to v2 and use the build-arg to override it. db: - build: tools/docker/db + image: mysql:5.7 volumes: - - ./tools/docker/db/data:/var/lib/mysql + - ./tools/docker/db/data:/var/lib/mysql + environment: + - MYSQL_ROOT_PASSWORD=password + - MYSQL_USER=patchwork + - MYSQL_PASSWORD=password + web: build: . dockerfile: ./tools/docker/Dockerfile diff --git a/tools/docker/db/.dockerignore b/tools/docker/db/.dockerignore deleted file mode 100644 index 1269488..0000000 --- a/tools/docker/db/.dockerignore +++ /dev/null @@ -1 +0,0 @@ -data diff --git a/tools/docker/db/Dockerfile b/tools/docker/db/Dockerfile deleted file mode 100644 index 5df9b5a..0000000 --- a/tools/docker/db/Dockerfile +++ /dev/null @@ -1,10 +0,0 @@ -FROM mysql:5.7 - -ENV MYSQL_ROOT_PASSWORD password -ENV MYSQL_USER patchwork -ENV MYSQL_PASSWORD password - -# We don't want to use the MYSQL_DATABASE env here because -# we want to be able to create the database with UTF-8 explictly. -# We also can't load in the data because it's in XML, yay. - -- cgit v1.2.3