alphabagibagi commited on
Commit
0a4076d
·
verified ·
1 Parent(s): 9de03cf

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -11
Dockerfile CHANGED
@@ -12,20 +12,18 @@ RUN curl -o wordpress.tar.gz https://wordpress.org/latest.tar.gz && \
12
  tar -xvzf wordpress.tar.gz --strip-components=1 && \
13
  rm wordpress.tar.gz
14
 
15
- # Copy script untuk setup otomatis
16
- COPY setup.sh /usr/local/bin/setup.sh
17
- RUN chmod +x /usr/local/bin/setup.sh
18
-
19
- # Set permissions
20
  RUN chown -R www-data:www-data /var/www/html && \
21
- chmod -R 755 /var/www/html
 
 
 
 
 
22
 
23
- # Ubah Apache ke port 7860
24
- RUN sed -i 's/80/7860/g' /etc/apache2/ports.conf /etc/apache2/sites-available/*.conf && \
25
- echo "Listen 7860" >> /etc/apache2/ports.conf
26
 
27
  EXPOSE 7860
28
 
29
- # Entry point
30
- ENTRYPOINT ["/usr/local/bin/setup.sh"]
31
  CMD ["apache2-foreground"]
 
12
  tar -xvzf wordpress.tar.gz --strip-components=1 && \
13
  rm wordpress.tar.gz
14
 
15
+ # Set permissions yang benar (tanpa chmod recursive yang berlebihan)
 
 
 
 
16
  RUN chown -R www-data:www-data /var/www/html && \
17
+ find /var/www/html -type d -exec chmod 755 {} \; && \
18
+ find /var/www/html -type f -exec chmod 644 {} \;
19
+
20
+ # Ubah Apache ke port 7860 (HANYA di satu tempat)
21
+ RUN sed -i 's/Listen 80/Listen 7860/g' /etc/apache2/ports.conf && \
22
+ sed -i 's/:80/:7860/g' /etc/apache2/sites-available/*.conf
23
 
24
+ # Enable mod rewrite
25
+ RUN a2enmod rewrite
 
26
 
27
  EXPOSE 7860
28
 
 
 
29
  CMD ["apache2-foreground"]