summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Axtens <dja@axtens.net>2017-10-20 16:36:54 +1100
committerDaniel Axtens <dja@axtens.net>2017-10-28 12:39:17 +1100
commitfa86224f538741f5a529f179cb8a63321f96d985 (patch)
tree5f6d1a03f36cb9ec5ddf21992318e4cd00ef5932
parentd65e805be6d99a72df92550ad38a2d1b2005724f (diff)
downloadpatchwork-fa86224f538741f5a529f179cb8a63321f96d985.tar
patchwork-fa86224f538741f5a529f179cb8a63321f96d985.tar.gz
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 <dja@axtens.net> Reviewed-by: Stephen Finucane <stephen@that.guru>
-rw-r--r--docker-compose.yml9
-rw-r--r--tools/docker/db/.dockerignore1
-rw-r--r--tools/docker/db/Dockerfile10
3 files changed, 7 insertions, 13 deletions
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.
-