This commit is contained in:
kinou-p 2022-10-08 12:41:31 +02:00
parent ba1522d49d
commit 3af8c81dc4
5 changed files with 11 additions and 32 deletions

View File

@ -6,18 +6,18 @@
# By: apommier <apommier@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/08/12 01:38:24 by apommier #+# #+# #
# Updated: 2022/08/12 01:38:25 by apommier ### ########.fr #
# Updated: 2022/10/08 12:29:48 by apommier ### ########.fr #
# #
# **************************************************************************** #
all:
-mkdir /home/apommier/wordpress
-mkdir /home/apommier/mariadb
-mkdir -p /home/apommier/data/wordpress
-mkdir -p /home/apommier/data/mariadb
docker-compose -f ./srcs/docker-compose.yml up --build
fclean: down
-sudo rm -rf /home/apommier/wordpress
-sudo rm -rf /home/apommier/mariadb
-sudo rm -rf /home/apommier/data/wordpress
-sudo rm -rf /home/apommier/data/mariadb
-docker rm $$(docker ps -qa)
-docker rmi -f $$(docker images -qa)
-docker volume rm $$(docker volume ls -q)

View File

@ -2,8 +2,8 @@ WP_URL=apommier.42.fr
WP_TITLE=wordpress
WORDPRESS_DB_HOST=mariadb
WP_ADMIN_LOGIN=admin
WP_ADMIN_PASSWORD=admin
WP_ADMIN_LOGIN=Super
WP_ADMIN_PASSWORD=1234
WP_ADMIN_EMAIL=admin@42.fr
WP_USER_LOGIN=apommier

View File

@ -52,10 +52,10 @@ volumes:
driver_opts:
type: none
o: 'bind'
device: '/home/apommier/wordpress'
device: '/home/apommier/data/wordpress'
dbdata:
driver: local
driver_opts:
type: none
o: 'bind'
device: '/home/apommier/mariadb'
device: '/home/apommier/data/mariadb'

View File

@ -1,14 +1,4 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# sqlStart.sh :+: :+: :+: #
# +:+ +:+ +:+ #
# By: apommier <apommier@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/10/08 11:59:11 by apommier #+# #+# #
# Updated: 2022/10/08 11:59:12 by apommier ### ########.fr #
# #
# **************************************************************************** #
#!/bin/bash
service mysql start
@ -17,6 +7,7 @@ mysql << EOF
CREATE DATABASE IF NOT EXISTS ${MARIADB_DATABASE};
CREATE USER IF NOT EXISTS '${MARIADB_USER}'@'%' IDENTIFIED BY '${MARIADB_PASSWORD}';
GRANT ALL PRIVILEGES ON *.* TO '${MARIADB_USER}'@'%';
SET PASSWORD FOR 'root'@'localhost' = PASSWORD('$MARIADB_ROOT_PASSWORD');
FLUSH PRIVILEGES;
EOF

View File

@ -1,15 +1,3 @@
# **************************************************************************** #
# #
# ::: :::::::: #
# start.sh :+: :+: :+: #
# +:+ +:+ +:+ #
# By: apommier <apommier@student.42.fr> +#+ +:+ +#+ #
# +#+#+#+#+#+ +#+ #
# Created: 2022/10/08 11:59:05 by apommier #+# #+# #
# Updated: 2022/10/08 11:59:06 by apommier ### ########.fr #
# #
# **************************************************************************** #
#!/bin/bash
sleep 5