Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Without docker #1062

Open
CarlSinclair opened this issue Aug 10, 2024 · 3 comments
Open

Without docker #1062

CarlSinclair opened this issue Aug 10, 2024 · 3 comments

Comments

@CarlSinclair
Copy link

I've been trying to get it working without docker, using sqlite, and systemd instead of supervisor. Running yarn start from the root directory finishes but silently fails at the end.

[@standardnotes/common]: Process started
[@standardnotes/common]: Process exited (exit code 0), completed in 2s 363ms

[@standardnotes/domain-core]: Process started
[@standardnotes/domain-core]: Process exited (exit code 0), completed in 2s 179ms

[@standardnotes/grpc]: Process started
[@standardnotes/grpc]: Process exited (exit code 0), completed in 3s 260ms

[@standardnotes/predicates]: Process started
[@standardnotes/predicates]: Process exited (exit code 0), completed in 1s 855ms

[@standardnotes/security]: Process started
[@standardnotes/security]: Process exited (exit code 0), completed in 1s 786ms

[@standardnotes/domain-events]: Process started
[@standardnotes/domain-events]: Process exited (exit code 0), completed in 2s 365ms

[@standardnotes/domain-events-infra]: Process started
[@standardnotes/domain-events-infra]: Process exited (exit code 0), completed in 2s 537ms

[@standardnotes/settings]: Process started
[@standardnotes/settings]: Process exited (exit code 0), completed in 1s 889ms

[@standardnotes/sncrypto-node]: Process started
[@standardnotes/sncrypto-node]: Process exited (exit code 0), completed in 2s 51ms

[@standardnotes/time]: Process started
[@standardnotes/time]: Process exited (exit code 0), completed in 1s 526ms

[@standardnotes/analytics]: Process started
[@standardnotes/analytics]: Process exited (exit code 0), completed in 2s 39ms

[@standardnotes/api-gateway]: Process started
[@standardnotes/api-gateway]: Process exited (exit code 0), completed in 1s 723ms

[@standardnotes/auth-server]: Process started
[@standardnotes/auth-server]: Process exited (exit code 0), completed in 1s 833ms

[@standardnotes/files-server]: Process started
[@standardnotes/files-server]: Process exited (exit code 0), completed in 1s 590ms

[@standardnotes/revisions-server]: Process started
[@standardnotes/revisions-server]: Process exited (exit code 0), completed in 1s 557ms

[@standardnotes/scheduler-server]: Process started
[@standardnotes/scheduler-server]: Process exited (exit code 0), completed in 1s 713ms

[@standardnotes/syncing-server]: Process started
[@standardnotes/syncing-server]: Process exited (exit code 0), completed in 2s 266ms

[@standardnotes/home-server]: Process started
[@standardnotes/home-server]: Process exited (exit code 0), completed in 2s 289ms

[@standardnotes/websockets-server]: Process started
[@standardnotes/websockets-server]: Process exited (exit code 0), completed in 2s 401ms
Done in 39s 291ms
Error: Environment variable AUTH_JWT_SECRET not set
    at Env.get (packages/domain-core/dist/src/Domain/Env/AbstractEnv.js:18:19)
    at ContainerConfigLoader.load (packages/api-gateway/dist/src/Bootstrap/Container.js:108:86)
    at Service.getContainer (packages/api-gateway/dist/src/Bootstrap/Service.js:17:23)
    at HomeServer.start (packages/home-server/dist/src/Server/HomeServer.js:60:84)
    at Object.<anonymous> (packages/home-server/dist/bin/server.js:9:32)
    at Module._compile (node:internal/modules/cjs/loader:1358:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1416:10)
    at require$$0.Module._extensions..js (.pnp.cjs:23233:33)
    at Module.load (node:internal/modules/cjs/loader:1208:32)
    at Module._load (node:internal/modules/cjs/loader:1024:12)

Here's my .env file in the root directory:

######
# DB #
######

#DB_HOST=db
#DB_PORT=3306
#DB_USERNAME=std_notes_user
#DB_PASSWORD=changeme123
#DB_DATABASE=standard_notes_db
#DB_TYPE=mysql
DB_TYPE=sqlite
DB_DATABASE=data/stdn.db

#########
# CACHE #
#########

REDIS_PORT=6379
REDIS_HOST=cache
CACHE_TYPE=redis

########
# KEYS #
########

AUTH_JWT_SECRET=elThqZvN87uqGNQfudmxcvCR5n99swshxZn4c9w7o
AUTH_SERVER_ENCRYPTION_SERVER_KEY=wdy3a61VRUDom15hzO0GqVzO1jvcZ8cf25nwEPmgGA
VALET_TOKEN_SECRET=aenkoXjlcQ142DWFQftJN4X3sy6lFpSxTv0ns2vn0

Nothing is listening on port 3000.

@CarlSinclair
Copy link
Author

I'm very confused. If client apps have a "home server" feature that effectively enables self-hosting with a single click, why is it so much harder to set up the sync component alone? The Linux client doesn't work on headless systems and even if it did it'd be very inefficient.

I guess what I'm asking is why isn't there a simple binary for the server? Why jump through all these hoops? Even Docker is unnecessary complexity and bulk compared to a self-contained binary file.

@Wadera
Copy link

Wadera commented Aug 13, 2024

Standard notes is a software designed to host https://app.standardnotes.com infrastructure. Project is open source for review and security reasons and that you can self-host it as geek and tech savvy person is just sideways benefit.

App is design to use containers as it's probably deployed on cloud infrastructure like K8S or on AWS / Azure / GC etc.

It's much easier to release it this way and that allow Devs to easier upgrade it in the future.

@CarlSinclair
Copy link
Author

I'm not sure I follow. The argument that it's easier to maintain using Docker would have made sense if it wasn't for the existence of the home-server that completely nullifies the need for a standalone server and can absolutely be extracted from the client binaries and provided as a standalone binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants