https://github.com/dfithian/dash-s3-feed
Proxy server of S3 that serves Dash docsets
https://github.com/dfithian/dash-s3-feed
Last synced: 2 months ago
JSON representation
Proxy server of S3 that serves Dash docsets
- Host: GitHub
- URL: https://github.com/dfithian/dash-s3-feed
- Owner: dfithian
- Created: 2017-07-24T00:49:50.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2021-11-22T15:00:23.000Z (over 3 years ago)
- Last Synced: 2025-01-29T11:11:23.005Z (4 months ago)
- Language: Haskell
- Homepage:
- Size: 17.6 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dash-s3-feed
A proxy server over S3 that serves [Dash](http://kapeli.com/) docsets.
## Setup
* Postgres: `brew install postgres`
* AWS Credentials in `~/.aws/credentials`
* Migrations: `psql -d postgres -f dash-s3-feed/sql/create-tables.sql`
* Build: `stack install`
* Run: `cd dash-s3-feed && ~/.local/bin/dash-s3-feed`## Creating Users
There's a `create-user` binary. For help, run `create-user --help`. An example invocation:
```bash
create-user --username username --password password \
--conn-string "host=localhost port=5432 dbname=postgres"
```
## AuthenticationThis uses basic authentication. Generate an SSL certificate. Some sample steps:
```bash
# Create the key
openssl genrsa -out dash-s3-feed-key.pem 2048
# Create a CSR and fill out the appropriate values
openssl req -new -sha256 -key dash-s3-feed-key.pem -out dash-s3-feed-csr.csr
# Generate the certificate
openssl req -x509 -sha256 -days 365 -key dash-s3-feed-key.pem -in dash-s3-feed-csr.csr -out dash-s3-feed-certificate.pem
# Move key and certificate to the appropriate directory
mv dash-s3-feed-key.pem dash-s3-feed/config/dash-s3-feed-key.pem
mv dash-s3-feed-certificate.pem dash-s3-feed/config/dash-s3-feed-certificate.pem
```## Getting files
For both manifests and docsets, `GET` to `/file//`.
### Example
```bash
curl https://user:pass@localhost:10443/file/my-bucket/my%2furlescaped%2fpath%2fmanifest.xml
```## Pushing docsets
Multipart upload with `version` (text) and `file` (.tar.gz file) inputs. `POST` to
`/file//`.### Example
```bash
curl https://user:pass@localhost:10443/file/my-bucket/my%2furlescaped%2fpath%2fmanifest.xml \
-F "version=1.0" -F "[email protected]"
```## Setting up a Dash feed
Go to Preferences > Downloads > `+`. Enter the manifest url
(`https://user:pass@server:port/file/bucket/path%2fmanifest.xml`). Click "Download".