evidence-dev / docker-devenv Goto Github PK
View Code? Open in Web Editor NEWThis repo builds a Docker image whose container instances can be used as a development environment for Evidence projects via a mounted directory
License: MIT License
This repo builds a Docker image whose container instances can be used as a development environment for Evidence projects via a mounted directory
License: MIT License
Both the Alpine and Ubuntu Evidence images use the root user, so the bind mounted workspace directory they create is owned by root and not able to be edited without root privileges in the host.
As a workaround, one can exec into a container shell prompt and do a recursive chown
granting ownership to a host user-id and group-id.
Reported by @jaxn in issue #5
#5 (comment)
Hey, I'm facing for a new issue.
I deployed evidence with docker compose, and everything seems ok, but when I'm going to settings to change database, when I choose postgres or else, I put my credentials, when I save them, I got a 403 forbidden error, and on log from chrome I have this:
POST https://my-domain.com/api/settings.json 403 (Forbidden)
But when I'm clickin on thus url i get this:
{
"settings": {
"database": "duckdb",
"credentials": {
"filename": "needful_things.duckdb",
"gitignoreDuckdb": null
}
},
"gitIgnore": ".evidence/template\n.svelte-kit\nbuild\nnode_modules\n.DS_Store\n.vscode/settings.json\n"
}
here is my docker-compose file:
version: "3.3"
services:
evidence:
image: evidencedev/devenv:ubuntu
command: "--init"
restart: always
environment:
EVIDENCE_DATABASE: evidence
EVIDENCE_POSTGRES_USER: postgres
EVIDENCE_POSTGRES_HOST: postgres
EVIDENCE_POSTGRES_DATABASE: evidence
EVIDENCE_POSTGRES_PASSWORD: ${ADMIN_PASSWORD}
EVIDENCE_POSTGRES_PORT: 5432
volumes:
- "./my-project:/evidence-workspace"
ports:
- "172.17.0.1:55558:3000"
postgres:
image: "elestio/postgres:15"
container_name: postgres
restart: always
environment:
- "POSTGRES_DB=evidence"
- "POSTGRES_PASSWORD=${AP_POSTGRES_PASSWORD}"
- "POSTGRES_USER=postgres"
- "POSTGRES_HOST_AUTH_METHOD=trust"
volumes:
- "./postgres_data:/var/lib/postgresql/data"
ports:
- 172.17.0.1:42962:5432
pgadmin4:
image: dpage/pgadmin4:latest
restart: always
environment:
PGADMIN_DEFAULT_EMAIL: ${ADMIN_EMAIL}
PGADMIN_DEFAULT_PASSWORD: ${ADMIN_PASSWORD}
PGADMIN_LISTEN_PORT: 8080
ports:
- "172.17.0.1:17371:8080"
volumes:
- ./servers.json:/pgadmin4/servers.json
Thx a lot for your work and for your responses 😊
Docker devenv cannot startup: Error: spawn xdg-open ENOENT
with the latest vite version
hi,
I started the container, but it fails serving the pages
Any idea what is going wrong and/or how to solve this?
here the output:
[email protected] dev
evidence dev --open / --host 0.0.0.0
npm info using [email protected]
npm info using [email protected]
VITE v4.3.9 ready in 15348 ms
➜ Local: http://localhost:3000/
➜ Network: http://10.0.2.100:3000/
➜ press h to show help
node:events:491
throw er; // Unhandled 'error' event
^
Error: spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe ENOENT
at ChildProcess._handle.onexit (node:internal/child_process:283:19)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Emitted 'error' event on ChildProcess instance at:
at ChildProcess._handle.onexit (node:internal/child_process:289:12)
at onErrorNT (node:internal/child_process:476:16)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
errno: -2,
code: 'ENOENT',
syscall: 'spawn /mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe',
path: '/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe',
spawnargs: [
'-NoProfile',
'-NonInteractive',
'–ExecutionPolicy',
'Bypass',
'-EncodedCommand',
'UwB0AGEAcgB0ACAAIgBoAHQAdABwADoALwAvAGwAbwBjAGEAbABoAG8AcwB0ADoAMwAwADAAMAAvACIA'
]
}
npm http fetch GET 200 https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz 14771ms (cache miss)
npm http fetch GET 200 https://registry.npmjs.org/@azure/msal-common/-/msal-common-13.3.1.tgz 14963ms (cache miss)
npm info run [email protected] install node_modules/duckdb node-pre-gyp install --fallback-to-build
npm info run [email protected] install node_modules/lz4 node-gyp rebuild
npm info run [email protected] install node_modules/sqlite3 node-pre-gyp install --fallback-to-build
npm info run [email protected] install node_modules/duckdb-async/node_modules/duckdb node-pre-gyp install --fallback-to-build
npm info run [email protected] install { code: 1, signal: null }
npm info run [email protected] install { code: 0, signal: null }
npm ERR! code 1
npm ERR! path /evidence-workspace/node_modules/lz4
npm ERR! command failed
npm ERR! command sh -c node-gyp rebuild
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | linux | x64
npm ERR! gyp info find Python using Python version 3.10.12 found at "/usr/bin/python3"
npm ERR! gyp http GET https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.16.0/node-v18.16.0-headers.tar.gz
npm ERR! gyp http GET https://nodejs.org/download/release/v18.16.0/SHASUMS256.txt
npm ERR! gyp http 200 https://nodejs.org/download/release/v18.16.0/SHASUMS256.txt
npm ERR! gyp info spawn /usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/evidence-workspace/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/evidence-workspace/node_modules/lz4/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/evidence-workspace/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/root/.cache/node-gyp/18.16.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/root/.cache/node-gyp/18.16.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/evidence-workspace/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/root/.cache/node-gyp/18.16.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/evidence-workspace/node_modules/lz4',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: not found: make
npm ERR! gyp ERR! stack at getNotFoundError (/evidence-workspace/node_modules/which/which.js:10:17)
npm ERR! gyp ERR! stack at /evidence-workspace/node_modules/which/which.js:57:18
npm ERR! gyp ERR! stack at new Promise (<anonymous>)
npm ERR! gyp ERR! stack at step (/evidence-workspace/node_modules/which/which.js:54:21)
npm ERR! gyp ERR! stack at /evidence-workspace/node_modules/which/which.js:71:22
npm ERR! gyp ERR! stack at new Promise (<anonymous>)
npm ERR! gyp ERR! stack at subStep (/evidence-workspace/node_modules/which/which.js:69:33)
npm ERR! gyp ERR! stack at /evidence-workspace/node_modules/which/which.js:80:22
npm ERR! gyp ERR! stack at /evidence-workspace/node_modules/isexe/index.js:42:5
npm ERR! gyp ERR! stack at /evidence-workspace/node_modules/isexe/mode.js:8:5
npm ERR! gyp ERR! System Linux 5.15.0-92-generic
npm ERR! gyp ERR! command "/usr/local/bin/node" "/evidence-workspace/node_modules/.bin/node-gyp" "rebuild"
npm ERR! gyp ERR! cwd /evidence-workspace/node_modules/lz4
npm ERR! gyp ERR! node -v v18.16.0
npm ERR! gyp ERR! node-gyp -v v9.4.1
npm ERR! gyp ERR! not ok
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-04-03T05_34_03_623Z-debug-0.log
Is there any solution for this
Hi, I tried pulling / running the docker image with the --init flag as described in the README...
cd <path-to-your-evidence-project-root>
docker run -v=$(pwd):/evidence-workspace -p=3000:3000 -it --rm evidencedev/devenv:latest --init
... though it gives me the below npm error:
Starting Evidence.dev development environment mounted on /evidence-workspace in the container.
Provided arguments => --init
Starting with a blank template project.
npm info using [email protected]
npm info using [email protected]
! destination directory is not empty, aborting. Use --force to override
Running command => npm run dev -- --host 0.0.0.0
npm info using [email protected]
npm info using [email protected]
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /evidence-workspace/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/evidence-workspace/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2024-04-17T08_08_41_677Z-debug-0.log
Official evidence-dev image does not work with default project template.
Steps to reproduce:
--init
a new projectError loading shared library ld-linux-x86-64.so.2: No such file or directory (needed by /evidence-workspace/node_modules/duckdb/lib/binding/duckdb.node)
Reproduced in multiple environments, most recently Docker Compose running on Debian Buster.
Adding libc6-compat to the image didn't help.
When running evidencedev/devenv on a Mac, the following warning is displayed:
WARNING: The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
Hello!
My name is Miguel, i am making a thesis about code-based BI and im trying different tools. Even if i can install evidence in local, i need to have it on docker for comparisons.
I am not experienced with docker so i dont know why i am getting this troubles on installation.
Any help is appreciated.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.