about summary refs log tree commit diff stats
path: root/docker-compose.dev.yml
diff options
context:
space:
mode:
Diffstat (limited to 'docker-compose.dev.yml')
-rw-r--r--docker-compose.dev.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml
new file mode 100644
index 0000000..c1e9581
--- /dev/null
+++ b/docker-compose.dev.yml
@@ -0,0 +1,24 @@
+# Dev-only overlay, applied on top of docker-compose.yml:
+#
+#   npm run dev   # podman-compose -f docker-compose.yml -f docker-compose.dev.yml up
+#
+# It intentionally avoids the `!override` YAML tag (a Docker Compose v2.24+
+# extension) so that it also works with podman-compose, which concatenates the
+# volume lists of both files and keeps the last entry per mount target.
+services:
+  db:
+    ports:
+      # expose the database on the host for local tooling
+      - 127.0.0.1:15432:5432/tcp
+
+  app:
+    volumes:
+      # live source checkout instead of the image copy
+      - .:/var/www/html/books
+      # re-declared so it wins over the base entry (last one per target wins)
+      - ${BOOKS_DIR}:/books:ro
+
+  web-nginx:
+    volumes:
+      - .:/var/www/html/books:ro
+      - ${BOOKS_DIR}:/books:ro