stat-utas commited on
Commit
549dd8e
·
verified ·
1 Parent(s): 07bf862

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +9 -7
Dockerfile CHANGED
@@ -14,17 +14,19 @@ RUN apt-get update && \
14
  RUN sed -i 's/^bind-address/#bind-address/' /etc/mysql/mariadb.conf.d/50-server.cnf
15
 
16
  # Add custom Nginx configuration
17
- RUN echo 'server {' > /etc/nginx/nginx.conf && \
18
- echo ' listen 80;' >> /etc/nginx/nginx.conf && \
19
- echo ' server_name localhost;' >> /etc/nginx/nginx.conf && \
20
- echo ' location / {' >> /etc/nginx/nginx.conf && \
21
- echo ' root /var/www/html;' >> /etc/nginx/nginx.conf && \
22
- echo ' index index.html;' >> /etc/nginx/nginx.conf && \
 
 
23
  echo ' }' >> /etc/nginx/nginx.conf && \
24
  echo '}' >> /etc/nginx/nginx.conf
25
 
26
  # Expose ports
27
  EXPOSE 80 3306
28
 
29
- # Initialize database and start services
30
  CMD ["sh", "-c", "mysqld_safe & nginx -g 'daemon off;'"]
 
14
  RUN sed -i 's/^bind-address/#bind-address/' /etc/mysql/mariadb.conf.d/50-server.cnf
15
 
16
  # Add custom Nginx configuration
17
+ RUN echo 'http {' > /etc/nginx/nginx.conf && \
18
+ echo ' server {' >> /etc/nginx/nginx.conf && \
19
+ echo ' listen 80;' >> /etc/nginx/nginx.conf && \
20
+ echo ' server_name localhost;' >> /etc/nginx/nginx.conf && \
21
+ echo ' location / {' >> /etc/nginx/nginx.conf && \
22
+ echo ' root /var/www/html;' >> /etc/nginx/nginx.conf && \
23
+ echo ' index index.html;' >> /etc/nginx/nginx.conf && \
24
+ echo ' }' >> /etc/nginx/nginx.conf && \
25
  echo ' }' >> /etc/nginx/nginx.conf && \
26
  echo '}' >> /etc/nginx/nginx.conf
27
 
28
  # Expose ports
29
  EXPOSE 80 3306
30
 
31
+ # Start MariaDB and Nginx services
32
  CMD ["sh", "-c", "mysqld_safe & nginx -g 'daemon off;'"]