Skip to content

Commit 21a5e19

Browse files
committed
remove nginx, will use caddy from astral repo
1 parent f8e1d9e commit 21a5e19

File tree

5 files changed

+8
-297
lines changed

5 files changed

+8
-297
lines changed

templates/terraform/subql/base/bootstrap_nova_subql_provisioner.tf

Lines changed: 4 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,6 @@ resource "null_resource" "setup-nova-blue-subql-nodes" {
6262
destination = "/home/${var.ssh_user}/subql/install_docker.sh"
6363
}
6464

65-
# copy nginx config files
66-
provisioner "file" {
67-
source = "${var.path_to_configs}/nginx-subql.conf"
68-
destination = "/home/${var.ssh_user}/subql/backend.conf"
69-
}
70-
71-
provisioner "file" {
72-
source = "${var.path_to_configs}/cors-settings.conf"
73-
destination = "/home/${var.ssh_user}/subql/cors-settings.conf"
74-
}
75-
# copy nginx install file
76-
provisioner "file" {
77-
source = "${var.path_to_scripts}/install_nginx.sh"
78-
destination = "/home/${var.ssh_user}/subql/install_nginx.sh"
79-
}
80-
8165
}
8266

8367
resource "null_resource" "setup-nova-green-subql-nodes" {
@@ -132,22 +116,6 @@ resource "null_resource" "setup-nova-green-subql-nodes" {
132116
destination = "/home/${var.ssh_user}/subql/install_docker.sh"
133117
}
134118

135-
# copy nginx config files
136-
provisioner "file" {
137-
source = "${var.path_to_configs}/nginx-subql.conf"
138-
destination = "/home/${var.ssh_user}/subql/backend.conf"
139-
}
140-
141-
provisioner "file" {
142-
source = "${var.path_to_configs}/cors-settings.conf"
143-
destination = "/home/${var.ssh_user}/subql/cors-settings.conf"
144-
}
145-
# copy nginx install file
146-
provisioner "file" {
147-
source = "${var.path_to_scripts}/install_nginx.sh"
148-
destination = "/home/${var.ssh_user}/subql/install_nginx.sh"
149-
}
150-
151119
}
152120

