yusufgundogdu commited on
Commit
97ec43e
·
verified ·
1 Parent(s): 77e631b

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +6 -4
Dockerfile CHANGED
@@ -18,10 +18,13 @@ RUN mkdir -p /var/log/apache2 && \
18
  chmod -R 775 /var/lock/apache2 && \
19
  chmod -R 775 /var/run/apache2
20
 
21
- # Set default port to 8080
22
  RUN echo "Listen 8080" > /etc/apache2/ports.conf && \
23
  echo "ServerName localhost" >> /etc/apache2/apache2.conf
24
 
 
 
 
25
  # Create app directory
26
  WORKDIR /var/www/app
27
 
@@ -32,9 +35,8 @@ RUN pip install --no-cache-dir -r requirements.txt
32
  # Copy Apache configuration
33
  COPY apache/apache-config.conf /etc/apache2/sites-available/000-default.conf
34
 
35
- # Enable the site
36
- RUN a2ensite 000-default && \
37
- a2dissite default
38
 
39
  # Copy app code
40
  COPY app .
 
18
  chmod -R 775 /var/lock/apache2 && \
19
  chmod -R 775 /var/run/apache2
20
 
21
+ # Set default port to 8080 and ServerName
22
  RUN echo "Listen 8080" > /etc/apache2/ports.conf && \
23
  echo "ServerName localhost" >> /etc/apache2/apache2.conf
24
 
25
+ # Remove default site if it exists
26
+ RUN rm -f /etc/apache2/sites-enabled/000-default.conf
27
+
28
  # Create app directory
29
  WORKDIR /var/www/app
30
 
 
35
  # Copy Apache configuration
36
  COPY apache/apache-config.conf /etc/apache2/sites-available/000-default.conf
37
 
38
+ # Enable our site (skip disabling default as it may not exist)
39
+ RUN a2ensite 000-default
 
40
 
41
  # Copy app code
42
  COPY app .