Giter Site home page Giter Site logo

gitpod-wordpress's Introduction

A Wordpress template on Gitpod

This is a Wordpress template configured for ephemeral development environments on Gitpod.

Usage

Click the button below to start the Gitpod development environment:

Open in Gitpod

This will run and install Wordpress and expose it to the public from your Gitpod environment. The admin interface can be accessed then with username admin and password admin.

phpMyAdmin is also spun up in private and can be accessed using the username root and password supersecretpassword.

A MailHog container is also provided in private.

To make use of this repository in your own project, either fork this repository or just copy the .gitpod.yml, mailhog.php and docker-compose.yaml files to your project folder.

Files

Working with the containers

You can use docker compose commands to manage the containers. Check out the docker compose documentation for more details.

Stop containers and remove them

docker compose down --rmi all -v

Start containers

docker compose up --quiet-pull -d

Install wordpress from the command line

docker compose exec wp-cli /bin/bash -c '\
  wp core install \
    --path="/var/www/html" \
    --url="'$(gp url 8000)'" \
    --title="${WORDPRESS_SITE_NAME}" \
    --admin_user="${WORDPRESS_ADMIN_USER}" \
    --admin_password="${WORDPRESS_ADMIN_PASSWORD}" \
    --admin_email="${WORDPRESS_ADMIN_EMAIL}"\
'

Note: The variables used in the above command are expanded in the wordpress-cli container itself, except the gp url 8000 command which is expanded on the Gitpod host instead (hence the closing and re-opening the single quotes).

Get information on the Wordpress instance

docker compose exec wp-cli wp --info

Working with Gitpod

The gp command line tool can be used to manage the Gitpod workspace from the terminal. Check out the gp command documentation for more details.

Get the public url of the Wordpress instance

gp url 8000

Stop the Gitpod workspace

This is useful as the Gitpod Free plan only allows you 50 hours of work a month.

gp stop

gitpod-wordpress's People

Contributors

szilvesztercsab 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.