diff --git a/.copier-answers.yml b/.copier-answers.yml index a39e55844..bbf36b452 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -1,5 +1,5 @@ # Changes here will be overwritten by Copier -_commit: v0.0.95 +_commit: v0.0.96 _src_path: gh:LabAutomationAndScreening/copier-base-template.git description: A web app that is hosted within a local intranet. Nuxt frontend, python backend, docker-compose diff --git a/template/.devcontainer/Dockerfile b/template/.devcontainer/Dockerfile index 70842f4af..7812d7ec1 100644 --- a/template/.devcontainer/Dockerfile +++ b/template/.devcontainer/Dockerfile @@ -13,13 +13,18 @@ RUN apt-get update -y && apt-get install -y \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* -# Create the venv folder and set permissions for anyone to modify---this is necessary to be able to break out the venv folder as a separate docker volume for better performance on Windows hosts +# Create the workspace folders that have docker volume (see docker-compose.yaml) and set permissions for anyone to modify +# this is necessary to be able to break out these folders as a separate docker volume for better performance on Windows hosts ARG REPO_NAME=copier-base-template -ENV VENV_PATH=/workspaces/${REPO_NAME}/.venv +ENV VENV_PATH=/workspaces/${REPO_NAME}/backend/.venv +ENV PNPM_STORE=/workspaces/${REPO_NAME}/.pnpm-store +ENV FRONTEND_NODE_MODULES=/workspaces/${REPO_NAME}/frontend/node_modules RUN mkdir -p /workspaces && \ mkdir -p ${VENV_PATH} && \ - chmod -R 777 /workspaces ${VENV_PATH} && \ - chgrp -R 0 /workspaces ${VENV_PATH} + mkdir -p ${PNPM_STORE} && \ + mkdir -p ${FRONTEND_NODE_MODULES} && \ + chmod -R 777 /workspaces ${VENV_PATH} ${PNPM_STORE} ${FRONTEND_NODE_MODULES} && \ + chgrp -R 0 /workspaces ${VENV_PATH} ${PNPM_STORE} ${FRONTEND_NODE_MODULES} # SSH EXPOSE 2222 diff --git a/template/.devcontainer/devcontainer.json.jinja b/template/.devcontainer/devcontainer.json.jinja index 8c765d18c..d2b2a7815 100644 --- a/template/.devcontainer/devcontainer.json.jinja +++ b/template/.devcontainer/devcontainer.json.jinja @@ -3,6 +3,12 @@ "service": "devcontainer", "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}", "features": {{% endraw %}{% if is_child_of_copier_base_template is not defined %}{% raw %} + "ghcr.io/devcontainers/features/git-lfs:1.2.5": { + // we are not using git-lfs right now, but its a transitive dep elsewhere. We want to configure auto pull to off since the feature will by default also try to install the git hook + // and it breaks creation of the devcontainer since pre-commit hooks are already in place. Probably a better way to fix this but until we use git-lfs we can leave it like this. + // https://github.com/devcontainers/features/blob/main/src/git-lfs/README.md + "autoPull": false + }, "ghcr.io/devcontainers/features/aws-cli:1.1.2": { // https://github.com/devcontainers/features/blob/main/src/aws-cli/devcontainer-feature.json // view latest version https://raw.githubusercontent.com/aws/aws-cli/v2/CHANGELOG.rst