Skip to content

Commit

Permalink
add base deployment.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
aspriddell committed Nov 12, 2023
1 parent bdf8564 commit 379458b
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 1 deletion.
73 changes: 73 additions & 0 deletions deployment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
## OnionFruit Web Deployment Guide
In order to deploy onionfruit-web a server is required:

- A Windows server with container support enabled
- A Linux server with docker installed

Additionally, a redis server (with TLS and ACL is recommended) is needed for storing Tor node info

### Worker
The worker task is responsible for generating the assets and populating the redis database used by the server process.

To deploy, create a config file in a persistent directory (in this example, we use `appsettings.json`):

```json5
{
// asp.net core logging config
"Logging": {
"LogLevel": {
"Default": "Debug",
"Microsoft.AspNetCore": "Warning"
}
},

// optional sentry.io DSN client key
"Dsn": "",

"Redis": {
// set redis connection string here
// see https://stackexchange.github.io/StackExchange.Redis/Configuration.html#configuration-options for options
"ConnectionString": "localhost:6379"
},
"Worker": {
// alternative location for sentry DSN
"Dsn": "",

"Exports": {
// see below for exports examples
}
}
}
```

#### `Worker.Exports`
`Worker.Exports` is a dictionary of locations to export data to.

```json5
{
// the key used is only used for identification purposes (can be set to what you want)
"Folder-Export": {
"Type": "Folder",
"FolderPath": "OnionFruit-Assets",

// SpecialBasePath is optional - if it is set then the FolderPath will be relative to this directory.
// see https://source.dot.net/#System.Private.CoreLib/src/libraries/System.Private.CoreLib/src/System/Environment.SpecialFolder.cs,192440782c25956f for valid ids
"SpecialBasePath": "DesktopDirectory"
},
"Archive-Upload": {
"Type": "Archive",

// upload url to send a PUT request to
// the file name will be appended to the end of the request url
"UploadUrl": "https://example.com/assetupload/",

// optional asset .zip prefix (if null it will be set to onionfruit-data)
"Prefix": "asset-upload",

// optional redis pubsub channel to send a notification informing clients a new archive has been uploaded.
// if null, no message will be sent.
"RedisNotificationChannel": ""
}
}
```

3 changes: 2 additions & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ The system is split into two systems:
- The server responsible for serving user-initiated requests for data (designed to scale horizontally independent of the worker process)

### Deployment
Deployment can be done on either a Windows or Linux-based server. Docker images are built on each release for both the server and worker images and can be found on [Dockerhub](https://hub.docker.com/r/dragonfruitdotnet/onionfruit-web)

WIP - will be completed once the project is more complete.
See deployment.md for further instruction on how to deploy.

### License
These libraries and components are licensed under Apache 2.0. Refer to the license file for more info.

0 comments on commit 379458b

Please sign in to comment.