SolidOS / solidos

The operating system for Solid
https://solidos.solidcommunity.net/
MIT License
127 stars 19 forks source link

Set up SolidOS to work on CSS on local development #149

Closed timea-solid closed 1 year ago

timea-solid commented 2 years ago

In the process of switching NSS to CSS on solidcommunity.net I propose that we move our local development practices also to CSS. Basically when I clone SolidOS and I run npm run setup I would want to have CSS running and not NSS (if possible).

ewingson commented 2 years ago

cause I'm running CSS in a production environment and not local I am not really helpful in this topic. a) maybe the switch is an opportunity for me to contribute useful code. b) I really hope solidweb.me is hardened and stealthed enough.

jeff-zucker commented 2 years ago

Data-Kitchen is an instance of CSS local running SolidOS. I have not updated to most recent versions of of CSS or mashlib and I need to revise the package.json to download them automatically. But currently npm install + nmp run start give you a functioning CSS running SolidOS on a local server.

jeff-zucker commented 2 years ago

A slight modification of the SolidOS build process could put Data-Kitchen into the build process so that instead of NSS at the end it would install CSS.

jeff-zucker commented 2 years ago

See this diagram

timea-solid commented 2 years ago

@ewingson did first try to deploy SolidOS on a CSS server on https://solidweb.me. We see some problems which we will make gitIssues for. (discussion on how to do was done on gitter here)

To locally test: build mashlib and start the static mashlib (there is a npm script for it) and navigate to a CSS user with it.

ewingson commented 2 years ago

I have 4.0.0 running and will share every issue and every aspect I can focus on to help to upgrade solidcommunity.net . recipe working.

angelo-v commented 2 years ago

This is the docker-compose file I am using for locally running CSS with mashlib:

version: '3.7'
services:
  server:
    image: solidproject/community-server:4
    pull_policy: always
    restart: unless-stopped

    ports:
      - "3000:3000"

    volumes:
      - ./data:/opt/solid/data
      - ./config:/opt/solid/config
      - /path/to/local/mashlib:/opt/solid/mashlib

    command: ["--port", "3000" ,"-c" ,"/opt/solid/config/mashlib.json", "--rootFilePath", "/opt/solid/data" ]

config/mashlib.json is from the CSS recipe but you have to adjust the mashlib pathes for docker from ./node_modules/mashlib to /opt/solid/mashlib/

timea-solid commented 2 years ago

According to: https://github.com/SolidOS/solidos/issues/66#issuecomment-1111288442 CSS is ready to be set up with mashlib.

ewingson commented 2 years ago

yep, mashlib is working with CSS on https://solidweb.me .

can I give this issue some tender loving care ?

but I would need some detailed instructions, howto... guidance.

@timea-solid @jeff-zucker

timea-solid commented 2 years ago

I am looking for something which does not need a container (docker). Something more like how we have it now: you clone solidOS and NSS is out of the box started for you with the 'npm start'. It would be cool if upon start one can select which server to be spinned up, NSS or CSS. I do not have an idea how to achieve this in our code yet.

ewingson commented 2 years ago

dunno how to achieve this. I did not use docker. NSS and CSS seem to have been developed independently. for completeness I'll leave two docs. both servers run on the same dedicated machine.

NSS : https://gist.github.com/ewingson/c6e97a996aa51eac9f7fd1b7eaf14dc4

CSS : https://gist.github.com/ewingson/dbfee4d329c803aed0b0bd87e7a2fa00

[edit] the latter is not 100% actual because of the mashlib recipe running now.

bourgeoa commented 2 years ago

@timea-solid One way to do that could be to start a simple CSS instance http://localhost:3000 + a NSS one https://localhost:8443 and use mashlib app https:localhost:8443/browse.html. This should cover 99.9% of all functions.

This may be done with something like that in solidos/package.json : (inspiration from https://github/solidcryptpad/solidcryptpad/package.json)

bourgeoa commented 2 years ago

Finally I think a better way is to create a new repo in https://github.com/SolidOS/css-solidos or any equivalent. The repo will contain :

We could then integrate the repo in SolidOS setup:

@timea-solid I can prepare the repo test its workability and then integrate to SolidOS setup

timea-solid commented 2 years ago

@bourgeoa I like where your suggestions are going! Is we have a css subdirectory in solidOS like nss is what I was thinking but was not sure if it would work. But if you say it would work it would be really cool! Can you try it out locally? I want to know if this setup influences the build time of solidOS project.

bourgeoa commented 2 years ago

@timea-solid I have :

I shall try to update the README.md's as soon as possible. And think I will also lock CSS to only one account Please try and report issues.

For CSS the easiest is to chose choose : sign me up for an account Choosing root or subdomain you can test the impact on mashlib of the different installations (suffix or subdomain)

image

bourgeoa commented 1 year ago

Done with https://github.com/SolidOS/solidos/commit/4bfea9b819a1c584d6da4e5d55710c7a15cac51d and a few updates