Skip to content

Commit

Permalink
Merge pull request #31 from amadeus4dev/update-docker
Browse files Browse the repository at this point in the history
Update docker
  • Loading branch information
tsolakoua authored Sep 24, 2024
2 parents 072e822 + 0aa891f commit 2e0bc07
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 60 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ FROM python:3.10

ENV PYTHONUNBUFFERED 1

ARG AMADEUS_CLIENT_ID
ARG AMADEUS_CLIENT_SECRET
ARG AMADEUS_HOSTNAME

RUN mkdir /code

WORKDIR /code
Expand Down
37 changes: 0 additions & 37 deletions Makefile

This file was deleted.

32 changes: 9 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,41 +13,27 @@ You also check out the [demo](https://hotel-booking-engine.azurewebsites.net/) a

## How to run the project via Docker (recommended)

Build the image from the Dockerfile. The following command will
First you need to add your environment variales in an `.env` file, such as

```sh
make
AMADEUS_CLIENT_ID=YOUR_API_KEY
AMADEUS_CLIENT_SECRET=YOUR_API_SECRET
```

The container receives your API key/secret from the environment variables.
Before running the container, make sure your have your credentials correctly
set:
Build the image from the Dockerfile. The following command will

```sh
export AMADEUS_CLIENT_ID=YOUR_API_KEY
export AMADEUS_CLIENT_SECRET=YOUR_API_SECRET
podman build -t hotel-booking .
```

Finally, start the container from the image:

```
make run
Then start the app
```sh
podman run --env-file .env -p 8000:8000 hotel-booking
```

At this point you can open a browser and go to `https://0.0.0.0:8000`.

Note that it is also possible to run in detached mode so your terminal is still
usable:

```
make start
```

Stop the container with:
At this point you can open a browser and go to `https://0.0.0.0:8000`.

```
make stop
```

## How to run the project locally

Expand Down

0 comments on commit 2e0bc07

Please sign in to comment.