Skip to content

Commit

Permalink
migrating IP addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
DeviaVir committed Aug 21, 2024
1 parent ec805c8 commit 02ceae3
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 102 deletions.
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MODE=$2

SYNC_SECRET=$4
SYNC_SOURCE=$5
NGINX_GCLB_IP=${NGINX_GCLB_IP:-35.201.74.156} # bs.info
NGINX_GCLB_IP=${NGINX_GCLB_IP:-34.36.36.12} # bs.info

if [ -z "$FLAVOR" ] || [ ! -d /srv/explorer/static/$FLAVOR ]; then
echo "Please provide bitcoin-mainnet, bitcoin-testnet, bitcoin-signet, bitcoin-regtest, liquid-mainnet, liquid-testnet or liquid-regtest as a parameter"
Expand Down
201 changes: 100 additions & 101 deletions terraform/modules/electrum/cloud-init/electrum.yml
Original file line number Diff line number Diff line change
@@ -1,116 +1,115 @@
users:
- name: bs
uid: 2000
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGyjuWQbImwoEG4jZQnRpzIwU4WJpcyukmJRUBhzPnNL lnahum@mule
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIECdkKWUa+1PfX+ougqDw3lRGAsrWDLYqIzxdq0FLaYZ nadav@pc
- name: bs
uid: 2000
ssh_authorized_keys:
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGyjuWQbImwoEG4jZQnRpzIwU4WJpcyukmJRUBhzPnNL lnahum@mule
- ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIECdkKWUa+1PfX+ougqDw3lRGAsrWDLYqIzxdq0FLaYZ nadav@pc

write_files:
- path: /etc/nginx/conf.d/electrs.conf
permissions: 0644
owner: root
content: |
upstream testnet_tcp {
server 35.201.74.156:143;
server 35.190.42.111:143;
}
upstream testnet_tls {
server 35.201.74.156:993;
}
- path: /etc/nginx/conf.d/electrs.conf
permissions: 0644
owner: root
content: |
upstream testnet_tcp {
server 34.36.36.12:143;
server 35.190.42.111:143;
}
upstream testnet_tls {
server 34.36.36.12:993;
}
upstream mainnet_tcp {
server 35.201.74.156:110;
server 35.190.42.111:110;
}
upstream mainnet_tls {
server 35.201.74.156:700;
}
upstream mainnet_tcp {
server 34.36.36.12:110;
server 35.190.42.111:110;
}
upstream mainnet_tls {
server 34.36.36.12:700;
}
upstream liquid_mainnet_tcp {
server 35.201.74.156:195;
server 35.190.42.111:195;
}
upstream liquid_mainnet_tls {
server 35.201.74.156:995;
}
upstream liquid_mainnet_tcp {
server 34.36.36.12:195;
server 35.190.42.111:195;
}
upstream liquid_mainnet_tls {
server 34.36.36.12:995;
}
upstream liquid_testnet_tcp {
server 35.201.74.156:587;
server 35.190.42.111:587;
}
upstream liquid_testnet_tls {
server 35.201.74.156:465;
}
upstream liquid_testnet_tcp {
server 34.36.36.12:587;
server 35.190.42.111:587;
}
upstream liquid_testnet_tls {
server 34.36.36.12:465;
}
server {
listen 50401;
listen [::]:50401;
proxy_pass liquid_mainnet_tcp;
}
server {
listen 50402;
listen [::]:50402;
proxy_pass liquid_mainnet_tls;
ssl_preread on;
}
server {
listen 50401;
listen [::]:50401;
proxy_pass liquid_mainnet_tcp;
}
server {
listen 50402;
listen [::]:50402;
proxy_pass liquid_mainnet_tls;
ssl_preread on;
}
server {
listen 50001;
listen [::]:50001;
proxy_pass mainnet_tcp;
}
server {
listen 50002;
listen [::]:50002;
proxy_pass mainnet_tls;
ssl_preread on;
}
server {
listen 50001;
listen [::]:50001;
proxy_pass mainnet_tcp;
}
server {
listen 50002;
listen [::]:50002;
proxy_pass mainnet_tls;
ssl_preread on;
}
server {
listen 60001;
listen [::]:60001;
proxy_pass testnet_tcp;
}
server {
listen 60002;
listen [::]:60002;
proxy_pass testnet_tls;
ssl_preread on;
}
server {
listen 60001;
listen [::]:60001;
proxy_pass testnet_tcp;
}
server {
listen 60002;
listen [::]:60002;
proxy_pass testnet_tls;
ssl_preread on;
}
server {
listen 60401;
listen [::]:60401;
proxy_pass liquid_testnet_tcp;
}
server {
listen 60402;
listen [::]:60402;
proxy_pass liquid_testnet_tls;
ssl_preread on;
}
server {
listen 60401;
listen [::]:60401;
proxy_pass liquid_testnet_tcp;
}
server {
listen 60402;
listen [::]:60402;
proxy_pass liquid_testnet_tls;
ssl_preread on;
}
- path: /etc/nginx/nginx.conf
permissions: 0644
owner: root
content: |
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
- path: /etc/nginx/nginx.conf
permissions: 0644
owner: root
content: |
user www-data;
worker_processes auto;
pid /run/nginx.pid;
include /etc/nginx/modules-enabled/*.conf;
events {
worker_connections 768;
# multi_accept on;
}
stream {
include /etc/nginx/conf.d/*.conf;
}
events {
worker_connections 768;
# multi_accept on;
}
stream {
include /etc/nginx/conf.d/*.conf;
}
runcmd:
- apt-get update
- apt-get install -qfy tor nginx
- systemctl enable --now tor
- systemctl enable --now nginx
- apt-get update
- apt-get install -qfy tor nginx
- systemctl enable --now tor
- systemctl enable --now nginx

0 comments on commit 02ceae3

Please sign in to comment.