Code Monkey home page Code Monkey logo

gen-wordpress's Introduction

Global Evangelistic Network (GEN) WordPress Website

This repository contains the configuration and setup for the Global Evangelistic Network WordPress website.

Project Structure

.
├── .git
├── .gitignore
├── README.md
├── stack.yml
└── .env.example

Prerequisites

  • Docker
  • Docker Swarm
  • Traefik (configured and running)

Setup

  1. Clone this repository:

    git clone https://github.com/mtcaddy/gen-wordpress.git
    cd gen-wordpress
    
  2. For local development, copy the .env.example file to .env and fill in the necessary environment variables:

    cp .env.example .env
    
  3. For Docker Swarm deployment, create the required secrets:

    echo "your_wordpress_database_password" | docker secret create wp_db_password -
    echo "your_database_root_password" | docker secret create db_root_password -

    Password can be generated by

    WP_DB_PASSWORD=$(openssl rand -base64 32)
    DB_ROOT_PASSWORD=$(openssl rand -base64 32)
    
    echo $WP_DB_PASSWORD | docker secret create wp_db_password -
    echo $DB_ROOT_PASSWORD | docker secret create db_root_password -
    
    echo "WordPress DB Password: $WP_DB_PASSWORD"
    echo "DB Root Password: $DB_ROOT_PASSWORD"
    ```
    
  4. Deploy the stack:

    WP_NODE_HOSTNAME=master-3 docker stack deploy -c stack.yml gen

Configuration

  • The WordPress site will be available at https://gen.my.kipya-connect.com
  • Traefik is configured to handle SSL termination
  • WordPress and MariaDB data are persisted in Docker volumes
  • The services are constrained to run on a specific node for data persistence
  • Sensitive information is managed using Docker secrets

Environment Variables

The following environment variables are used in the stack deployment:

  • WP_NODE_HOSTNAME: The hostname of the node where WordPress and MariaDB should run

Docker Secrets

The following Docker secrets are used:

  • wp_db_password: The password for the WordPress database user
  • db_root_password: The root password for the MariaDB database

Theme and Plugins

Maintenance

Updating WordPress

To update WordPress or plugins, use the WordPress admin interface. If you need to update the Docker image:

  1. Update the image version in stack.yml
  2. Redeploy the stack:
    WP_NODE_HOSTNAME=your_node_hostname docker stack deploy -c stack.yml gen
    

Backups

Regularly backup the wp_data and db_data volumes. You can use Docker volume backup tools or scripts to automate this process.

gen-wordpress's People

Contributors

mtcaddy avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.