Open Peltoche opened 1 year ago
Thanks for creating the issue.
@nono, since it seems related to cozy-app-dev, do you have any idea?
@Peltoche internally we don't use the cozy-app-dev image, we rely on a manual installation https://docs.cozy.io/en/cozy-stack/INSTALL/ . We need to reflect that in our external documentation.
I did tried this too but I didn't find a way to run the local code and make it available into the instance
https://docs.cozy.io/en/cozy-stack/cli/cozy-stack_serve/
cozy-stack serve --appdir drive:/path/to/drive/build/drive
Like that, the slug drive
will be served to the instances from the build/drive
directory
Hi,
the cozy-app-dev
docker image has a CouchDB. You don't need to have CouchDB installed before running it. And, in fact, it was not tested to use an external CouchDB.
Still have issues...
cozy-drive
:yarn watch:drive:browser
(I have exported the env variable NODE_OPTIONS=--openssl-legacy-provider
for fixing #2902)
cozy-stack
:cozy-stack serve --dev --config $HOME/.config/cozy/config.yaml --mailhog --fs-url=file://localhost${PWD}/storage --konnectors-cmd ${PWD}/scripts/konnector-node-run.sh --appdir drive2:$HOME/Cozy/cozy-drive/build/drive
If I don't add the --dev
option it don't find the admin-passphrase
file even if it's created and valid.
When a reach http://drive2.cozy.localhost:8080/
I have a blank page. I found out that the url *.cozy.localhost
was not resolved so I added 127.0.0.1 cozy.localhost
inside /etc/hosts
and it seems to solve the issue
When a reload the page I still have an blank page with the following issue:
Content Security Policy: The page’s settings blocked the loading of a resource at inline (“script-src”).
Uncaught EvalError: call to eval() blocked by CSP
add --disable-csp
to cozy-stack serve
when working with watch / start
command
the cozy-app-dev docker image has a CouchDB. You don't need to have CouchDB installed before running it. And, in fact, it was not tested to use an external CouchDB.
I tried without an external couchdb but it blocks at waiting for couchdb...
. I have tried with and without --net=host
and with and without the 127.0.0.1 cozy.localhost
inside /etc/hosts
add --disable-csp to cozy-stack serve when working with watch / start command
Curiously even with the --disable-csp
flag I still have the same error.
My logs:
cozy-stack serve --dev --disable-csp --config $HOME/.config/cozy/config.yaml --mailhog --fs-url=file://localhost${PWD}/storage --konnectors-cmd ${PWD}/scripts/konnector-node-run.sh --appdir drive:$HOME/Cozy/cozy-drive/build/drive
!! DEVELOPMENT RELEASE !!
You are running a development release which may deactivate some very important
security features. Please do not use this binary as your production server.
INFO[0000] Started in-memory broker for 21 workers type nspace=jobs
Ready and waiting for connections:
http server major started on "localhost:8080"
http server admin started on "localhost:6060"
time=2023-04-18T14:36:58+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/ bytes_out=1653
time=2023-04-18T14:36:58+02:00 status=200 method=GET host=cozy.localhost:8080 uri=/assets/styles/theme.faa4e12bdc.css bytes_out=34
time=2023-04-18T14:36:58+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/app/drive.js bytes_out=7196552
time=2023-04-18T14:36:59+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/vendors/drive.js bytes_out=51638673
time=2023-04-18T14:36:59+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/apple-touch-icon.png bytes_out=464
time=2023-04-18T14:36:59+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/favicon-16x16.png bytes_out=297
time=2023-04-18T14:37:03+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/ bytes_out=1653
time=2023-04-18T14:37:03+02:00 status=200 method=GET host=cozy.localhost:8080 uri=/assets/styles/theme.faa4e12bdc.css bytes_out=34
time=2023-04-18T14:37:04+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/app/drive.js bytes_out=7196552
time=2023-04-18T14:37:04+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/vendors/drive.js bytes_out=51638673
time=2023-04-18T14:37:05+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/apple-touch-icon.png bytes_out=464
time=2023-04-18T14:37:05+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/favicon-16x16.png bytes_out=297
time=2023-04-18T14:45:59+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/ bytes_out=1653
time=2023-04-18T14:45:59+02:00 status=200 method=GET host=cozy.localhost:8080 uri=/assets/styles/theme.faa4e12bdc.css bytes_out=34
time=2023-04-18T14:45:59+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/app/drive.js bytes_out=7196552
time=2023-04-18T14:46:00+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/vendors/drive.js bytes_out=51638673
time=2023-04-18T14:46:00+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/apple-touch-icon.png bytes_out=464
time=2023-04-18T14:46:00+02:00 status=200 method=GET host=drive.cozy.localhost:8080 uri=/favicon-16x16.png bytes_out=297
Hi :wave:
I have some difficulties to setup my dev environment. I have installed couchdb locally and it run well:
Now I try unsuccessfully to start the docker image
cozy-app-dev
as it's described in the documenttion. I just added theCOUCHDB_URL
config because I'm running a couchdb V3 so I don't have the party mode enabled and I can't find any other way to setup the user/password for couchdb.the output gives me:
As you can see in one of the call above my couchdb version is "3.2.2" so it should be ok but it still fail.
I have found the error location: https://github.com/cozy/cozy-stack/blob/master/scripts/cozy-app-dev.sh#L140 but I don't see what could fails. All I know is that if I enter an invalid user/password it give the same output but I'm pretty sure of my credentials as I'm connected with it and I tried directly with the curl.