FastAPI backend for INSTALL
You'll need to have Docker installed on your machine to run this in the containerized version. You can check out how to do that in the Docker Docs.
- Clone the repo for local development
Always ensure you local repo is up to date by running:
git clone https://github.com/cesartheroman/fast-api.git
git pull origin main
- Edit the
.env.sample
file and change to.env
and fill in with appropriate env vars. (Optional if not contributing code within repo) - Pull and run the container image (first time)
docker compose up --build # will build image and container
- You can then open up a terminal and run
docker ps
to make sure the container is running or just open up the Docker Desktop. You should see one container calledfast-api-server
. - If you edit configs or make a migration where you would like to rebuild the Docker Image you can simply follow these commands:
For regular composing up and down you can simply do:
docker compose down -v # will tear down the container and remove the associated volumes docker compose up --build # will build up image and run it as a container
docker compose up -d docker compose down
- You might come up against an error when running
docker compose
relating to not having permission, I'm not exactly sure why that is but all you need to do is run the command again but with sudo:sudo docker compose up
etc.
- Create your Feature Branch (
git checkout -b username/AmazingFeature
) - Add you Changes (
git add <changed-files>
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin username/AmazingFeature
) - Open a Pull Request