Browse Source

+ git aliases in aliases.sh.example

* octobercms webp example nginx config moved to separate file
* use dns placeholder *.local.wpstudio.ru for example naming of local domains in nginx config
* up default nodejs version in env-example to lts/fermium
master
dimti 2 years ago
parent
commit
63500c4fff
  1. 2
      .env.example
  2. 1
      config/nginx/conf.d/.gitignore
  3. 33
      config/nginx/conf.d/vhosts.conf.example
  4. 22
      config/nginx/conf.d/z-octobercmswebp.conf.example
  5. 9
      dockerfiles/workspace/aliases.sh.example

2
.env.example

@ -6,7 +6,7 @@ PROJECTS_DIR=/home/youruser/PhpstormProjects
WORKSPACE_PUID=1000
WORKSPACE_PGID=1000
WORKSPACE_TIMEZONE=Europe/Moscow
WORKSPACE_CUSTOM_NODE_VERSION=lts/erbium
WORKSPACE_CUSTOM_NODE_VERSION=lts/fermium
### PHP-FPM #############################################
INSTALL_REDIS=true

1
config/nginx/conf.d/.gitignore

@ -1 +1,2 @@
*.conf
*.conf.disable

33
config/nginx/conf.d/vhosts.conf.example

@ -7,8 +7,8 @@ upstream php74 {
}
map $http_host $root {
loc.octobercms /usr/share/nginx/html/someproject;
loc.wordpress /usr/share/nginx/html/someprojectwp;
octobercms.ru.local.wpstudio.ru /usr/share/nginx/html/someproject;
wordpress.ru.local.wpstudio.ru /usr/share/nginx/html/someprojectwp;
}
# @see https://github.com/OFFLINE-GmbH/oc-responsive-images-plugin/#responsive-images
@ -19,9 +19,9 @@ map $http_accept $webp_suffix {
server {
server_name
loc.octobercms
octobercms.ru.local.wpstudio.ru
;
listen 80;
listen 80 default;
root $root;
#include global/auth.conf;
#@see https://vcs.wpstudio.ru/wpstudio/nginx-examples
@ -37,37 +37,15 @@ server {
server {
server_name
loc.octobercmswebp
wordpress.ru.local.wpstudio.ru
;
listen 80;
root $root;
include includes.d/octobercms.conf;
include includes.d/offline-webp.conf;
include includes.d/staticfiles.conf;
location = /index.php {
fastcgi_pass php74;
include fastcgi_params;
fastcgi_read_timeout 3000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location = /plugins/offline/responsiveimages/webp.php {
fastcgi_pass php74;
include fastcgi_params;
fastcgi_read_timeout 3000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
server {
server_name loc.wordpress;
listen 80;
root $root;
index index.html index.htm index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
}
@ -81,7 +59,6 @@ server {
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param SERVER_NAME $host;
fastcgi_pass php74;
fastcgi_index index.php;
}

22
config/nginx/conf.d/z-octobercmswebp.conf.example

@ -0,0 +1,22 @@
server {
server_name
octobercmswebp.ru.local.wpstudio.ru
;
listen 80;
root $root;
include includes.d/octobercms.conf;
include includes.d/offline-webp.conf;
include includes.d/staticfiles.conf;
location = /index.php {
fastcgi_pass php74;
include fastcgi_params;
fastcgi_read_timeout 3000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location = /plugins/offline/responsiveimages/webp.php {
fastcgi_pass php74;
include fastcgi_params;
fastcgi_read_timeout 3000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}

9
dockerfiles/workspace/aliases.sh.example

@ -20,4 +20,11 @@ else # macOS `ls`
fi
# Always use color output for `ls`
alias ls="command ls ${colorflag}"
alias ls="command ls ${colorflag}"
alias gst='git status'
alias ga='git add'
alias gc='git commit -m'
alias gush='git push'
alias gull='git pull'
alias gb='git branch'
Loading…
Cancel
Save