Skip to content

Commit

Permalink
updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
krokicki committed Aug 20, 2024
1 parent b2334bb commit 7418096
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
21 changes: 15 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,25 @@ S3 features omitted:
* RequestPayer
* etc.

# Getting Started
# Running the service

## 1. Install dependencies
The simplest way to run the service is to use Docker:

```bash
docker run -it -p 8000:8000 -v ./config.template.yaml:/app/x2s3/config.yaml ghcr.io/janeliascicomp/x2s3:latest
```

## Development mode

1. Install dependencies

Create a virtualenv and install the dependencies:

virtualenv env
source env/bin/activate
pip install -r requirements.txt

## 2. Create target bucket configuration
2. Create target bucket configuration

Create a `config.yaml` file that contains all of the buckets you want to serve. You can get
started quickly by using the provided example template:
Expand All @@ -52,7 +60,7 @@ cp config.template.yaml config.yaml
See the [documentation](docs/Config.md) for more information about the configuration file.


## 3. Run server
3. Run server

The service is written using FastAPI and runs inside of Uvicorn. You can start a dev server quickly with the `run.py` script:

Expand All @@ -72,7 +80,7 @@ You can specify TLS certificates and increase the number of workers in order to
uvicorn x2s3.app:app --host 0.0.0.0 --port 8000 --workers 8 --access-log --ssl-keyfile /opt/tls/cert.key --ssl-certfile /opt/tls/cert.crt
```

# Production Deployment
## Production Deployment

For production deployments, we recommend using an orchestrator (like Docker Compose) to run the prebuilt Docker container along with an Nginx reverse proxy which provides caching and TLS termination.

Expand Down Expand Up @@ -101,7 +109,8 @@ docker compose up -d

# Documentation

See the [documentation](docs/Development.md) for more information about development.
* [Configuation](docs/Config.md) - how to use `config.yaml` to configure the service
* [Development](docs/Development.md) - notes on developing the service codebase


# Attributions
Expand Down
2 changes: 1 addition & 1 deletion config.template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ targets:
- name: local_files
client: file
options:
root: .
path: .

#
# Exposes s3://janelia-cosem-datasets at /cosem-data
Expand Down
2 changes: 2 additions & 0 deletions docs/Development.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,6 @@ docker build . --build-arg GIT_TAG=$VERSION -t ghcr.io/janeliascicomp/x2s3:$VERS

```bash
docker push ghcr.io/janeliascicomp/x2s3:$VERSION
docker tag ghcr.io/janeliascicomp/x2s3:$VERSION ghcr.io/janeliascicomp/x2s3:latest
docker push ghcr.io/janeliascicomp/x2s3:latest
```

0 comments on commit 7418096

Please sign in to comment.