atomic-serverhttps://user-images.githubusercontent.com/2183313/139728539-d69b899f-6f9b-44cb-a1b7-bbab68beac0c.mp4
Status: Alpha. Not ready for production time. Prone to changes and corrupt databases when upgrading. Changelog
Atomic-server is a graph database server for storing and sharing Atomic Data. Demo on atomicdata.dev
wss request to /ws to open a webscocket.Powered by Rust, atomic-lib, actix-web, sled, tantivy and more.
You can run atomic-server in four ways:
cargo install atomic-serverWhen you're running atomic-server, go to Initial setup and configuration
After installing from cargo install atomic-server or as a binary, run atomic-server.
Run atomic-server --help to learn more about the available commands, such as export, import and various flags.
The dockerfile is located in the project root, above this server folder.
docker run -p 80:80 -p 443:443 -v atomic-storage:/atomic-storage joepmeneer/atomic-serverdocker pull joepmeneer/atomic-server and docker should fetch the latest version.```sh
git clone git@github.com:joepio/atomic-data-rust.git cd atomic-data-rust/server
cp default.env .env
cargo run
cargo run --features desktop
cargo run --no-default-features ```
Troubleshooting compiling from source:
```sh
sudo apt-get install -y pkg-config libssl-dev --fix-missing ```
atomic-server --help), or by setting ENV variables..env from the current path by default. Create a .env file from the default template in your current directory with atomic-server setup-env.Agent Subject and Private key. You should use these in the atomic-cli and atomic-data-browser clients for authorization.~/.config/atomic, which stores your newly created Agent keys, your data, the HTTPS certificates and a folder for public static files.http://localhost/setup to register your first (admin) user. You can use an existing Agent, or create a new one.You'll probably want to make your Atomic Data available through HTTPS. You can use the embedded HTTPS / TLS setup powered by LetsEncrypt, acme_lib and rustls.
You can do this by passing these flags:
Run the server: atomic-server --https --email some@example.com --domain example.com.
You can also set these things using a .env or by setting them some other way.
Make sure the server is accessible at ATOMIC_DOMAIN at port 80, because Let's Encrypt will send an HTTP request to this server's /.well-known directory to check the keys.
It will now initialize the certificate.
Read the logs, watch for errors.
HTTPS certificates are automatically renewed when the server is restarted, and the certs are 4 weeks or older.
They are stored in your .config/atomic/ dir.
There are three ways to interact with this server:
atomic-data-browser JS frontend by visiting localhost.atomic-cli terminal appatomic-cli as clientatomic-cli is a useful terminal tool for interacting with atomic-server.
It makes it easy to query and edit Atomic Data from the command line.
Check it out.
You can fetch individual items by sending a GET request to their URL.
```sh
curl -i -H "Accept: application/ad+json" https://atomicdata.dev/properties/shortname
curl -i -H "Accept: application/ld+json" https://atomicdata.dev/properties/shortname
curl -i -H "Accept: application/json" https://atomicdata.dev/properties/shortname
curl -i -H "Accept: text/turtle" https://atomicdata.dev/properties/shortname ```
Check out ./example_requests.http for more things that you can do. Also, read the Atomic Data Docs to learn more about Collections, Commits, JSON-AD and other concepts used here.
```sh
cargo test --all ```
```sh
cargo install drill drill -b benchmark.yml --stats ```
Yes! You should. Especially before installing a newer Atomic-Server version, it might be imcompatible with the previous database model and could corrupt the database.
Run atomic-server export to create a backup in your ~/.config/atomic/backups folder.
Import them using atomic-server import -p ~/.config/atomic/backups/${date}.json.
/setup invite is no longer usable! What now?You can run atomic-server --initialize to recreate the /setup invite. It will be reset to 1 usage.
There are no helper functions for this, but you could atomic-server export your JSON-AD, and find + replace your old domain with the new one.
This could especially be helpful if you're running at localhost and want to move to a live server.
Remove the db folder in your atomic config: rm -rf ~/.config/atomic/db.
This is not yet possible. See #13.
You might have a problem with your index. Try reindexing using atomic-server --reindex.
failed to retrieve error when openingTry re-initializing atomic server atomic-server --initialize.