2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-23 07:10:55 +00:00

support podman and selinux for dev setup ()

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
This commit is contained in:
Philipp Fruck
2023-02-19 20:21:17 +00:00
committed by GitHub
parent 2986f8d61a
commit 9964687cf3

@ -31,7 +31,7 @@ services:
- POSTGRES_DB=inventree - POSTGRES_DB=inventree
volumes: volumes:
# Map 'data' volume such that postgres database is stored externally # Map 'data' volume such that postgres database is stored externally
- ./data:/var/lib/postgresql/data - ./data:/var/lib/postgresql/data:z
restart: unless-stopped restart: unless-stopped
# InvenTree web server service # InvenTree web server service
@ -40,7 +40,7 @@ services:
container_name: inventree-dev-server container_name: inventree-dev-server
depends_on: depends_on:
- inventree-dev-db - inventree-dev-db
build: build: &build_config
context: . context: .
target: dev target: dev
# Cache the built image to be used by the inventree-dev-worker process # Cache the built image to be used by the inventree-dev-worker process
@ -50,7 +50,7 @@ services:
- 8000:8000 - 8000:8000
volumes: volumes:
# Mount local source directory to /home/inventree # Mount local source directory to /home/inventree
- ./:/home/inventree - ./:/home/inventree:z
env_file: env_file:
- docker.dev.env - docker.dev.env
restart: unless-stopped restart: unless-stopped
@ -59,12 +59,13 @@ services:
inventree-dev-worker: inventree-dev-worker:
container_name: inventree-dev-worker container_name: inventree-dev-worker
image: inventree-dev-image image: inventree-dev-image
build: *build_config
command: invoke worker command: invoke worker
depends_on: depends_on:
- inventree-dev-server - inventree-dev-server
volumes: volumes:
# Mount local source directory to /home/inventree # Mount local source directory to /home/inventree
- ./:/home/inventree - ./:/home/inventree:z
env_file: env_file:
- docker.dev.env - docker.dev.env
restart: unless-stopped restart: unless-stopped