153121
resource "null_resource" "start-nova-blue-subql-nodes" {
@@ -174,25 +142,13 @@ resource "null_resource" "start-nova-blue-subql-nodes" {
174142
# install deployments
175143
provisioner "remote-exec" {
176144
inline = [
177-
# install nginx, certbot, docker and docker compose
145+
# install docker and docker compose
178146
"chmod +x /home/${var.ssh_user}/subql/install_docker.sh",
179147
"sudo bash /home/${var.ssh_user}/subql/install_docker.sh",
180148
# start docker daemon
181149
"sudo systemctl enable --now docker.service",
182150
"sudo systemctl restart docker.service",
183-
# copy files
184-
"sudo cp -f /home/${var.ssh_user}/subql/cors-settings.conf /etc/nginx/cors-settings.conf",
185-
"sudo cp -f /home/${var.ssh_user}/subql/backend.conf /etc/nginx/backend.conf",
186-
"chmod +x /home/${var.ssh_user}/subql/install_nginx.sh",
187-
"sudo bash /home/${var.ssh_user}/subql/install_nginx.sh",
188-
# start systemd services
189-
"sudo systemctl daemon-reload",
190-
# start nginx
191-
"sudo systemctl enable nginx",
192-
"sudo systemctl start nginx",
193-
# install certbot & generate domain
194-
"sudo certbot --nginx --non-interactive -v --agree-tos -m [email protected] -d ${var.blue-subql-node-config.domain-prefix}.${var.network_name}.subspace.network",
195-
"sudo systemctl restart nginx",
151+
196152
# set hostname
197153
"sudo hostnamectl set-hostname subql-${var.blue-subql-node-config.network-name}",
198154

@@ -247,25 +203,13 @@ resource "null_resource" "nova-start-green-subql-nodes" {
247203
# install deployments
248204
provisioner "remote-exec" {
249205
inline = [
250-
# install nginx, certbot, docker and docker compose
206+
# install docker and docker compose
251207
"chmod +x /home/${var.ssh_user}/subql/install_docker.sh",
252208
"sudo bash /home/${var.ssh_user}/subql/install_docker.sh",
253209
# start docker daemon
254210
"sudo systemctl enable --now docker.service",
255211
"sudo systemctl restart docker.service",
256-
# copy files
257-
"sudo cp -f /home/${var.ssh_user}/subql/cors-settings.conf /etc/nginx/cors-settings.conf",
258-
"sudo cp -f /home/${var.ssh_user}/subql/backend.conf /etc/nginx/backend.conf",
259-
"chmod +x /home/${var.ssh_user}/subql/install_nginx.sh",
260-
"sudo bash /home/${var.ssh_user}/subql/install_nginx.sh",
261-
# start systemd services
262-
"sudo systemctl daemon-reload",
263-
# start nginx
264-
"sudo systemctl enable nginx",
265-
"sudo systemctl start nginx",
266-
# install certbot & generate domain
267-
"sudo certbot --nginx --non-interactive -v --agree-tos -m [email protected] -d subql.${var.network_name}.subspace.network -d ${var.green-subql-node-config.domain-prefix}.${var.network_name}.subspace.network",
268-
"sudo systemctl restart nginx",
212+
269213
# set hostname
270214
"sudo hostnamectl set-hostname subql-${var.green-subql-node-config.deployment-color}-${var.green-subql-node-config.network-name}",
271215

templates/terraform/subql/base/bootstrap_subql_provisioner.tf

Lines changed: 4 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,6 @@ resource "null_resource" "setup-blue-subql-nodes" {
6262
destination = "/home/${var.ssh_user}/subql/install_docker.sh"
6363
}
6464

65-
# copy nginx config files
66-
provisioner "file" {
67-
source = "${var.path_to_configs}/nginx-subql.conf"
68-
destination = "/home/${var.ssh_user}/subql/backend.conf"
69-
}
70-
71-
provisioner "file" {
72-
source = "${var.path_to_configs}/cors-settings.conf"
73-
destination = "/home/${var.ssh_user}/subql/cors-settings.conf"
74-
}
75-
# copy nginx install file
76-
provisioner "file" {
77-
source = "${var.path_to_scripts}/install_nginx.sh"
78-
destination = "/home/${var.ssh_user}/subql/install_nginx.sh"
79-
}
80-
8165
}
8266

8367
resource "null_resource" "setup-green-subql-nodes" {
@@ -132,22 +116,6 @@ resource "null_resource" "setup-green-subql-nodes" {
132116
destination = "/home/${var.ssh_user}/subql/install_docker.sh"
133117
}
134118

135-
# copy nginx config files
136-
provisioner "file" {
137-
source = "${var.path_to_configs}/nginx-subql.conf"
138-
destination = "/home/${var.ssh_user}/subql/backend.conf"
139-
}
140-
141-
provisioner "file" {
142-
source = "${var.path_to_configs}/cors-settings.conf"
143-
destination = "/home/${var.ssh_user}/subql/cors-settings.conf"
144-
}
145-
# copy nginx install file
146-
provisioner "file" {
147-
source = "${var.path_to_scripts}/install_nginx.sh"
148-
destination = "/home/${var.ssh_user}/subql/install_nginx.sh"
149-
}
150-
151119
}
152120

153121
resource "null_resource" "start-blue-subql-nodes" {
@@ -174,25 +142,13 @@ resource "null_resource" "start-blue-subql-nodes" {
174142
# install deployments
175143
provisioner "remote-exec" {
176144
inline = [
177-
# install nginx, certbot, docker and docker compose
145+
# install docker and docker compose
178146
"chmod +x /home/${var.ssh_user}/subql/install_docker.sh",
179147
"sudo bash /home/${var.ssh_user}/subql/install_docker.sh",
180148
# start docker daemon
181149
"sudo systemctl enable --now docker.service",
182150
"sudo systemctl restart docker.service",
183-
# copy files
184-
"sudo cp -f /home/${var.ssh_user}/subql/cors-settings.conf /etc/nginx/cors-settings.conf",
185-
"sudo cp -f /home/${var.ssh_user}/subql/backend.conf /etc/nginx/backend.conf",
186-
"chmod +x /home/${var.ssh_user}/subql/install_nginx.sh",
187-
"sudo bash /home/${var.ssh_user}/subql/install_nginx.sh",
188-
# start systemd services
189-
"sudo systemctl daemon-reload",
190-
# start nginx
191-
"sudo systemctl enable nginx",
192-
"sudo systemctl start nginx",
193-
# install certbot & generate domain
194-
"sudo certbot --nginx --non-interactive -v --agree-tos -m [email protected] -d ${var.blue-subql-node-config.domain-prefix}.${var.network_name}.subspace.network",
195-
"sudo systemctl restart nginx",
151+
196152
# set hostname
197153
"sudo hostnamectl set-hostname subql-${var.blue-subql-node-config.deployment-color}-${var.blue-subql-node-config.network-name}",
198154

@@ -248,25 +204,13 @@ resource "null_resource" "start-green-subql-nodes" {
248204
# install deployments
249205
provisioner "remote-exec" {
250206
inline = [
251-
# install nginx, certbot, docker and docker compose
207+
# install docker and docker compose
252208
"chmod +x /home/${var.ssh_user}/subql/install_docker.sh",
253209
"sudo bash /home/${var.ssh_user}/subql/install_docker.sh",
254210
# start docker daemon
255211
"sudo systemctl enable --now docker.service",
256212
"sudo systemctl restart docker.service",
257-
# copy files
258-
"sudo cp -f /home/${var.ssh_user}/subql/cors-settings.conf /etc/nginx/cors-settings.conf",
259-
"sudo cp -f /home/${var.ssh_user}/subql/backend.conf /etc/nginx/backend.conf",
260-
"chmod +x /home/${var.ssh_user}/subql/install_nginx.sh",
261-
"sudo bash /home/${var.ssh_user}/subql/install_nginx.sh",
262-
# start systemd services
263-
"sudo systemctl daemon-reload",
264-
# start nginx
265-
"sudo systemctl enable nginx",
266-
"sudo systemctl start nginx",
267-
# install certbot & generate domain
268-
"sudo certbot --nginx --non-interactive -v --agree-tos -m [email protected] -d subql.${var.network_name}.subspace.network -d ${var.green-subql-node-config.domain-prefix}.${var.network_name}.subspace.network",
269-
"sudo systemctl restart nginx",
213+
270214
# set hostname
271215
"sudo hostnamectl set-hostname subql-${var.green-subql-node-config.deployment-color}-${var.green-subql-node-config.network-name}",
272216

templates/terraform/subql/base/config/cors-settings.conf

Lines changed: 0 additions & 41 deletions
This file was deleted.

templates/terraform/subql/base/config/nginx-subql.conf

Lines changed: 0 additions & 24 deletions
This file was deleted.

templates/terraform/subql/base/scripts/install_nginx.sh

Lines changed: 0 additions & 112 deletions
This file was deleted.

0 commit comments

Comments
 (0)