Skip to content

Commit

Permalink
docs: add DockerHub instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
lpm0073 committed Jan 9, 2024
1 parent 06bbd7c commit 3f3cfb5
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ docker-push:

docker-run:
source .env && \
docker run -it -e OPENAI_API_KEY=${OPENAI_API_KEY} -e ENVIRONMENT=prod ${CONTAINER_NAME}
docker run -it -e OPENAI_API_KEY=${OPENAI_API_KEY} -e ENVIRONMENT=prod ${DOCKERHUB_USERNAME}/${REPO_NAME}:latest


######################
Expand Down
28 changes: 26 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,40 @@ make init # create a virtual environment

### Run Python on the command line

1. Activate the Python virtual environment

```console
source activate
```

2. Run the application

```console
python -m app.hello_world
```

### Build and run with Docker

1. Build your Docker container

```console
make docker-build # run Docker compose to containerize your application
```

2. Run your Docker container

```console
make docker-run # run the application as a Docker container
```

### Push your Docker container to DockerHub

1. set DOCKERHUB_USERNAME and DOCKERHUB_ACCESS_TOKEN in `.env`

2. push the container

```console
make build # run Docker compose to containerize your application
make run # run the application as a Docker container
make docker-push # run Docker compose to containerize your application
```

Sample output:
Expand Down

0 comments on commit 3f3cfb5

Please sign in to comment.