yusufgundogdu commited on
Commit
3c41c02
·
verified ·
1 Parent(s): 7481ee6

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +10 -9
Dockerfile CHANGED
@@ -1,26 +1,27 @@
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
26
- EXPOSE 8080
 
1
  FROM python:3.9-slim
2
 
 
3
  RUN apt-get update && apt-get install -y \
4
  apache2 \
5
  libapache2-mod-wsgi-py3 \
6
  && rm -rf /var/lib/apt/lists/*
7
 
8
+ # Log dizinini oluştur ve izinleri ayarla
9
+ RUN mkdir -p /var/log/apache2 && \
10
+ chown -R www-data:www-data /var/log/apache2 && \
11
+ chmod -R 755 /var/log/apache2
12
+
13
  WORKDIR /var/www/app
14
 
 
15
  COPY app/requirements.txt .
16
  RUN pip install --no-cache-dir -r requirements.txt
17
 
 
18
  COPY apache/apache-config.conf /etc/apache2/sites-available/000-default.conf
19
 
20
+ # Apache port configini değiştir
21
+ RUN echo "Listen 8080" > /etc/apache2/ports.conf
22
+
23
  COPY app .
24
 
25
+ EXPOSE 8080
 
26
 
27
+ CMD ["apache2ctl", "-D", "FOREGROUND"]