version: "3.7" services: init: # create all the necessary mount directory so we can create volumes image: busybox container_name: init command: /bin/sh -c " echo ${DEV_ROOT}; mkdir -p ${DEV_ROOT}/workspace; mkdir -p ${DEV_ROOT}/data; mkdir -p ${DEV_ROOT}/db; echo ${LOCAL_ROOT}; mkdir -p ${LOCAL_ROOT}; " environment: - DEV_ROOT=${DEV_ROOT} - LOCAL_ROOT=${LOCAL_ROOT} volumes: - ${DEV_ROOT}/..:/tmp - ${LOCAL_ROOT}/..:/tmp seed: db: ports: - 5432:5432 scheduler: server: webapp: # Allow us to access the volume content on the local filesystem volumes: local: name: dev-local driver: local driver_opts: o: bind type: none device: ${LOCAL_ROOT} workspace: name: dev-workspace driver: local driver_opts: o: bind type: none device: ${DEV_ROOT}/workspace data: name: dev-data driver: local driver_opts: o: bind type: none device: ${DEV_ROOT}/data db: name: dev-db driver: local driver_opts: o: bind type: none device: ${DEV_ROOT}/db