services: dev: container_name: nestjs_api_dev image: nestjs-api-dev:1.0.0 build: context: ./server dockerfile: Dockerfile ports: - 3000:3000 - 9229:9229 volumes: - ./server:/usr/src/app - run_vol:/var/run - cache_vol:/var/cache - tmp_vol:/tmp networks: - Mustafa restart: always env_file: - ./server/.env command: > sh -c "npm install && npm run start:dev" depends_on: - dev-db dev-db: image: postgres:latest environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: 123 POSTGRES_DB: nest ports: - 5434:5432 networks: - Mustafa networks: Mustafa: volumes: run_vol: driver_opts: type: tmpfs device: tmpfs cache_vol: driver_opts: type: tmpfs device: tmpfs tmp_vol: driver_opts: type: tmpfs device: tmpfs