-
Notifications
You must be signed in to change notification settings - Fork 2
Production Environment
Diego Juliao edited this page Mar 11, 2018
·
3 revisions
- 🔥🔒 HTTPS Free HTTPS
- 🔥 Wp-CLI WordPress Command Line Tool, useful to manage your WordPress site by console
- 🔥 phpMyAdmin Database Administrator, useful to manage your database in graphic mode
- Nginx HTTP Server
- MariaDB DataBase, same as MySQL but opensource
- Change the PHP version. You can change with ease the PHP version
- Pull and Build Docker Images
docker-compose --file docker-compose-production.yml pull
docker-compose --file docker-compose-production.yml build
- Just run
docker network create nginx-proxy
- Create the user and a DB using phpMyAdmin
-
export DB_PASS=YOUR_SUPER_SECURE_PASSWORD && docker-compose --file docker-compose-production.yml up phpmyadmin
- Replace
YOUR_SUPER_SECURE_PASSWORD
with the password that you want to use for theroot
user in your DB
- Replace
- Create an User and a Database with the same name and all privileges
- Access to phpMyAdmin through
YOUR_DOMAIN:8888
- When creation the user make sure to allow connection from any host
- Access to phpMyAdmin through
-
- Change permission on the WordPress folder to allow our container add files to it
chown -R 82:root www/wp_files/
- Download the WordPress core
docker-compose --file docker-compose-production.yml run --rm --user=82 wp_server wp core download
- Create your
wp-config
file-
docker-compose --file docker-compose-production.yml run --rm --user=82 wp_server wp core config --prompt
- 1/12 --dbname=<dbname>:
YOUR_DB_NAME
- 2/12 --dbuser=<dbuser>:
USER_CREATED_AT_1
- 3/12 [--dbpass=<dbpass>]:
PASS_CREATED_AT_1
- 4/12 [--dbhost=<dbhost>]:
mariadb
- 5...12 - Default values set by enter
- 1/12 --dbname=<dbname>:
-
- Install WordPress
-
docker-compose run --rm --user=82 wp_server wp core install --prompt
- 1/6 --url=<url>:
localhost
- 2...6 - Your personal configuration
- 1/6 --url=<url>:
-
- Up and Running You need to pass several arguments such as:
- DB_PASS When the DB is raised this will be its root password
- DOMAIN Put your domain your-domain.com. This is needed to the https set up.
-
EMAIL Put your email domain [email protected]. This is needed to the https set up.
-
export DB_PASS=YOUR_SUPER_SECURE_PASSWORD && export DOMAIN=your-domain.com && export [email protected] && docker-compose --file docker-compose-production.yml up -d && docker-compose --file docker-compose-production.yml stop wp_phpmyadmin
- Visit
YOUR_DOMAIN
and enjoy
This will stop the phpmyadmin service for security reasons, if you want to run it just
docker-compose --file docker-compose-production.yml start phpmyadmin
- Visit
-