This manual is about setting up an automatic deploy workflow using nodejs, PM2, nginx and GitLab CI. It is tested on:
- Target server: Ubuntu 16.04 x64. This is suitable for Ubuntu 14.x.
- Windows 10 on my PC to work.
| <?php | |
| namespace App\Livewire; | |
| use Livewire\Attributes\Url; | |
| use Livewire\Component; | |
| use WP_Query; | |
| class PostSearch extends Component | |
| { |
| FROM php:7.4-fpm | |
| RUN apt-get update && apt-get install -y libldb-dev libldap2-dev libzip-dev libpng-dev libjpeg62-turbo-dev libfreetype6-dev \ | |
| && docker-php-ext-configure gd --with-freetype=/usr/include/ --with-jpeg=/usr/include/ \ | |
| && docker-php-ext-install -j$(nproc) zip pdo pdo_mysql gd ldap pcntl opcache |
| {{-- | |
| Title: Témoignage | |
| Description: test | |
| Category: formatting | |
| Icon: admin-comments | |
| Keywords: testimonial quote | |
| --}} | |
| <blockquote data-{{$block['id']}} class="{{$block['classes']}}"> | |
| <p>{{the_field('testimonial')}}</p> |
| # Use envFrom to load Secrets and ConfigMaps into environment variables | |
| apiVersion: apps/v1beta2 | |
| kind: Deployment | |
| metadata: | |
| name: mans-not-hot | |
| labels: | |
| app: mans-not-hot | |
| spec: | |
| replicas: 1 |
| <?php | |
| // NOTE: It would normally be recommended to split a block's JavaScript | |
| // implementation to a separate file, but is authored here in a single | |
| // file for convenience's sake. | |
| // | |
| // See: https://github.com/WordPress/gutenberg/pull/2791 | |
| /** | |
| * Plugin Name: Stars Block |
| image: docker.mydomain.com/build/kube-go-make | |
| variables: | |
| DOCKER_TAG: docker.mydomain.com/myapp/home:$CI_COMMIT_REF_SLUG | |
| DOCKER_HOST: tcp://localhost:2375 | |
| DOCKER_DRIVER: overlay | |
| PROD_RSYNC_HOST: myprodserver.com | |
| DOMAIN: mydomain.com | |
| CHART_DIR: chart |
| #!/bin/bash | |
| # export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me | |
| PID=$(pgrep -u USER gnome-session-b) | |
| export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-) | |
| /usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat' | |
| /usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat' | |
| /usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH' | |
| /usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected] set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)' |
| :80 | |
| root /usr/src/wordpress | |
| gzip | |
| fastcgi / wordpress:9000 php | |
| rewrite { | |
| if {path} not_match ^\/wp-admin | |
| to {path} {path}/ /index.php?_url={uri} | |
| } | |
| log stdout | |
| errors stderr |
| #!/bin/bash | |
| set -eu | |
| # Similar to git branch --merged but looks at commit author, date and | |
| # subject, instead of hash. | |
| # | |
| # Given branch/ref (e.g. my_branch) and target (e.g. origin/master), | |
| # lists commits in branch that have no "equivalent" ones in target (by | |
| # author, date and message). |