Skip to content

Commit

Permalink
fix sandbox
Browse files Browse the repository at this point in the history
  • Loading branch information
franzbischoff committed Dec 23, 2023
1 parent 12ae321 commit f2fdd55
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 52 deletions.
58 changes: 7 additions & 51 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,9 @@
"image": "mcr.microsoft.com/devcontainers/javascript-node:1-18-bookworm",
// Features to add to the dev container. More info: https://containers.dev/features.
"features": {
// "ghcr.io/devcontainers/features/python:1": {
// "installTools": true,
// "version": "3.11" // PEP 664 - https://www.python.org/dev/peps/pep-0664/
// },
"ghcr.io/devcontainers-contrib/features/tailscale:1": {},
"ghcr.io/dhoeric/features/hadolint:1": {
"version": "latest"
},
// "ghcr.io/devcontainers-contrib/features/pandoc:1": {
// "version": "3.1.3"
// },
"ghcr.io/devcontainers/features/terraform:1": {},
"ghcr.io/rocker-org/devcontainer-features/apt-packages:1": {
// Dependencies copied from ../docker/Dockerfile // something is needed to make web collector to work
Expand Down Expand Up @@ -78,10 +70,8 @@
"build-essential",
"ffmpeg"
]
},
"capAdd": "SYS_ADMIN"
}
},
// "onCreateCommand": "cd collector && virtualenv v-env",
"updateContentCommand": "yarn setup && yarn setup:envs && yarn prisma:setup",
// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "if [ \"${CODESPACES}\" = \"true\" ]; then echo 'VITE_API_BASE=\"https://$CODESPACE_NAME-3001.$GITHUB_CODESPACES_PORT_FORWARDING_DOMAIN/api\"' > ./frontend/.env; fi",
Expand All @@ -95,24 +85,22 @@
"onAutoForward": "openPreview"
}
},
"capAdd": [
"SYS_ADMIN" // needed for puppeteer using headless chrome in sandbox
],
"remoteEnv": {
"NODE_ENV": "development",
"ESLINT_USE_FLAT_CONFIG": "true"
},
// "initializeCommand": "echo Initialize....",
"shutdownAction": "stopContainer",
// Configure tool-specific properties.
"customizations": {
"codespaces": {
"openFiles": [
"README.md",
".devcontainer/README.md"
]
"openFiles": ["README.md", ".devcontainer/README.md"]
},
"vscode": {
"openFiles": [
"README.md",
".devcontainer/README.md"
],
"openFiles": ["README.md", ".devcontainer/README.md"],
"extensions": [
"bierner.github-markdown-preview",
"bradlc.vscode-tailwindcss",
Expand All @@ -125,15 +113,10 @@
"hashicorp.terraform",
"mariusschulz.yarn-lock-syntax",
"ms-azuretools.vscode-docker",
// "ms-python.python",
"streetsidesoftware.code-spell-checker",
"actboy168.tasks",
"tombonnike.vscode-status-bar-format-toggle",
"ms-vscode.js-debug"
// "ms-python.vscode-pylance",
// "ms-python.black-formatter",
// "ms-python.debugpy",
// "ms-python.pylint"
],
"settings": {
"[css]": {
Expand Down Expand Up @@ -169,33 +152,6 @@
"[toml]": {
"editor.defaultFormatter": "tamasfe.even-better-toml"
},
// "[python]": {
// "editor.defaultFormatter": "ms-python.black-formatter"
// },
// "black-formatter.args": [
// "--config",
// "${workspaceFolder}/collector/pyproject.toml"
// ],
// "python.envFile": "${workspaceFolder}/collector/.env",
// "python.defaultInterpreterPath": "${workspaceFolder}/collector/v-env/bin/python",
// "python.languageServer": "Pylance",
// "python.missingPackage.severity": "Hint",
// "python.createEnvironment.trigger": "prompt",
// "python.createEnvironment.contentButton": "show",
// "python.analysis.diagnosticMode": "openFilesOnly",
// "python.analysis.enablePytestExtra": false,
// "python.analysis.enableSyncServer": false,
// "python.analysis.inlayHints.functionReturnTypes": true,
// "python.analysis.inlayHints.variableTypes": true,
// "python.analysis.typeCheckingMode": "basic",
// "python.analysis.useLibraryCodeForTypes": true,
// "python.analysis.autoFormatStrings": true,
// "python.analysis.inlayHints.callArgumentNames": "partial",
// "pylint.args": [
// "--rcfile",
// "${workspaceFolder}/collector/.pylintrc"
// ],
// "pylint.importStrategy": "useBundled",
"eslint.debug": true,
"eslint.enable": true,
"eslint.experimental.useFlatConfig": true,
Expand Down
1 change: 0 additions & 1 deletion collector/processLink/convert/generic.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ async function getPageContent(link) {
const loader = new PuppeteerWebBaseLoader(link, {
launchOptions: {
headless: "new",
// args: ["--disable-sandbox", "--disable-setuid-sandbox"],
},
gotoOptions: {
waitUntil: "domcontentloaded",
Expand Down

0 comments on commit f2fdd55

Please sign in to comment.