Skip to content

Commit d340ebe

Browse files
committed
add test docker containerization
1 parent 174e0b0 commit d340ebe

5 files changed

+97
-10
lines changed

.dockerignore

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# Python
2+
__pycache__/
3+
*.py[cod]
4+
*.pyo
5+
*.pyd
6+
*.db
7+
*.sqlite3
8+
9+
# Flask specific
10+
instance/
11+
.webassets-cache
12+
13+
# Virtual environment
14+
venv/
15+
env/
16+
ENV/
17+
.venv/
18+
19+
# Jupyter Notebook
20+
.ipynb_checkpoints
21+
22+
# IDEs
23+
.vscode/
24+
.idea/
25+
*.sublime-project
26+
*.sublime-workspace
27+
28+
# Logs
29+
*.log
30+
31+
# Other
32+
*.DS_Store
33+
*.tgz
34+
*.zip
35+
*.tar.gz
36+
37+
# Coverage reports
38+
.coverage
39+
htmlcov/
40+
.coverage.*
41+
nosetests.xml
42+
test-results/
43+
44+
# Pytest
45+
.cache/
46+
47+
# Project
48+
migrations/
49+
Personals/
50+
word.py

Dockerfile

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
FROM python:3.11-slim
2+
3+
4+
ENV PYTHONUNBUFFERED=1 \
5+
PYTHONDONTWRITEBYTECODE=1 \
6+
LANG=C.UTF-8 \
7+
LC_ALL=C.UTF-8
8+
9+
10+
COPY requirements.txt /portfolio/
11+
12+
WORKDIR /portfolio
13+
14+
RUN pip install --upgrade pip
15+
16+
RUN pip install --upgrade pip && pip install -r requirements.txt
17+
18+
COPY . .
19+
20+
CMD ["python", "run.py"]
21+
22+
EXPOSE 8000

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,10 @@ Welcome to my portfolio! This project showcases my work as a Python developer wi
2828
- **Front-End**: HTML, CSS, Bootstrap
2929
- **Email**: SMTP (Gmail)
3030
- **Task Queue**: Celery (with Redis/RabbitMQ)
31-
- **Admin Panel**: Flask-Admin
31+
- **Admin Panel**: Flask-Admin
32+
33+
34+
## Docker un
35+
```
36+
docker compose up --build
37+
```

docker-compose.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
version: '3'
2+
3+
services:
4+
web:
5+
build:
6+
context: .
7+
dockerfile: Dockerfile
8+
ports:
9+
- "5000:5000"
10+
command: python run.py
11+
volumes:
12+
- .:/app

requirements.txt

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
alembic==1.13.3
1+
black==24.10.0
22
celery==5.4.0
3+
flake8==7.1.1
34
Flask==3.0.3
45
Flask-Admin==1.6.1
6+
Flask-Babel==2.0.0
57
Flask-Login==0.6.3
8+
Flask-Mail==0.10.0
69
Flask-Migrate==4.0.7
710
Flask-SQLAlchemy==3.1.1
8-
Flask-Mail==0.10.0
911
Flask-WTF==1.2.1
10-
redis==5.1.1
11-
SQLAlchemy==2.0.35
12-
Werkzeug==3.0.4
13-
WTForms==3.1.2
14-
Markdown==3.7
1512
GitPython==3.1.43
16-
python-dotenv==1.0.1
17-
gunicorn==20.1.0
13+
Markdown==3.7
14+
python-dotenv==1.0.1

0 commit comments

Comments
 (0)