Skip to content

Commit

Permalink
Merge pull request #1 from vikmaksymenko/main
Browse files Browse the repository at this point in the history
Added Dockerfile for running app in container
  • Loading branch information
AutomationPanda authored Mar 8, 2024
2 parents 9696740 + b2d64fc commit c21b614
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM python:3

WORKDIR /bulldoggy-reminders-app

# Install the requirements
COPY ./requirements.txt /bulldoggy-reminders-app/requirements.txt
RUN pip install --no-cache-dir --upgrade -r /bulldoggy-reminders-app/requirements.txt

# Copy the app folders and files
COPY ./app /bulldoggy-reminders-app/app
COPY ./static /bulldoggy-reminders-app/static
COPY ./templates /bulldoggy-reminders-app/templates
COPY config.json /bulldoggy-reminders-app/config.json

# Run app
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000"]
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,35 @@ uvicorn app.main:app --reload
Then, open your browser to [`http://127.0.0.1:8000`](http://127.0.0.1:8000) to load the app.



## Running the app with Docker

Build the image with:

```
docker build -t bulldoggy-reminders-app:0.1 .
```


To run the image:

```
docker run -it --rm --name bulldoggy-reminders-app -p 8000:8000 bulldoggy-reminders-app:0.1
```

Alternatively, you can pull the image from [Docker Hub](https://hub.docker.com/repository/docker/vmaksimenko/bulldoggy-reminders-app) instead of building it locally:

```
docker pull vmaksimenko/bulldoggy-reminders-app
```

Then, run the image:

```
docker run -it --rm --name bulldoggy-reminders-app -p 8000:8000 vmaksimenko/bulldoggy-reminders-app
```


## Logging into the app

The [`config.json`](config.json) file declares the users for the app.
Expand Down

0 comments on commit c21b614

Please sign in to comment.