Skip to content
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
2 changes: 2 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
Dockerfile
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3.12-alpine
WORKDIR /code
ENV FAST_APP=src/
ENV FAST_RUN_HOST=0.0.0.0
RUN apk add --no-cache gcc musl-dev linux-headers
COPY requirements.txt requirements.txt
RUN pip install -r requirements.txt
EXPOSE 8000
COPY . .
CMD ["python3.12", "-m", "src.main"]
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,36 @@ Este projeto implementa um sistema gamificado onde usuários ganham pontos ao us
- Python 3.11+
- pip

### Instalação e Execução com docker
1. **Clone o repositório**:
```bash
cd /home/kim/code/estudos/bussp
```

2. **Execute**:
```bash
docker run -d -p 127.0.0.1:8000:8000 backend
```

3. **Acesse a API**:
- API: http://localhost:8000
- Documentação interativa: http://localhost:8000/docs
- Documentação alternativa: http://localhost:8000/redoc

4. **Para matar o container**:
Pegue o id do container em `CONTAINER ID`
```bash
docker ps
```
```bash
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
```
Execute:
```bash
docker stop ${id}
docker rm ${id}
```

### Instalação e Execução

1. **Clone o repositório**:
Expand Down