Skip to content

Commit

Permalink
Don;t ignore devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
acockburn committed Jan 25, 2025
2 parents 2dbfe11 + ea70def commit c26f4ac
Show file tree
Hide file tree
Showing 4 changed files with 77 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
ARG PYTHON_RELEASE=3.12
ARG BASE_IMAGE=mcr.microsoft.com/devcontainers/python:${PYTHON_RELEASE}
# Runtime image
FROM ${BASE_IMAGE}

# Copy Repo across
COPY . /usr/src/appdaemon/

# Install AD Dependencies
RUN pip install -r /usr/src/appdaemon/requirements.txt

# Add dev dependencies
RUN pip install -r /usr/src/appdaemon/dev-requirements.txt

# Add doc dependencies
RUN pip install -r /usr/src/appdaemon/doc-requirements.txt

# Install AppDaemon itself to keep VSCODE happy

RUN pip install /usr/src/appdaemon
56 changes: 56 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-dockerfile
{
"name": "appdaemon-dev",
"build": {
// Sets the run context to one level up instead of the .devcontainer folder.
"context": "..",
// Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename.
"dockerfile": "Dockerfile",
"args": {
"PYTHON_RELEASE": "3.13" // This overrides the default of 3.12
}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
//"forwardPorts": ["4949:4949"],
"appPort": [ "4949:4949" ],
// Uncomment the next line to run commands after the container is created.
// "postCreateCommand": "cat /etc/os-release",

// Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "devcontainer"

"mounts": [
"source=${localEnv:HOME}${localEnv:USERPROFILE}/production/,target=/conf,type=bind,consistency=cached"
],

// Configure tool-specific properties.
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"njpwerner.autodocstring",
//"ms-python.black-formatter",
//"ms-python.isort",
"shd101wyy.markdown-preview-enhanced",
//"ms-python.pylint",
"DavidAnson.vscode-markdownlint",
"ms-python.debugpy",
"njqdev.vscode-python-typehint",
"charliermarsh.ruff",
"ms-python.vscode-pylance",
"lkytal.quicktask",
"ms-azuretools.vscode-docker",
"github.vscode-github-actions",
"eamodio.gitlens",
"Gruntfuggly.todo-tree",
"tamasfe.even-better-toml"
]

}
}
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ uv.lock
# IDE

.vscode
.devcontainer

# Docs

Expand Down
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"request": "launch",
"module": "appdaemon",
"justMyCode": true,
"args": "-c /conf/ad_config/production
"args": "-c /conf/ad_config/production"
},
]
}

0 comments on commit c26f4ac

Please sign in to comment.