Skip to content

Commit

Permalink
fix devcontainer setup
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterjm authored and blakeblackshear committed May 4, 2021
1 parent 0f1bc40 commit 1c0162c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 24 deletions.
4 changes: 2 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"context": "..",
"dockerComposeFile": "../docker-compose.yml",
"service": "dev",
"workspaceFolder": "/workspace",
"workspaceFolder": "/opt/frigate",
"shutdownAction": "stopCompose",
"extensions": [
"ms-python.python",
Expand All @@ -26,4 +26,4 @@
"files.trimTrailingWhitespace": true,
"terminal.integrated.shell.linux": "/bin/bash"
}
}
}
31 changes: 10 additions & 21 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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'
- "1883:1883"
11 changes: 10 additions & 1 deletion docker/Dockerfile.core.dev → docker/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 1c0162c

Please sign in to comment.