Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WordPress

This repository contains the setup for a WordPress blog and a MariaDB. Each service runs in its own container. A WordPress admin user and MariaDB user are created via the environment variables. An example.env is provided.

Table of contents

  1. Prerequisites
  2. Quickstart
  3. Usage

Prerequisites

  • Docker Engine or Docker Desktop

Quickstart

In order to quickly get started with the project follow these steps:

  1. Clone the repository
  2. Navigate to the repository
  3. Configure required application environment variables
    1. cp example.env .env
    2. Edit the .env file
  4. Build and run the containers
    • docker compose up -d
  5. (Optional) Show container logs
    • docker compose logs -f
  6. Verify the application is running by visiting <your-ip>:8080 (or the port you configured in the .env)

Usage

Configuration

  1. Create (or copy) the .env file to configure the application.
cp example.env .env

The file has to be in the root directory. Otherwise you need to reference it in the docker compose command. 2. Edit the environment variables. Make sure to use strong passwords if the application is exposed to the internet.

Containerization

You can build and run the containers with a simple command:

# use -d to run the containers in the background
# you can use --env-file /path/to/your/.env if it's not in the root directory
docker compose up -d

This will build and start both containers.

Access container logs

To see the log files of the application, you can use:

docker compose logs -f

Closing this terminal will not stop the containers.

Start/Stop the application

If you want to stop the application (and all containers of it) use:

docker compose stop

To start it again:

docker compose start

Remove the containers

You can remove the containers with

docker compose down

if you don't need them anymore.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors