nhost / hasura-backend-plus

🔑Auth and 📦Storage for Hasura. The quickest way to get Auth and Storage working for your next app based on Hasura.
https://nhost.github.io/hasura-backend-plus/
MIT License
1.17k stars 187 forks source link

How do you deploy? #583

Closed joshmedeski closed 3 years ago

joshmedeski commented 3 years ago

I'd like to add documentation for how to self-host the hasura-backend-plus project through a service like AWS (what my agency uses).

I'm currently attempting to use ECS with EC2 instances but haven't figured out how to host the ./custom directory so my private key and email templates are properly connected.

The other method I expect will work is to build my own hasura-backed-plus Docker image including my changes in the ./custom directory and host it on AWS's ECR and deploy it through ECS Fargate. But that seems like more work to maintain over time.

I'll also be setting up CI with GitHub Actions. Once it's fully working I'll add what I did to the documentation ;)

Any suggestions on how to deploy as a Docker container and include the custom directory?

elitan commented 3 years ago

It should be enough to mount the custom directory like this:

    volumes:
      - './custom:/app/custom'

if you have the custom/ folder and the docker-compose.yaml in the same directory.

For v2.5.x you can use this custom/ folder: https://github.com/nhost/hasura-backend-plus/tree/magic-link-hotfix/custom

joshmedeski commented 3 years ago

I got things working on an EC2.