aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile27
1 files changed, 12 insertions, 15 deletions
diff --git a/Dockerfile b/Dockerfile
index d6a48cf..4018114 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -4,27 +4,24 @@ RUN apt update && \
apt install -y nginx \
php-fpm \
mariadb-server \
- php-mysql
- # php-mbstring \
- # php-gettext
-
-COPY srcs/nginx_conf /etc/nginx/sites-available/
+ php-mysql \
+ php-mbstring \
+ curl
RUN mkdir /var/www/wordpress /var/www/phpmyadmin
COPY srcs/wordpress /var/www/wordpress
COPY srcs/phpmyadmin /var/www/phpmyadmin
-RUN ln -fs /etc/nginx/sites-available/test.com /etc/nginx/sites-enabled/default
+COPY srcs/nginx_conf /etc/nginx/sites-available/
+RUN rm /etc/nginx/sites-enabled/default && \
+ ln -fs /etc/nginx/sites-available/ft_server.com /etc/nginx/sites-enabled/ft_server.com
-EXPOSE 80
+COPY srcs/scripts /root/scripts
RUN service mysql start && \
- echo "CREATE DATABASE testdb;" | mysql -u root && \
- echo "CREATE USER 'wordpressuser'@'localhost' IDENTIFIED BY 'password';" | mysql -u root && \
- echo "GRANT ALL PRIVILEGES ON testdb.* TO 'wordpressuser'@'localhost' IDENTIFIED BY 'password';" | mysql -u root && \
- echo "FLUSH PRIVILEGES;" | mysql -u root
+ mysql -u root < /root/scripts/wordpress_setup.sql && \
+ sh /root/scripts/generate_certificates.sh
+
+EXPOSE 80
-CMD service php7.3-fpm start && \
- service mysql start && \
- service nginx start && \
- sleep infinity & wait
+CMD ["/root/scripts/docker_entrypoint.sh"]