not much more, one hour per day is really really not enough that's frustrating... still trying to configure wp with mariadb
This commit is contained in:
11
README.md
11
README.md
@@ -1,6 +1,17 @@
|
|||||||
|
|
||||||
# inception
|
# inception
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
## WIP
|
||||||
|
- network with compose : https://docs.docker.com/compose/networking/
|
||||||
|
- communication between two containers : https://www.tutorialworks.com/container-networking/
|
||||||
|
- connecting two containers : https://stackoverflow.com/questions/45481943/connecting-two-docker-containers
|
||||||
|
- connect mysql docker to another : https://stackoverflow.com/questions/54901581/connect-to-a-mysql-server-running-in-a-docker-container-from-another-container
|
||||||
|
- fail with 'vant connect' : https://stackoverflow.com/questions/23234379/installing-mysql-in-docker-fails-with-error-message-cant-connect-to-local-mysq
|
||||||
|
- maybe do something like starting mysql in wpdocker with hostname of mysql-docker ? mysql -h hostname ?
|
||||||
|
- or with port:port-protocol ? with tcp ?
|
||||||
|
|
||||||
---
|
---
|
||||||
## git next commit
|
## git next commit
|
||||||
|
|
||||||
|
|||||||
@@ -13,7 +13,6 @@ DB_USER_TMP=user_wp_inception_tmp
|
|||||||
DB_PSWD_TMP="if you read this i will have to erase your memory _tmp"
|
DB_PSWD_TMP="if you read this i will have to erase your memory _tmp"
|
||||||
|
|
||||||
## WORDPRESS SETUP
|
## WORDPRESS SETUP
|
||||||
WP_DIR=/var/www/html
|
|
||||||
WP_URL=hulamy.42.fr
|
WP_URL=hulamy.42.fr
|
||||||
WP_TITLE="le blog !"
|
WP_TITLE="le blog !"
|
||||||
WP_ADMIN=hulamy
|
WP_ADMIN=hulamy
|
||||||
|
|||||||
@@ -47,15 +47,14 @@ services:
|
|||||||
build:
|
build:
|
||||||
context: ./requirements/wordpress
|
context: ./requirements/wordpress
|
||||||
args:
|
args:
|
||||||
- WP_DIR=${WP_DIR}
|
|
||||||
- WP_URL=${WP_URL}
|
- WP_URL=${WP_URL}
|
||||||
- WP_TITLE=${WP_TITLE}
|
- WP_TITLE=${WP_TITLE}
|
||||||
- WP_ADMIN=${WP_ADMIN}
|
- WP_ADMIN=${WP_ADMIN}
|
||||||
- WP_ADMIN_PSWD=${WP_ADMIN_PSWD}
|
- WP_ADMIN_PSWD=${WP_ADMIN_PSWD}
|
||||||
- WP_ADMIN_EMAIL=${WP_ADMIN_EMAIL}
|
- WP_ADMIN_EMAIL=${WP_ADMIN_EMAIL}
|
||||||
- DB_NAME=${DB_NAME_TMP}
|
- DB_NAME=${DB_NAME}
|
||||||
- DB_USER=${DB_USER_TMP}
|
- DB_USER=${DB_USER}
|
||||||
- DB_PSWD=${DB_PSWD_TMP}
|
- DB_PSWD=${DB_PSWD}
|
||||||
image: wordpress
|
image: wordpress
|
||||||
container_name: mywordpress
|
container_name: mywordpress
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ RUN apt update && apt install -y \
|
|||||||
&& \
|
&& \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# (NOT NECESSARY : DONE BY WP)
|
|
||||||
# configure wp database
|
# configure wp database
|
||||||
RUN service mysql start && \
|
RUN service mysql start && \
|
||||||
mariadb --execute="CREATE DATABASE ${DB_NAME};" && \
|
mariadb --execute="CREATE DATABASE ${DB_NAME};" && \
|
||||||
|
|||||||
@@ -2,20 +2,20 @@ FROM debian:buster
|
|||||||
|
|
||||||
RUN apt update && apt install -y \
|
RUN apt update && apt install -y \
|
||||||
php7.3 \
|
php7.3 \
|
||||||
mariadb-client \
|
|
||||||
curl
|
curl
|
||||||
|
# mariadb-client
|
||||||
|
|
||||||
# install wp-cli : https://make.wordpress.org/cli/handbook/guides/installing/
|
# install wp-cli : https://make.wordpress.org/cli/handbook/guides/installing/
|
||||||
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar &&\
|
RUN curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar &&\
|
||||||
chmod +x wp-cli.phar && \
|
chmod +x wp-cli.phar && \
|
||||||
mv wp-cli.phar /usr/local/bin/wp
|
mv wp-cli.phar /usr/local/bin/wp
|
||||||
|
|
||||||
ARG WP_DIR
|
ARG WP_DIR=/var/www/html
|
||||||
ARG WP_URL
|
#ARG WP_URL
|
||||||
ARG WP_TITLE
|
#ARG WP_TITLE
|
||||||
ARG WP_ADMIN
|
#ARG WP_ADMIN
|
||||||
ARG WP_ADMIN_PSWD
|
#ARG WP_ADMIN_PSWD
|
||||||
ARG WP_ADMIN_EMAIL
|
#ARG WP_ADMIN_EMAIL
|
||||||
|
|
||||||
ARG DB_NAME
|
ARG DB_NAME
|
||||||
ARG DB_USER
|
ARG DB_USER
|
||||||
@@ -24,9 +24,9 @@ ARG DB_PSWD
|
|||||||
# install wordpress with cli : https://make.wordpress.org/cli/handbook/how-to-install/
|
# install wordpress with cli : https://make.wordpress.org/cli/handbook/how-to-install/
|
||||||
RUN wp core download --path=${WP_DIR} --allow-root
|
RUN wp core download --path=${WP_DIR} --allow-root
|
||||||
# create config file :
|
# create config file :
|
||||||
RUN wp config create --dbname=${DB_NAME} --dbuser=${DB_USER} --dbpass=${DB_PASS} --path=${WP_DIR} --allow-root
|
RUN wp config create --dbname=${DB_NAME} --dbuser=${DB_USER} --dbpass=${DB_PASS} --path=${WP_DIR} --allow-root --skip-check
|
||||||
# create db :
|
# create db :
|
||||||
RUN service mysql start && wp db create --path=${WP_DIR} --allow-root
|
#RUN service mysql start && wp db create --path=${WP_DIR} --allow-root
|
||||||
# install wordpress :
|
# install wordpress :
|
||||||
RUN wp core install --url=${WP_URL} --title=${WP_TITLE} --admin_user=${WP_ADMIN} --admin_password=${WP_ADMIN_PSWD} --admin_email=${WP_ADMIN_EMAIL} --path=${WP_DIR} --allow-root
|
RUN wp core install --url=${WP_URL} --title=${WP_TITLE} --admin_user=${WP_ADMIN} --admin_password=${WP_ADMIN_PSWD} --admin_email=${WP_ADMIN_EMAIL} --path=${WP_DIR} --allow-root
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user