Giter VIP home page Giter VIP logo

scalestack's Introduction

Project Features

  • Project hosted in AWS. Containers are pushed to ECR.
  • The API is run using AppRunner, and can be accessed here: https://miuqehzpzg.us-east-1.awsapprunner.com/.
  • Postgres DB provided by AWS.
  • Lambda functions are run using containers uploaded to ECR. The function uses asyncio to make requests in parallel.
  • Dev container set up for instant local development.
  • Pytest based testing.

Access project

https://miuqehzpzg.us-east-1.awsapprunner.com/

The api docs are interactive, so you can test the endpoints right there.

Instructions to run project locally with dev containers

We provide a docker-compose.yml file for quick setup of the development environment. This includes all necessary services:

  • Django application
  • PostgreSQL database
  • Lambda (for local testing)

To set up and start the development environment:

  1. Install Prerequisites:

    • Docker with Docker Compose
    • Visual Studio Code
    • VSCode extensions: "Dev Containers" and "Docker"
  2. Create a .env file in the root directory of the project with the following content:

# For the api container
DJANGO_SECRET_KEY
DJANGO_DEBUG
DJANGO_ALLOWED_HOSTS
DATABASE_URL=postgres://<POSTGRES_USER>:<POSTGRES_PASSWORD>@db:<POSTGRES_PORT>/<POSTGRES_DB>

# For the db container
POSTGRES_USER
POSTGRES_PASSWORD
POSTGRES_DB
POSTGRES_PORT

# AWS Configuration
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION
  1. Open the project in Visual Studio Code.

  2. Press Cmd + Shift + P (on macOS) or Ctrl + Shift + P (on Windows/Linux) to open the command palette.

  3. Type "Dev Containers: Open Folder in Container" and select it.

  4. Wait for the containers to be built and started. This may take a few minutes the first time.

  5. Once the Dev Container is ready, open a new terminal in VS Code.

  6. Run the following commands to set up the database and run the dev server:

    make migrate
    make runserver
  7. The application should now be running. You can access http://0.0.0.0:8000/ to interact with the API.

  8. To test the lambda function, run make lambda inside the api container

scalestack's People

Contributors

francopasseggi avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.