These scripts can be used to set up automic deployments in runcloud for laravel applications
0.In my 0th vps (for example Oracle Cloud free tier VPS, ubuntu 20.04, it allow me to create 2 free vps servers): | |
#sudo apt install tailscale(ref: https://tailscale.com/kb/1039/install-ubuntu-2004/) | |
wget https://pkgs.tailscale.com/stable/tailscale_1.38.4_amd64.tgz | |
tar zxvf tailscale_1.38.4_amd64.tgz | |
sudo cp tailscale_1.38.4_amd64/tailscale* /usr/bin/ | |
rm -rf tailscale_1.38.4_amd64* | |
sudo tailscale up //copy the showed url and authorize google sign-in in the web browser | |
ip addr show tailscale0 //for example: 100.71.153.9 | |
1. In my 1st vps(in china, for example my linux PC in my home): |
This note describes how to connect two networks/devices/VMs over public network using Wireguard with Layer 2 support (ARP, IPv6 link-local, etc).
This can also be achieved using SSH and its "tap" tunnel, however, it does not provide the same level of latency and bandwidth as full-blown VPN such as Wireguard.
In addition, this note describes how to tunnel Wireguard over TCP connection. This may be of use if you encounter firewall in-between so, for instance, you can use TCP port 443 only.
# wget -q https://gist.githubusercontent.com/amanjuman/8ad9e374cb970a352d08b950e3d3dbef/raw/ddf53d463c80dfe76f7594b3bb3a58df63cd2aad/default -O /etc/nginx/sites-available/default | |
server | |
{ | |
server_name ""; | |
listen 80 default_server; | |
listen [::]:80 default_server; | |
#listen 443 ssl http2 default_server; | |
#listen [::]:443 ssl http2 default_server; | |
# Generate Self-Signed-SSL |
30 0 * * * root /usr/local/bin/sendy-backup > /dev/null 2>&1 |
router id [our IPv4]; | |
protocol bgp vultr | |
{ | |
local as [our ASN]; | |
source address [our IPv4 from vultr]; | |
import all; | |
export filter { | |
if net ~ [[the IPv4 block we want to announce]] then accept; | |
reject; |
# blog post: https://echorand.me/nginx-and-geoip2.html | |
worker_processes auto; | |
daemon off; | |
error_log /dev/stdout warn; | |
include /etc/nginx/modules/*.conf; | |
load_module modules/ngx_http_geoip2_module.so; | |
events { | |
} |
-
Follow https://www.digitalocean.com/community/tutorials/how-to-install-linux-nginx-mysql-php-lemp-stack-in-ubuntu-16-04 up to step 3
-
Install WP https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-lamp-on-ubuntu-18-04
-
Create wordpress.conf in /etc/nginx/sites-avaiable:
server {
listen 8080;
listen [::]:8080;
#!/bin/bash | |
TOKEN="xxxxxxxxxxxxxxxxxxx" | |
ZONE_ID=2222222222222222222222222 | |
# EMAIL=me@gmail.com | |
# KEY=11111111111111111111111111 | |
# Replace with | |
# -H "X-Auth-Email: ${EMAIL}" \ | |
# -H "X-Auth-Key: ${KEY}" \ |
#!/usr/bin/env bash | |
# Enter your license key below | |
license_key=XXXXXXXXXXXXXXXXX | |
curl -O -J -L 'https://sendy.co/download/?license=${license_key}' | |
filename=$(basename -- sendy-*.zip) | |
newdir="${filename%.*}" | |
echo ${newdir} |