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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
.env
backend/.env
backend/.venv
backend/venv/
node_modules/
__PYCACHE__/
__pycache__/
Expand Down
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM node:20-slim

WORKDIR /app

COPY package.json package-lock.json ./

RUN npm install --ignore-scripts

COPY . .

EXPOSE 5173

CMD ["npm", "run", "dev", "--", "--host", "0.0.0.0"]
13 changes: 13 additions & 0 deletions backend/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM python:3.12-slim

WORKDIR /app

COPY requirements.txt .

RUN pip install --no-cache-dir -r requirements.txt

COPY . .

EXPOSE 5000

CMD ["python", "run.py"]
38 changes: 38 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
version: '3.8'

services:
db:
image: postgres:15
environment:
POSTGRES_DB: taskmanager
POSTGRES_USER: taskuser
POSTGRES_PASSWORD: taskpassword
volumes:
- postgres_data:/var/lib/postgresql/data
ports:
- "5433:5432"
healthcheck:
test: ["CMD-SHELL", "pg_isready -U taskuser -d taskmanager"]
interval: 5s
timeout: 5s
retries: 5

backend:
build: ./backend
ports:
- "5000:5000"
environment:
DATABASE_URL: postgresql://taskuser:taskpassword@db:5432/taskmanager
depends_on:
db:
condition: service_healthy

frontend:
build: .
ports:
- "5173:5173"
depends_on:
- backend

volumes:
postgres_data:
Loading