You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+37Lines changed: 37 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -74,6 +74,43 @@ It details Share's required environment variables and shows how it expects to be
74
74
75
75
If you have any questions about self hosting, feel free to ask in our [Discord server](https://unison-lang.org/discord).
76
76
77
+
### Dependencies
78
+
79
+
Share currently requires a Postgres instance and access to a Redis server.
80
+
81
+
### Environment Variables
82
+
83
+
There are a number of environment variables Share requires.
84
+
See `local.env` for example values which are used for local development.
85
+
86
+
-`SHARE_API_ORIGIN`: The URL where the share server is accessible on the web.
87
+
-`SHARE_SERVER_PORT`: Which port the server should bind to on startup. This may differ from `SHARE_API_ORIGIN` if you're using a reverse proxy.
88
+
-`SHARE_REDIS`: The URL of the redis server.
89
+
-`SHARE_POSTGRES`: The URL of the postgres server.
90
+
-`SHARE_HMAC_KEY`: A secret key used for cryptographic signing. This should be at least 32 characters long.
91
+
-`SHARE_DEPLOYMENT`: The deployment environment. One of: `local`, `staging`, `prod`.
92
+
-`SHARE_POSTGRES_CONN_TTL`: The maximum time a connection to the postgres server should be kept alive.
93
+
-`SHARE_POSTGRES_CONN_MAX`: The maximum number of connections to the postgres server.
94
+
-`SHARE_SHARE_UI_ORIGIN`: The URL where the Share UI is publicly accessible.
95
+
-`SHARE_CLOUD_UI_ORIGIN`: The URL where the Unison Cloud UI is publicly accessible.
96
+
-`SHARE_HOMEPAGE_ORIGIN`: The URL where the Unison homepage is publicly accessible. If you are self-hosting you can set this to any URL you like.
97
+
-`SHARE_CLOUD_HOMEPAGE_ORIGIN`: The URL where the Unison Cloud homepage is publicly accessible. If you are self-hosting you can set this to any URL you like.
98
+
-`SHARE_LOG_LEVEL`: Minimum level of logging to emit, One of: `DEBUG`, `INFO`, `ERROR`, `USERERROR`.
99
+
-`SHARE_COMMIT`: The git commit hash the share server was built from. This is passed along in error reports
100
+
-`SHARE_MAX_PARALLELISM_PER_DOWNLOAD_REQUEST`: How many concurrent workers may serve a single UCM pull. The recommended value for this will depend on the number of cores on your machine, but between 5-8 is a reasonable number.
101
+
-`SHARE_MAX_PARALLELISM_PER_UPLOAD_REQUEST`: How many concurrent workers may serve a single UCM push. The recommended value for this will depend on the number of cores on your machine, but between 5-8 is a reasonable number.
102
+
-`SHARE_ZENDESK_API_USER`: The username to use for the Zendesk API.
103
+
-`SHARE_ZENDESK_API_TOKEN`: The token to use for the Zendesk API.
104
+
-`SHARE_GITHUB_CLIENTID`: The client ID for the GitHub OAuth application which will be used to authenticate users with the Share server.
105
+
-`SHARE_GITHUB_CLIENT_SECRET`: The client secret for the GitHub OAuth application which will be used to authenticate users with the Share server.
106
+
- (optional) `SHARE_SENTRY_DSN`: The URL of the Sentry instance to send error reports to. You may leave this unset.
107
+
108
+
### Database initialization
109
+
110
+
Share doesn't currently use any tools for managing database migrations (sorry). To initialize your database, you must run all the **timestamped** migration files inside `./sql`.
111
+
112
+
We plan to transition to a more robust solution in the future.
0 commit comments