Skip to content

Instantly share code, notes, and snippets.

@MervinPraison
Forked from ekandreas/.dockerignore
Created January 29, 2021 00:28
Show Gist options
  • Save MervinPraison/b10ab1607c29a57a322f5b2ae165fa16 to your computer and use it in GitHub Desktop.
Save MervinPraison/b10ab1607c29a57a322f5b2ae165fa16 to your computer and use it in GitHub Desktop.

Revisions

  1. Andreas Ek revised this gist Jan 8, 2016. 1 changed file with 22 additions and 0 deletions.
    22 changes: 22 additions & 0 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -31,8 +31,30 @@ Check for EP_HOST in .env and set it to docker-machine-ip
    Run docker-compose up -d
    ```

    ## Stop Docker
    ```
    Run docker-compose stop
    ```

    ## Remove Docker
    ```
    Run docker-compose rm
    ```

    ## Initialization
    To initialize the environment:
    ```
    dep init development
    ```

    ## Pull production
    To pull from production:
    ```
    dep pull production
    ```

    ## Deploy
    To deploy to production:
    ```
    dep deploy production
    ```
  2. Andreas Ek revised this gist Jan 8, 2016. 1 changed file with 9 additions and 0 deletions.
    9 changes: 9 additions & 0 deletions deploy.php
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    include_once 'vendor/ekandreas/dipwpe/main.php';

    env('remote.name','');
    env('remote.path','/mnt/persist/www/');
    env('remote.ssh','[email protected]');
    env('remote.database','');
    env('remote.domain','.se');
    env('local.domain','.dev');
    env('local.is_elastic',true);
  3. Andreas Ek revised this gist Jan 8, 2016. 1 changed file with 16 additions and 5 deletions.
    21 changes: 16 additions & 5 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,26 +1,37 @@
    # Dockerize your WordPress Bedrock project
    Add these files to project root

    ##Copy files
    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

    ## Database
    Change .env to new database (ip to Docker env)

    ## Hosts
    Add hosts so that the site will find its way
    ```
    sudo nano /etc/hosts
    ```

    ## Deployment
    Change deploy with dipwpe
    ```bash
    composer require deployer/deployer
    composer require ekandreas/dipwpe
    ```

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

    Start Docker:
    ## Start Docker
    ```
    Run docker-compose up -d
    ```

    ## Initialization
    To initialize the environment:
    ```
    dep init development
  4. Andreas Ek revised this gist Jan 8, 2016. 1 changed file with 15 additions and 5 deletions.
    20 changes: 15 additions & 5 deletions readme.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,27 @@
    Add Dockerfile to project root
    Add .dockerignore
    Add docker.conf
    Add docker-compose.yml
    # 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
    ```bash
    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
    ```

    dep init development
    To initialize the environment:
    ```
    dep init development
    ```
  5. Andreas Ek renamed this gist Jan 8, 2016. 1 changed file with 4 additions and 13 deletions.
    17 changes: 4 additions & 13 deletions readme-dockerize.txt → readme.md
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,8 @@
    Add Dockerfile

    Add .dockerignore with:
    *
    !docker.conf

    Add docker.conf with Apache-conf
    Run docker build . in root

    Add hosts
    sudo nano /etc/hosts

    Add Dockerfile to project root
    Add .dockerignore
    Add docker.conf
    Add docker-compose.yml

    Add hosts with sudo nano /etc/hosts
    Change .env to new database

    Change deploy with dipwpe
  6. Andreas Ek revised this gist Jan 8, 2016. 3 changed files with 62 additions and 0 deletions.
    19 changes: 19 additions & 0 deletions docker-compose.yml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    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"
    17 changes: 17 additions & 0 deletions docker.conf
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    <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>
    26 changes: 26 additions & 0 deletions readme-dockerize.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    Add Dockerfile

    Add .dockerignore with:
    *
    !docker.conf

    Add docker.conf with Apache-conf
    Run docker build . in root

    Add hosts
    sudo nano /etc/hosts

    Add docker-compose.yml

    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

    Run docker-compose up -d

    dep init development
  7. Andreas Ek revised this gist Jan 8, 2016. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions .dockerignore
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,2 @@
    *
    !docker.conf
  8. Andreas Ek created this gist Jan 8, 2016.
    13 changes: 13 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,13 @@
    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