From 565b928a59ff1c2d7c2e41913c9dd084f809f36e Mon Sep 17 00:00:00 2001 From: Kevin Morris Date: Thu, 24 Jun 2021 20:33:02 -0700 Subject: [PATCH] Docker: mount codebase volumes Before, docker build was the only way to transfer new code over to the docker image. This allows users to execute code in their working directory. Signed-off-by: Kevin Morris --- docker-compose.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index f9f808ef..eadf7a5c 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -113,7 +113,10 @@ services: - mariadb_run:/var/run/mysqld # Bind socket in this volume. - mariadb_data:/var/lib/mysql - ./cache:/cache - + - ./aurweb:/aurweb/aurweb + - ./migrations:/aurweb/migrations + - ./test:/aurweb/test + - ./web:/aurweb/web fastapi: image: aurweb:latest @@ -141,6 +144,10 @@ services: - mariadb_run:/var/run/mysqld # Bind socket in this volume. - mariadb_data:/var/lib/mysql - ./cache:/cache + - ./aurweb:/aurweb/aurweb + - ./migrations:/aurweb/migrations + - ./test:/aurweb/test + - ./web:/aurweb/web nginx: image: aurweb:latest @@ -171,6 +178,10 @@ services: - git_data:/aurweb/aur.git - ./cache:/cache - ./logs:/var/log/nginx + - ./aurweb:/aurweb/aurweb + - ./migrations:/aurweb/migrations + - ./test:/aurweb/test + - ./web:/aurweb/web sharness: image: aurweb:latest @@ -189,6 +200,10 @@ services: volumes: - git_data:/aurweb/aur.git - ./cache:/cache + - ./aurweb:/aurweb/aurweb + - ./migrations:/aurweb/migrations + - ./test:/aurweb/test + - ./web:/aurweb/web pytest-mysql: image: aurweb:latest @@ -211,6 +226,10 @@ services: - mariadb_run:/var/run/mysqld - git_data:/aurweb/aur.git - ./cache:/cache + - ./aurweb:/aurweb/aurweb + - ./migrations:/aurweb/migrations + - ./test:/aurweb/test + - ./web:/aurweb/web pytest-sqlite: image: aurweb:latest @@ -225,6 +244,10 @@ services: - mariadb_run:/var/run/mysqld - git_data:/aurweb/aur.git - ./cache:/cache + - ./aurweb:/aurweb/aurweb + - ./migrations:/aurweb/migrations + - ./test:/aurweb/test + - ./web:/aurweb/web depends_on: git: condition: service_healthy @@ -247,6 +270,10 @@ services: - mariadb_run:/var/run/mysqld - git_data:/aurweb/aur.git - ./cache:/cache + - ./aurweb:/aurweb/aurweb + - ./migrations:/aurweb/migrations + - ./test:/aurweb/test + - ./web:/aurweb/web volumes: mariadb_run: {} # Share /var/run/mysqld/mysqld.sock