From 21b1d8922703b830dce5f517c86c62786955d005 Mon Sep 17 00:00:00 2001 From: Hannes Klinckaert Date: Thu, 10 Oct 2024 09:49:02 +0200 Subject: [PATCH] zess: make some fixes for faster backend compiles in dev --- docker-compose.yml | 82 ++++++++++++++++++++++++---------------------- 1 file changed, 43 insertions(+), 39 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 767294a..3caa0a1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,44 +1,48 @@ services: - zess-db: - image: postgres:alpine3.20 - environment: - - POSTGRES_PASSWORD=zess - - POSTGRES_USER=postgres - - POSTGRES_DB=zess - volumes: - - db-data:/var/lib/postgresql/data - ports: - - 5432:5432 - extra_hosts: - - "host.docker.internal:host-gateway" + zess-db: + image: postgres:alpine3.20 + environment: + - POSTGRES_PASSWORD=zess + - POSTGRES_USER=postgres + - POSTGRES_DB=zess + volumes: + - db-data:/var/lib/postgresql/data + ports: + - 5432:5432 + extra_hosts: + - "host.docker.internal:host-gateway" - zess-backend: - env_file: "vingo/.env" - build: - context: vingo - dockerfile: Dockerfile.dev - ports: - - 4000:4000 - volumes: - - ./vingo:/backend - extra_hosts: - - "host.docker.internal:host-gateway" - stop_grace_period: 1s - depends_on: - - zess-db + zess-backend: + env_file: "vingo/.env" + environment: + - CARGO_BUILD_TARGET_DIR=/target + build: + context: vingo + dockerfile: Dockerfile.dev + ports: + - 4000:4000 + volumes: + - ./vingo:/backend + - backend-compile:/target + extra_hosts: + - "host.docker.internal:host-gateway" + stop_grace_period: 1s + depends_on: + - zess-db - zess-frontend: - build: - context: vinvoor - dockerfile: Dockerfile.dev - user: ${CURRENT_UID} - ports: - - 5173:5173 - volumes: - - ./vinvoor:/frontend - extra_hosts: - - "host.docker.internal:host-gateway" + zess-frontend: + build: + context: vinvoor + dockerfile: Dockerfile.dev + user: ${CURRENT_UID} + ports: + - 5173:5173 + volumes: + - ./vinvoor:/frontend + extra_hosts: + - "host.docker.internal:host-gateway" volumes: - backend-packages: - db-data: + backend-compile: + backend-packages: + db-data: