From 9964687cf33800294de8420dbfe482e267bc1a48 Mon Sep 17 00:00:00 2001 From: Philipp Fruck Date: Sun, 19 Feb 2023 20:21:17 +0000 Subject: [PATCH] support podman and selinux for dev setup (#4354) SELinux labels are required in order to mount the volumes into the dev containers. The build config has been added to the dev-worker to prevent podman from trying to pull from docker hub --- docker-compose.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index f9bc6f98b5..2a034fe7f0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -31,7 +31,7 @@ services: - POSTGRES_DB=inventree volumes: # Map 'data' volume such that postgres database is stored externally - - ./data:/var/lib/postgresql/data + - ./data:/var/lib/postgresql/data:z restart: unless-stopped # InvenTree web server service @@ -40,7 +40,7 @@ services: container_name: inventree-dev-server depends_on: - inventree-dev-db - build: + build: &build_config context: . target: dev # Cache the built image to be used by the inventree-dev-worker process @@ -50,7 +50,7 @@ services: - 8000:8000 volumes: # Mount local source directory to /home/inventree - - ./:/home/inventree + - ./:/home/inventree:z env_file: - docker.dev.env restart: unless-stopped @@ -59,12 +59,13 @@ services: inventree-dev-worker: container_name: inventree-dev-worker image: inventree-dev-image + build: *build_config command: invoke worker depends_on: - inventree-dev-server volumes: # Mount local source directory to /home/inventree - - ./:/home/inventree + - ./:/home/inventree:z env_file: - docker.dev.env restart: unless-stopped