Skip to content

Commit a4909cd

Browse files
committed
Add .gitignore, production compose and nginx Dockerfile
1 parent d1b19d0 commit a4909cd

3 files changed

Lines changed: 71 additions & 0 deletions

File tree

.gitignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# ========== Node.js ==========
2+
# Игнорировать папку с зависимостями фронтенда
3+
frontend/node_modules/
4+
# npm временные файлы
5+
npm-debug.log*
6+
yarn-debug.log*
7+
yarn-error.log*
8+
9+
# ========== Python ==========
10+
# Кеш-компиляции Python
11+
__pycache__/
12+
*.py[cod]
13+
*.pyo
14+
15+
# Виртуальное окружение Python, если создавал
16+
venv/
17+
env/
18+
19+
# ========== Docker ==========
20+
# Исключить временные файлы Docker (если такие появятся)
21+
*.pid
22+
*.seed
23+
*.pid.lock
24+
25+
# ========== System ==========
26+
# Файлы IDE и редакторов
27+
.vscode/
28+
.idea/
29+
30+
# Файлы macOS и Windows
31+
.DS_Store
32+
Thumbs.db
33+
34+
# ========== Git ==========
35+
# Git hooks и временные файлы
36+
*.orig
37+
38+
# ========== Logs ==========
39+
*.log
40+
41+
# ========== Secret configs (по желанию) ==========
42+
# .env файлы, если хранишь пароли локально
43+
.env
44+
.env.*
45+
46+
# ========== Build outputs (если собираешь фронтенд) ==========
47+
frontend/dist/
48+
frontend/build/

docker-compose.prod.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
services:
2+
backend:
3+
image: hackitect7/flask-api:latest
4+
ports:
5+
- "5000:5000"
6+
7+
frontend:
8+
image: hackitect7/node-frontend:latest
9+
ports:
10+
- "3000:3000"
11+
12+
nginx:
13+
image: nginx:latest
14+
volumes:
15+
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
16+
ports:
17+
- "80:80"
18+
depends_on:
19+
- frontend
20+
- backend

nginx/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM nginx:alpine
2+
3+
COPY nginx.conf /etc/nginx/nginx.conf

0 commit comments

Comments
 (0)