Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Dockerfile and docker-compose.yaml #25

Merged
merged 2 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.9-slim-buster

RUN apt-get update -y \
&& apt-get install gcc -y \
&& apt-get clean

COPY requirements.txt /pybr_opendata/requirements.txt

WORKDIR /pybr_opendata/

RUN pip install --upgrade pip
RUN pip install -r /pybr_opendata/requirements.txt
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,13 @@ format:
isort .

local_run:
@echo "Starting streamlit on docker, (localhost:8501)"
streamlit run src/app.py

local_docker_build:
@echo "Starting docker-compose build"
docker-compose build

local_docker_run:
@echo "Starting streamlit on docker, port 8501"
docker-compose up
13 changes: 13 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: "3"
services:
streamlit:
container_name: pybr_opendata
build:
context: .
dockerfile: ./Dockerfile
restart: always
volumes:
- ./:/pybr_opendata/
ports:
- "8501:8501"
command: streamlit run src/app.py