yusufgundogdu commited on
Commit
2d55e88
·
verified ·
1 Parent(s): 3e440f5

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # Apache ve gerekli araçları kur
4
+ RUN apt-get update && apt-get install -y \
5
+ apache2 \
6
+ libapache2-mod-wsgi-py3 \
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # Uygulama dizinini oluştur
10
+ WORKDIR /var/www/app
11
+
12
+ # Gereksinimleri kopyala ve kur
13
+ COPY app/requirements.txt .
14
+ RUN pip install --no-cache-dir -r requirements.txt
15
+
16
+ # Apache konfigürasyonunu kopyala
17
+ COPY apache/apache-config.conf /etc/apache2/sites-available/000-default.conf
18
+
19
+ # Uygulama kodunu kopyala
20
+ COPY app .
21
+
22
+ # Apache'yi başlat
23
+ CMD ["apache2ctl", "-D", "FOREGROUND"]
24
+
25
+ # Portu aç
26
+ EXPOSE 8080