Spaces:
Build error

0Mart00 commited on
Commit
2f2bdfe
·
1 Parent(s): d82493a

feat: Docker támogatás hozzáadása

Browse files

- 🐳 Dockerfile - Python 3.11 slim alapú image
- �� docker-compose.yml - Könnyű indítás és fejlesztés
- 🚫 .dockerignore - Felesleges fájlok kizárása
- 📄 LICENSE - MIT licenc hozzáadva

Használat:
docker build -t wordgame:latest .
docker run -p 8030:8030 --env-file .env wordgame:latest

Vagy docker-compose-szal:
docker-compose up --build

Files changed (4) hide show
  1. .dockerignore +56 -0
  2. Dockerfile +30 -0
  3. LICENSE +7 -0
  4. docker-compose.yml +17 -0
.dockerignore ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Git
2
+ .git
3
+ .gitignore
4
+
5
+ # Python
6
+ __pycache__
7
+ *.py[cod]
8
+ *$py.class
9
+ *.so
10
+ .Python
11
+ .env
12
+ .venv
13
+ env/
14
+ venv/
15
+ ENV/
16
+
17
+ # IDE
18
+ .vscode/
19
+ .idea/
20
+ *.swp
21
+ *.swo
22
+
23
+ # Documentation (optional)
24
+ *.md
25
+ !requirements.txt
26
+
27
+ # Static files that are not needed
28
+ *.log
29
+
30
+ # Test files
31
+ tests/
32
+ test/
33
+ *_test.py
34
+ test_*.py
35
+
36
+ # Coverage
37
+ htmlcov/
38
+ .coverage
39
+ .coverage.*
40
+ .coveragerc
41
+ .pytest_cache/
42
+
43
+ # Build
44
+ build/
45
+ dist/
46
+ *.egg-info/
47
+ .eggs/
48
+
49
+ # Docker
50
+ Dockerfile
51
+ .dockerignore
52
+ docker-compose.yml
53
+
54
+ # Misc
55
+ .DS_Store
56
+ Thumbs.db
Dockerfile ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WordGame Docker Image
2
+ FROM python:3.11-slim
3
+
4
+ # Set working directory
5
+ WORKDIR /app
6
+
7
+ # Install system dependencies
8
+ RUN apt-get update && apt-get install -y \
9
+ gcc \
10
+ && rm -rf /var/lib/apt/lists/*
11
+
12
+ # Copy requirements first for better caching
13
+ COPY requirements.txt .
14
+
15
+ # Install Python dependencies
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # Copy the rest of the application
19
+ COPY . .
20
+
21
+ # Expose port
22
+ EXPOSE 8030
23
+
24
+ # Set environment variables
25
+ ENV PYTHONPATH=/app
26
+ ENV HOST=0.0.0.0
27
+ ENV PORT=8030
28
+
29
+ # Run the application
30
+ CMD ["uvicorn", "src.wordgame.main:app", "--host", "0.0.0.0", "--port", "8030", "--reload"]
LICENSE ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ Copyright (c) 2026 Nyiri Martin. All rights reserved.
2
+
3
+ Commercial use, reproduction, distribution, or modification of this software
4
+ and its source code, in whole or in part, is strictly prohibited without
5
+ prior written permission from the copyright holder.
6
+
7
+ The software is provided "as is", without warranty of any kind.
docker-compose.yml ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version: '3.8'
2
+
3
+ services:
4
+ wordgame:
5
+ build:
6
+ context: .
7
+ dockerfile: Dockerfile
8
+ ports:
9
+ - "8030:8030"
10
+ environment:
11
+ - SUPABASE_URL=${SUPABASE_URL:-}
12
+ - SUPABASE_KEY=${SUPABASE_KEY:-}
13
+ volumes:
14
+ - .:/app
15
+ - /app/__pycache__
16
+ restart: unless-stopped
17
+ command: uvicorn src.wordgame.main:app --host 0.0.0.0 --port 8030 --reload