diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 48c4efd2d..feda38749 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -3,7 +3,7 @@ "context": "..", "dockerComposeFile": "../docker-compose.yml", "service": "dev", - "workspaceFolder": "/workspace", + "workspaceFolder": "/opt/frigate", "shutdownAction": "stopCompose", "extensions": [ "ms-python.python", @@ -26,4 +26,4 @@ "files.trimTrailingWhitespace": true, "terminal.integrated.shell.linux": "/bin/bash" } -} \ No newline at end of file +} diff --git a/docker-compose.yml b/docker-compose.yml index e4a29795b..0bf3747b7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,37 +1,26 @@ -version: '3' +version: "3" services: dev: - container_name: core-dev + container_name: frigate-dev user: vscode build: context: . - dockerfile: docker/Dockerfile.core.dev - volumes: - - /etc/localtime:/etc/localtime:ro - - .:/workspace:cached - command: /bin/sh -c "while sleep 1000; do :; done" - frigate: - container_name: frigate - privileged: true - build: - context: . - dockerfile: docker/Dockerfile.amd64 - # dockerfile: docker/Dockerfile.core.dev + dockerfile: docker/Dockerfile.dev devices: - /dev/bus/usb:/dev/bus/usb - /dev/dri:/dev/dri # for intel hwaccel, needs to be updated for your hardware volumes: - /etc/localtime:/etc/localtime:ro + - .:/opt/frigate:cached - ./config/config.yml:/config/config.yml:ro - ./debug:/media/frigate - - ./frigate:/opt/frigate/frigate:cached - - ./migrations:/opt/frigate/migrations:cached ports: - - '5000:5000' - - '1935:1935' - command: /bin/sh -c "service nginx start; while sleep 1000; do :; done" + - "5000:5000" + - "5001:5001" + - "8080:8080" + command: /bin/sh -c "sudo service nginx start; while sleep 1000; do :; done" mqtt: container_name: mqtt - image: eclipse-mosquitto + image: eclipse-mosquitto:1.6 ports: - - '1883:1883' \ No newline at end of file + - "1883:1883" diff --git a/docker/Dockerfile.core.dev b/docker/Dockerfile.dev similarity index 60% rename from docker/Dockerfile.core.dev rename to docker/Dockerfile.dev index 018c32e84..49e74b7fc 100644 --- a/docker/Dockerfile.core.dev +++ b/docker/Dockerfile.dev @@ -14,6 +14,15 @@ RUN groupadd --gid $USER_GID $USERNAME \ && echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ && chmod 0440 /etc/sudoers.d/$USERNAME -RUN apt-get install -y git +RUN apt-get install -y git curl vim RUN pip3 install pylint black + +# Install Node 14 +RUN curl -sL https://deb.nodesource.com/setup_14.x | bash - \ + && apt-get install -y nodejs + +# Install MQTT CLI +RUN wget -q https://github.com/hivemq/mqtt-cli/releases/download/v4.6.0/mqtt-cli-4.6.0.deb \ + && apt-get install -y ./mqtt-cli-4.6.0.deb \ + && rm mqtt-cli-4.6.0.deb \ No newline at end of file