Skip to content
Davide Berdin edited this page Jun 10, 2020 · 4 revisions

Welcome to the phoenix wiki!

Use the content navigation bar on your right to explore more about the project.

If you find any bug or you have a suggestion, we'd love if you open an issue or a PR ❤️.

Thank you very much, the Phoenix team 😃

How to start

The Project is divided in two main parts:

  • Public APIs
  • Internal APIs
  • Worker

Assuming that you have go, docker and docker-compose installed in your machine, run docker-compose up -d to spin up Redis and localstack (for local S3).

After having the services up and running, assuming that you have your Go environment in your PATH, you should be able to start directly with go run main.go --help. This command should print the help message.

Proceed by running go run main.go internal for the internal APIs. In another terminal run go run main.go public for the public APIs and in a third terminal run go run main.go worker for the Worker service.

If you need to upload some files to the local S3, use the following commands after localstack has been created:

  • aws --endpoint-url=http://localhost:4572 s3 mb s3://my-bucket to create a bucket in local S3
  • aws --endpoint-url=http://localhost:4572 s3api put-bucket-acl --bucket my-bucket --acl public-read to set up a policy for testing with local s3
  • aws --endpoint-url=http://localhost:4572 s3 cp /your/path/data.jsonl s3://my-bucket/data/ to copy a file to local S3

How to run tests

To run all the tests, use the following command:

$: go clean -testcache && go test -race ./...

The first part is to avoid that Go will cache the result of the tests. This could lead to some evaluation errors if you change some tests. Better without cache.

How to perform manual tests

For manual testing of endpoints on the different environments, a Postman collection has been included in the docs directory.

Deploy to Kubernetes

We made a convenient Helm chart so that you can deploy the project in your own cluster. Go to the folder chart for more information

Clone this wiki locally