Skip to content
Open
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
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,4 +188,31 @@ Everything related to the API is inside `flaskr/routes`. The following table sum
![PREVIEW](./preview/preview7.png)
![PREVIEW](./preview/preview8.png)

## Running with Docker

This project can be run using Docker for easier setup and execution.

### 1. Start the application

```bash
docker compose up --build
```

### 2. Access the services

Frontend:
http://localhost:8080

Backend:
http://localhost:5001

API Docks:
http://localhost:5001/docs

To seed the default task labels, run:
```md
```bash
docker compose exec backend python seed.py
```

### Developed by Santiago de Jesús Moraga Caldera - Remy349(GitHub)
12 changes: 12 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM python:3.11

WORKDIR /app
COPY requirements.txt .
RUN pip install -r requirements.txt
COPY . .

EXPOSE 5000

ENV FLASK_APP=application.py
CMD ["flask", "run", "--host=0.0.0.0"]

4 changes: 2 additions & 2 deletions backend/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ alembic==1.14.0; python_version >= '3.8'
apispec[marshmallow]==6.7.1; python_version >= '3.9'
blinker==1.9.0; python_version >= '3.9'
click==8.1.7; python_version >= '3.7'
flask==3.1.0; python_version >= '3.9'
flask==3.0.3; python_version >= '3.9'
flask-cors==5.0.0
flask-jwt-extended==4.6.0; python_version >= '3.7' and python_version < '4'
flask-migrate==4.0.7; python_version >= '3.6'
Expand All @@ -20,4 +20,4 @@ python-dotenv==1.0.1; python_version >= '3.8'
sqlalchemy==2.0.36; python_version >= '3.7'
typing-extensions==4.12.2; python_version >= '3.8'
webargs==8.6.0; python_version >= '3.8'
werkzeug==3.1.3; python_version >= '3.9'
werkzeug==3.0.6; python_version >= '3.9'
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3.8'
services:
frontend:
build: ./frontend
ports:
- 8080:5173
command: npm run dev -- --host 0.0.0.0

backend:
build: ./backend
ports:
- 5001:5000
environment:
- JWT_SECRET_KEY=c7d57142e46f169ce9dbeb8d96603e46
11 changes: 11 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM node:20-alpine

WORKDIR /app
COPY package.json .
RUN npm install

COPY . .

EXPOSE 3000

CMD ["npm", "run", "dev"]