Skip to content

Commit

Permalink
Move files and update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinJBoyer committed Jun 24, 2024
1 parent be5f5b5 commit 870ed31
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 16 deletions.
5 changes: 0 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,3 @@
# IDE-specific files
.vscode/*
.idea

# This file is used in local development to pass an /app/.env
# file to the container, for secrets. It should not be committed
# to the repo because tests and CI/CD will not have an .env file.
docker-compose.override.yml
5 changes: 5 additions & 0 deletions app/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,8 @@ coverage.*

# Poetry installer local error logs
poetry-installer-error-*.log

# This file is used in local development to pass an /app/.env
# file to the container, for secrets. It should not be committed
# to the repo because tests and CI/CD will not have an .env file.
docker-compose.override.yml
File renamed without changes.
File renamed without changes.
File renamed without changes.
19 changes: 8 additions & 11 deletions docs/app/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ A very simple [docker-compose.yml](/docker-compose.yml) has been included to sup

## Prerequisites

**Note:** Run everything from within the `/app` folder:

1. Install the version of Python specified in [.python-version](/app/.python-version)
[pyenv](https://github.com/pyenv/pyenv#installation) is one popular option for installing Python,
or [asdf](https://asdf-vm.com/).
Expand All @@ -21,21 +19,20 @@ A very simple [docker-compose.yml](/docker-compose.yml) has been included to sup

3. If you are using an M1 mac, you will need to install postgres as well: `brew install postgresql` (The psycopg2-binary is built from source on M1 macs which requires the postgres executable to be present)

4. You'll also need [Docker Desktop](https://www.docker.com/products/docker-desktop/)
4. You'll also need [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed and running.

## Run the application

1. In your terminal, `cd` to the `app` directory of this repo.
2. Make sure you have [Docker Desktop](https://www.docker.com/products/docker-desktop/) installed & running.
3. Run `make setup-local` to install dependencies
4. Run `make init start` to build the image and start the container.
5. Navigate to `localhost:8080/docs` to access the Swagger UI.
6. Run `make run-logs` to see the logs of the running API container
7. Run `make stop` when you are done to delete the container.
**Note:** Run everything from within the `/app` folder:

1. Run `make init start` to build the image and start the container.
2. Navigate to `localhost:8080/docs` to access the Swagger UI.
3. Run `make run-logs` to see the logs of the running API container
4. Run `make stop` when you are done to delete the container.

## (Optional) Configure local secrets

If you need to pass secrets to the application via environment variables, copy the provided [/docker-compose.override.yml.example](/docker-compose.override.yml.example) to /docker-compose.override.yml. Then create an `/app/.env` file with your secrets. The override will pass this file to the Docker container with your application.
If you need to pass secrets to the application via environment variables, copy the provided [/app/docker-compose.override.yml.example](/docker-compose.override.yml.example) to `/app/docker-compose.override.yml`. Then create an `/app/.env` file with your secrets. The override will pass this file to the Docker container with your application.

```bash
cp docker-compose.override.yml.example docker-compose.override.yml
Expand Down

0 comments on commit 870ed31

Please sign in to comment.