mariadb finis
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
FROM debian:bullseye
|
||||
RUN apt update -y
|
||||
RUN apt upgrade -y
|
||||
RUN apt install mariadb-server -y
|
||||
COPY conf/50-server.cnf /etc/mysql/mariadb.conf.d/50-server.cnf
|
||||
COPY tools/script.sh /tools/script.sh
|
||||
ENTRYPOINT ["sh", "/tools/script.sh"]
|
||||
@@ -0,0 +1,6 @@
|
||||
[mysqld]
|
||||
datadir = /var/lib/mysql
|
||||
socket = /run/mysqld/mysqld.sock
|
||||
bind_address=*
|
||||
port = 3306
|
||||
user = mysql
|
||||
@@ -0,0 +1,14 @@
|
||||
service mysql start;
|
||||
mysql -e "CREATE DATABASE IF NOT EXISTS \`${SQL_DATABASE}\`;"
|
||||
mysql -e "CREATE USER IF NOT EXISTS \`${SQL_USER}\`@'localhost' IDENTIFIED BY '${SQL_PASSWORD}';"
|
||||
mysql -e "GRANT ALL PRIVILEGES ON \`${SQL_DATABASE}\`.* TO \`${SQL_USER}\`@'%' IDENTIFIED BY '${SQL_PASSWORD}';"
|
||||
mysql -e "ALTER USER 'root'@'localhost' IDENTIFIED BY '${SQL_ROOT_PASSWORD}';"
|
||||
mysql -e "FLUSH PRIVILEGES;"
|
||||
mysqladmin -u root -p$SQL_ROOT_PASSWORD shutdown
|
||||
exec mysqld_safe
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
FROM debian:bullseye
|
||||
RUN apt update
|
||||
RUN apt update -y
|
||||
RUN apt upgrade -y
|
||||
RUN apt install nginx -y
|
||||
RUN apt install vim -y
|
||||
RUN apt install curl -y
|
||||
@@ -10,4 +11,4 @@ RUN openssl req -x509 -nodes -out /etc/nginx/ssl/inception.crt -keyout /etc/ngin
|
||||
COPY conf/nginx.conf /etc/nginx/nginx.conf
|
||||
RUN chmod 755 /var/www/html
|
||||
RUN chown -R www-data:www-data /var/www/html
|
||||
CMD [ "nginx", "-g", "daemon off;" ]
|
||||
ENTRYPOINT [ "nginx", "-g", "daemon off;" ]
|
||||
Reference in New Issue
Block a user