Skip to content

mayankgul/insiit-api

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Please note that you will need to fork this repository and then clone your own version of it on your computer, otherwise you will not be able to contribute.

Installing Docker on your machine

If you already have Docker installed on your computer, please ignore this section.

  • For Windows users: It is recommended that you install WSL 2 from here before installing Docker as it is the preferred way to virtualize your containers.

You can download Docker Desktop from here.

Once you go through the installation process, you can verify if Docker has been installed successfully by opening a terminal and running:

docker --version
docker-compose --version

If you get an error, please refer to the documentation here.

Initializing the project on your machine

Fork the repository and clone it on your computer.

Next, create a new .env file in the repository root, and add the required environment variables to it. Please contact the repository maintainers for the environment variables.

Running the API

Open a terminal in the root of the repository and run the following command:

docker-compose up --build

You should now see uvicorn logs in your terminal like so:

insiit-api  | INFO:     Will watch for changes in these directories: ['/code']
insiit-api  | INFO:     Uvicorn running on http://0.0.0.0:8000 (Press CTRL+C to quit)
insiit-api  | INFO:     Started reloader process [1] using WatchFiles
insiit-api  | INFO:     Started server process [8]
insiit-api  | INFO:     Waiting for application startup.
insiit-api  | INFO:     Application startup complete.


If you wish to open VS Code in the container, first install the Docker Extension. Then, click on the remote connection button in the bottom left extreme. Click on "Attach to Running Container...", and select "/insiit-api".


To stop a container that is already running in your terminal, press CTRL+C to exit out of the container. Then, run the following command:

docker-compose down


If you wish to run commands inside the Docker container, open a new terminal and run the command:

docker exec -it insiit-api bash

Please note that this will be a Linux environment and any commands you run will be run inside the container. For example:

PS C:\Users\Mayank> docker exec -it insiit-api bash
root@c9b3a93df5e9:/code# whoami
root
root@c9b3a93df5e9:/code# pwd
/code
root@c9b3a93df5e9:/code# ls
__init__.py  __pycache__  app  appTypes  config.py  main.py

Contributing to the repository

Whenever you commit any new changes, make sure to push them to your forked version of the repository. Then, create a new pull request and provide a meaningful summary and description. After review, your commit will be merged to this repository.

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 99.9%
  • Dockerfile 0.1%