Changeset 8989
- Timestamp:
- 06/24/2019 07:22:10 PM (5 years ago)
- Location:
- sites/trunk/wordcamp.org/.docker
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordcamp.org/.docker/Dockerfile
r8833 r8989 113 113 114 114 CMD tail -f /dev/null 115 116 -
sites/trunk/wordcamp.org/.docker/nginx.conf
r8825 r8989 1 1 # Upstream to abstract backend connection(s) for PHP 2 2 upstream php { 3 4 3 server unix:/tmp/php-cgi.socket; 4 server 127.0.0.1:9000; 5 5 } 6 6 … … 13 13 14 14 server { 15 16 15 listen 443 ssl http2; 16 listen [::]:443 ssl http2; 17 17 18 19 20 21 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; 22 22 23 24 23 root /usr/src/public_html/mu; 24 index index.php; 25 25 26 27 28 29 26 location = /favicon.ico { 27 log_not_found off; 28 access_log off; 29 } 30 30 31 32 33 34 35 31 location = /robots.txt { 32 allow all; 33 log_not_found off; 34 access_log off; 35 } 36 36 37 38 39 37 location / { 38 try_files $uri $uri/ /index.php?$args; 39 } 40 40 41 42 43 44 45 41 location ~ \.php$ { 42 include fastcgi.conf; 43 fastcgi_intercept_errors on; 44 fastcgi_pass php; 45 } 46 46 47 48 49 50 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 } 52 52 53 54 55 56 53 location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ { 54 expires max; 55 log_not_found off; 56 } 57 57 } -
sites/trunk/wordcamp.org/.docker/readme.md
r8833 r8989 5 5 1. Make sure you have Docker installed and Docker daemon running on your system. 6 6 7 1. Clone the repo: 7 1. Clone the repo: 8 8 ``` 9 9 git clone git@github.com:WordPress/wordcamp.org.git … … 28 28 127.0.0.1 2014.new-site.wordcamp.test 29 29 ``` 30 30 31 31 `/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 33 33 **Note:** `https` URL scheme must be used to visit these sites. Security exception will be required in first time run. 34 34 35 35 1. The installation doesn't have any 3rd-party plugins or themes yet, you must add them like so: 36 36 … … 39 39 docker-compose exec wordcamp.test bash 40 40 ``` 41 41 42 42 1. Run predefined command for installing plugins and themes. This could take some time depending on your internet connection: 43 43 ```bash … … 57 57 docker-compose up -d 58 58 ``` 59 59 60 60 here `-d` flags directs docker to run in background. 61 61 62 62 1. To view `nginx` and `php-logs` use: 63 63 ```bash 64 64 docker-compose logs -f --tail=100 wordcamp.test 65 65 ``` 66 67 here 68 66 67 here 68 69 69 `-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 73 73 `wordcamp.test` is the name of the docker service which is running `nginx` and `php` 74 74 75 75 Similarly, to view MySQL server logs (note: this does not show MySQL queries made by application, these are just server logs), use: 76 76 77 77 ```bash 78 78 docker-compose logs -f --tail=100 wordcamp.db 79 79 ``` 80 80 81 81 here 82 82 83 83 `wordcamp.db` is the name of docker service which is running MySQL server. 84 84 … … 88 88 docker-compose exec wordcamp.test bash 89 89 ``` 90 90 91 91 here 92 92 `wordcamp.test` is the name of docker service running `nginx` and `php` 93 93 `bash` is the name of command that we want to execute. This particular command will give us shell access inside the docker. 94 94 95 95 Similarly, for MySQL, you can use: 96 96 97 97 ```bash 98 98 docker-compose exec wordcamp.db bash 99 99 ``` 100 100 101 101 here 102 102 `wordcamp.db` is the name of docker service running MySQL server 103 103 104 104 1. To stop the running docker containers, use the command like so: 105 105 106 106 ```bash 107 107 docker-compose stop 108 108 ``` 109 110 109 110 111 111 Once 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.