Making WordPress.org

Changeset 8989


Ignore:
Timestamp:
06/24/2019 07:22:10 PM (5 years ago)
Author:
iandunn
Message:

WordCamp Docker: Apply coding stanards.

Location:
sites/trunk/wordcamp.org/.docker
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordcamp.org/.docker/Dockerfile

    r8833 r8989  
    113113
    114114CMD tail -f /dev/null
    115 
    116 
  • sites/trunk/wordcamp.org/.docker/nginx.conf

    r8825 r8989  
    11# Upstream to abstract backend connection(s) for PHP
    22upstream php {
    3         server unix:/tmp/php-cgi.socket;
    4         server 127.0.0.1:9000;
     3    server unix:/tmp/php-cgi.socket;
     4    server 127.0.0.1:9000;
    55}
    66
     
    1313
    1414server {
    15         listen 443 ssl http2;
    16         listen [::]:443 ssl http2;
     15    listen 443 ssl http2;
     16    listen [::]:443 ssl http2;
    1717
    18         server_name wordcamp.test;
    19         ssl_certificate /etc/ssl/certs/wordcamp.crt;
    20         ssl_certificate_key /etc/ssl/private/wordcamp.key;
    21         ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
     18    server_name wordcamp.test;
     19    ssl_certificate /etc/ssl/certs/wordcamp.crt;
     20    ssl_certificate_key /etc/ssl/private/wordcamp.key;
     21    ssl_protocols TLSv1.2 TLSv1.1 TLSv1;
    2222
    23         root /usr/src/public_html/mu;
    24         index index.php;
     23    root /usr/src/public_html/mu;
     24    index index.php;
    2525
    26         location = /favicon.ico {
    27                 log_not_found off;
    28                 access_log off;
    29         }
     26    location = /favicon.ico {
     27        log_not_found off;
     28        access_log off;
     29    }
    3030
    31         location = /robots.txt {
    32                 allow all;
    33                 log_not_found off;
    34                 access_log off;
    35         }
     31    location = /robots.txt {
     32        allow all;
     33        log_not_found off;
     34        access_log off;
     35    }
    3636
    37         location / {
    38                 try_files $uri $uri/ /index.php?$args;
    39         }
     37    location / {
     38        try_files $uri $uri/ /index.php?$args;
     39    }
    4040
    41         location ~ \.php$ {
    42                 include fastcgi.conf;
    43                 fastcgi_intercept_errors on;
    44                 fastcgi_pass php;
    45         }
     41    location ~ \.php$ {
     42        include fastcgi.conf;
     43        fastcgi_intercept_errors on;
     44        fastcgi_pass php;
     45    }
    4646
    47         location ~* /wp-content/.*\.(js|css|png|jpg|jpeg|gif|ico)$ {
    48             root /usr/src/public_html;
    49             expires max;
    50             log_not_found off;
    51         }
     47    location ~* /wp-content/.*\.(js|css|png|jpg|jpeg|gif|ico)$ {
     48        root /usr/src/public_html;
     49        expires max;
     50        log_not_found off;
     51    }
    5252
    53         location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
    54                 expires max;
    55                 log_not_found off;
    56         }
     53    location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
     54        expires max;
     55        log_not_found off;
     56    }
    5757}
  • sites/trunk/wordcamp.org/.docker/readme.md

    r8833 r8989  
    551. Make sure you have Docker installed and Docker daemon running on your system.
    66
    7 1. Clone the repo: 
     71. Clone the repo:
    88    ```
    99    git clone git@github.com:WordPress/wordcamp.org.git
     
    2828    127.0.0.1   2014.new-site.wordcamp.test
    2929    ```
    30    
     30
    3131    `/wp-admin` pages for these sites should now be accessible. Use `admin` as username and `password` as password to login. Front end pages will not be accessible until you complete the remaining steps.
    32    
     32
    3333    **Note:** `https` URL scheme must be used to visit these sites. Security exception will be required in first time run.
    34    
     34
    35351. The installation doesn't have any 3rd-party plugins or themes yet, you must add them like so:
    3636
     
    3939           docker-compose exec wordcamp.test bash
    4040        ```
    41    
     41
    4242    1. Run predefined command for installing plugins and themes. This could take some time depending on your internet connection:
    4343        ```bash
     
    5757    docker-compose up -d
    5858    ```
    59    
     59
    6060    here `-d` flags directs docker to run in background.
    61    
     61
    62621. To view `nginx` and `php-logs` use:
    6363    ```bash
    6464    docker-compose logs -f --tail=100 wordcamp.test
    6565    ```
    66    
    67     here 
    68    
     66
     67    here
     68
    6969    `-f` flag is used for consistently following the logs. Omit this to only dump the logs in terminal.
    70    
    71     `--tail=100` flag is used to view only last `100` lines of log. Omit this if you'd like to see the entire log since docker started. 
    72    
     70
     71    `--tail=100` flag is used to view only last `100` lines of log. Omit this if you'd like to see the entire log since docker started.
     72
    7373    `wordcamp.test` is the name of the docker service which is running `nginx` and `php`
    74    
     74
    7575    Similarly, to view MySQL server logs (note: this does not show MySQL queries made by application, these are just server logs), use:
    76    
     76
    7777    ```bash
    7878    docker-compose logs -f --tail=100 wordcamp.db
    7979    ```
    80    
     80
    8181    here
    82    
     82
    8383    `wordcamp.db` is the name of docker service which is running MySQL server.
    8484
     
    8888    docker-compose exec wordcamp.test bash
    8989    ```
    90    
     90
    9191    here
    9292    `wordcamp.test` is the name of docker service running `nginx` and `php`
    9393    `bash` is the name of command that we want to execute. This particular command will give us shell access inside the docker.
    94    
     94
    9595    Similarly, for MySQL, you can use:
    96    
     96
    9797    ```bash
    9898    docker-compose exec wordcamp.db bash
    9999    ```
    100    
     100
    101101    here
    102102    `wordcamp.db` is the name of docker service running MySQL server
    103  
     103
    1041041. To stop the running docker containers, use the command like so:
    105    
     105
    106106    ```bash
    107107    docker-compose stop
    108108    ```
    109    
    110    
     109
     110
    111111Once the Docker instance has started, you can visit [2014.content.wordcamp.org](2014.content.wordcamp.org) to view a sample WordCamp site. WordCamp central would be [central.wordcamp.test](central.wordcamp.test). You can also visit [localhost:1080](localhost:1080) to view the MailCatcher dashboard.
Note: See TracChangeset for help on using the changeset viewer.