Skip to main content

This is a script to create a docker-compose project for a wordpress site with a nginx reverse proxy. The script will create the configuration files for the project and start the containers as well as install the nginx reverse proxy configuration. *See the usage section for more information.*

Project description

Wordpress-Installation-Script

# =============================================================================
# Copyright (C) 2024 Frederik Beimgraben
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <https://www.gnu.org/licenses/>.
# =============================================================================

Installation

Using Makefile and Cython

# Compile the script to an executable using Cython:
make
# Copy the executable to a folder in your PATH (e.g. /usr/local/bin):
sudo cp wordpress_install /usr/local/bin/

From PyPI

# Install the script from PyPI:
pip install wordpress-docker-setup

WHAT IS THIS?

This is a script to create a docker-compose project for a wordpress site with a nginx reverse proxy. The script will create the configuration files for the project and start the containers as well as install the nginx reverse proxy configuration. See the usage section for more information.

Usage

Usage of the script:
    python3 wordpress_setup.py [ { -I [ -C ] | -U } ] [ -n <hostname> ] [ -p <port> ] [ -m <mount_folder> ] [ -d <db_passwd> ] [ -r <db_passwd_root> ]

    [no action options]:
        Create configuration files for a new project in the current directory

    -I: Install the project
    -C: Start Certbot to get a certificate for the domain
    -U: Uninstall the project

    -c: Clean the project (remove all files)

    -i: Interactive mode (ask for the following options)
    -s: Silent mode (don't show prompts)

    -n: The hostname of the site (default: localhost)
    -p: The port of the site (default: 8080)
    -m: The folder to mount the database data (default: db_data)
    -d: The password for the database user (default: <random>)
    -r: The password for the database root user (default: <random>)

    -h: Show this help message

    The script will create a docker-compose.yml file and a .env file in the
    current directory. The .env file will contain the passwords for the database
    users as well as the hostname and port of the site. The docker-compose.yml
    file will contain the configuration for the wordpress site and the nginx
    reverse proxy. The script will also create a folder for the database data
    of the wordpress site.

    If the -I option is used, the script will:
        - Create the configuration files
        - Start the containers
        - Install the nginx reverse proxy configuration

    If the -C option is used, the script will:
        - Start Certbot to get a certificate for the domain

    If the -U option is used, the script will:
        - Stop the containers
        - Remove the containers
        - Uninstall the nginx reverse proxy configuration

    If the -c option is used, the script will:
        - Clean the project (remove all files)

    The script will check if the required programs are installed. Furthermore
    it will check if the DNS-Configuration is correct for the setup to work
    when requesting a certificate with Certbot.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

wordpress_docker_setup-1.3.0.tar.gz (21.4 kB view details)

Uploaded Source

Built Distribution

wordpress_docker_setup-1.3.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file wordpress_docker_setup-1.3.0.tar.gz.

File metadata

File hashes

Hashes for wordpress_docker_setup-1.3.0.tar.gz
Algorithm Hash digest
SHA256 da02decd5751689a92546d427c13fe09c9d89e6a7c40466625c18aa4ed71eed1
MD5 b761c7415c4bef7b4a316ea7ee0ecb1c
BLAKE2b-256 fe8c4495fa4183695772700d6e33e91c11eb9eaa409942462d3cb7d4494b5f31

See more details on using hashes here.

File details

Details for the file wordpress_docker_setup-1.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for wordpress_docker_setup-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9a7d430ae7f37ef842ed5b0ca18d6defc9528737992114e5f73f9efc6a8ea731
MD5 cc1fcd9cb6810cd55e467c1f70fce79f
BLAKE2b-256 9b4c64dc1c69b9f1b1cb5c5e356d3e4edb06e46a7329f09d871e165d715d8aaf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page