Skip to content

Instantly share code, notes, and snippets.

@MervinPraison
Forked from ekandreas/.dockerignore
Created January 29, 2021 00:28
Show Gist options
  • Select an option

  • Save MervinPraison/b10ab1607c29a57a322f5b2ae165fa16 to your computer and use it in GitHub Desktop.

Select an option

Save MervinPraison/b10ab1607c29a57a322f5b2ae165fa16 to your computer and use it in GitHub Desktop.
Dockerize your WordPress Bedrock
*
!docker.conf

Dockerize your WordPress Bedrock project

Add these files to project root

  • Dockerfile
  • .dockerignore
  • docker.conf
  • docker-compose.yml Add hosts with sudo nano /etc/hosts Change .env to new database

Change deploy with dipwpe

composer require deployer/deployer
composer require ekandreas/dipwpe

Configure deploy params! Check for EP_HOST in .env and set it to docker-machine-ip

Start Docker:

Run docker-compose up -d

To initialize the environment:

dep init development
web:
build: .
ports:
- "80:80"
volumes:
- ".:/var/www/html"
links:
- mysqldb:mysqldb
mysqldb:
image: mysql
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=your-project-database
ports:
- "3306:3306"
elastic:
image: elasticsearch
ports:
- "9200:9200"
<VirtualHost *:80>
ServerName intra.dev
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/web
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
<Directory /var/www/html>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
FROM php:5.5-apache
MAINTAINER Andreas Ek <[email protected]>
RUN a2enmod rewrite
RUN apt-get update && apt-get install -y mysql-client libmysqlclient-dev
RUN docker-php-ext-install mysqli
ADD docker.conf /etc/apache2/sites-enabled/
EXPOSE 80
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment