Skip to content

Commit

Permalink
Merge pull request #21 from AirWalk-Digital/upgrade
Browse files Browse the repository at this point in the history
Upgrade
  • Loading branch information
rob-at-airwalk authored Jan 1, 2024
2 parents 1a1d5bf + c569598 commit 92c4930
Show file tree
Hide file tree
Showing 7 changed files with 325 additions and 76 deletions.
12 changes: 6 additions & 6 deletions .devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
"dockerFile": "Dockerfile.vscode",
"remoteUser": "vscode",
"mounts": [
"source=/home/ubuntu/vscode/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
],
"forwardPorts": [8080],
"source=/Users/robe/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached"
],
"forwardPorts": [6006],

"customizations": {
"codespaces": {
Expand All @@ -23,7 +23,7 @@
}
},
"postCreateCommand": "",
"postAttachCommand": {
"fix npm" : "rm -Rf /workspaces/airview-mdx/node_modules && ln -s /tmp/app/node_modules /workspaces/airview-mdx/node_modules"
"postAttachCommand": "yarn"
// "postAttachCommand": {
// "fix npm" : "rm -Rf /workspaces/airview-mdx/node_modules && ln -s /tmp/app/node_modules /workspaces/airview-mdx/node_modules"
}
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

37 changes: 20 additions & 17 deletions Dockerfile.vscode
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:18.14-alpine
FROM node:18.18-alpine
ARG DEBIAN_FRONTEND=noninteractive
ARG USERNAME=vscode
ARG USER_UID=1000
Expand All @@ -18,28 +18,31 @@ RUN apk add doas git; \
RUN git config --global url."[email protected]:".insteadOf "https://github.com/"
RUN git config --global url."[email protected]:".insteadOf "https://ssh.dev.azure.com/"

## fix npm file issues
RUN mkdir /tmp/npm \
&& mkdir /tmp/npm/lib \
&& mkdir /tmp/npm-cache \
&& mkdir /tmp/app \
&& npm config set prefix /tmp/npm \
&& npm config set cache /tmp/npm-cache \
&& chown -R $USERNAME /tmp/npm \
&& chown -R $USERNAME /tmp/app \
&& mkdir /workspaces && chown -R $USERNAME /workspaces
## fix M1 pupetteer issues
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD true
ENV PUPPETEER_EXECUTABLE_PATH /usr/bin/chromium

# [Optional] Set the default user. Omit if you want to keep the default as root.
USER $USERNAME

COPY . /tmp/app

RUN doas chown -R $USERNAME /tmp/npm
RUN doas chown -R $USERNAME /tmp/app
RUN npm config set prefix /tmp/npm
RUN yarn config set prefix /tmp/npm
# RUN yarn

# ## fix npm file issues
# RUN mkdir /tmp/npm \
# && mkdir /tmp/npm/lib \
# && mkdir /tmp/npm-cache \
# && mkdir /tmp/app \
# && npm config set prefix /tmp/npm \
# && npm config set cache /tmp/npm-cache \
# && chown -R $USERNAME /tmp/npm \
# && chown -R $USERNAME /tmp/app \
# && mkdir /workspaces && chown -R $USERNAME /workspaces

# COPY . /tmp/app

# RUN doas chown -R $USERNAME /tmp/npm
# RUN doas chown -R $USERNAME /tmp/app
# RUN npm config set prefix /tmp/npm
# RUN yarn config set prefix /tmp/npm
# RUN cd /tmp/app && yarn

Loading

0 comments on commit 92c4930

Please sign in to comment.