refact(devops): change folders path + clean unused code and files
This commit is contained in:
parent
0245b5fb0b
commit
a6879f3849
|
|
@ -194,8 +194,8 @@ Currently, telecommunications giants and startups, publishing new software daily
|
|||
<h4>Developer:</h4>
|
||||
Run app using Docker:
|
||||
<pre>
|
||||
user@user-laptop:~$ cd oktopus/devops
|
||||
user@user-laptop:~/oktopus/devops$ docker compose up
|
||||
user@user-laptop:~$ cd oktopus/deploy/compose
|
||||
user@user-laptop:~/oktopus/deploy/compose$ docker compose up
|
||||
</pre>
|
||||
</li>
|
||||
<li>
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
module.exports = {
|
||||
apps: [
|
||||
{
|
||||
name: 'oktopus',
|
||||
env: {
|
||||
NEXT_PUBLIC_REST_ENPOINT: 'https://oktopus.ifsc.digital:8000'
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
wcorr=68 # manual fix for vertical panels
|
||||
hcorr=26 # manual fix for horizontal panels
|
||||
|
||||
|
||||
tmps=$(LANG=C xrandr|grep -om1 'current.*,')
|
||||
tmps=${tmps/,}
|
||||
tmps=${tmps/current }
|
||||
echo "screen resolution = $tmps pixels"
|
||||
wscr=${tmps/ x*}
|
||||
hscr=${tmps/*x }
|
||||
wter=$(( (wscr-wcorr)/2 ))
|
||||
hter=$(( (hscr-hcorr)/2 ))
|
||||
echo "terminal width = $wter pixels"
|
||||
echo "terminal height = $hter pixels"
|
||||
|
||||
terminator --geometry="${wter}x${hter}+0-0" -x bash run1.sh &
|
||||
terminator --geometry="${wter}x${hter}+0-0" -x bash run2.sh &
|
||||
terminator --geometry="${wter}x${hter}+0-0" -x bash run3.sh &
|
||||
terminator --geometry="${wter}x${hter}+0-0" -x bash run4.sh &
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $HOME/dev/oktopus/backend/services/mochi
|
||||
go run cmd/main.go
|
||||
echo ""
|
||||
bash
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $HOME/dev/oktopus/backend/services/controller
|
||||
go run cmd/oktopus/main.go -u root -P root -mongo mongodb://172.16.238.3:27017
|
||||
echo ""
|
||||
bash
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $HOME/dev/oktopus/frontend/
|
||||
npm run dev
|
||||
echo ""
|
||||
bash
|
||||
|
|
@ -1,6 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd $HOME/dev/oktopus/backend/services/socketio
|
||||
npm start
|
||||
echo ""
|
||||
bash
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
# For more information on configuration, see:
|
||||
# * Official English Documentation: http://nginx.org/en/docs/
|
||||
# * Official Russian Documentation: http://nginx.org/ru/docs/
|
||||
|
||||
user nginx;
|
||||
worker_processes auto;
|
||||
error_log /var/log/nginx/error.log notice;
|
||||
pid /run/nginx.pid;
|
||||
|
||||
# Load dynamic modules. See /usr/share/doc/nginx/README.dynamic.
|
||||
include /usr/share/nginx/modules/*.conf;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
keepalive_timeout 65;
|
||||
types_hash_max_size 4096;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
# Load modular configuration files from the /etc/nginx/conf.d directory.
|
||||
# See http://nginx.org/en/docs/ngx_core_module.html#include
|
||||
# for more information.
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
|
||||
server {
|
||||
if ($host = oktopus.app.br) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name oktopus.app.br;
|
||||
return 404;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name oktopus.app.br;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
# Load configuration files for the default server block.
|
||||
include /etc/nginx/default.d/*.conf;
|
||||
|
||||
ssl_certificate "/etc/letsencrypt/live/oktopus.app.br/fullchain.pem";
|
||||
ssl_certificate_key "/etc/letsencrypt/live/oktopus.app.br/privkey.pem";
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 10m;
|
||||
ssl_ciphers HIGH:!aNULL:!MD5;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3001;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
}
|
||||
}
|
||||
|
||||
server {
|
||||
if ($host = oktopustr369.com) {
|
||||
return 301 https://$host$request_uri;
|
||||
}
|
||||
listen 80;
|
||||
listen [::]:80;
|
||||
server_name oktopustr369.com;
|
||||
return 404;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 443 ssl http2;
|
||||
listen [::]:443 ssl http2;
|
||||
server_name oktopustr369.com;
|
||||
root /usr/share/nginx/html;
|
||||
|
||||
# Load configuration files for the default server block.
|
||||
include /etc/nginx/default.d/*.conf;
|
||||
|
||||
ssl_certificate "/etc/letsencrypt/live/oktopustr369.com/fullchain.pem";
|
||||
ssl_certificate_key "/etc/letsencrypt/live/oktopustr369.com/privkey.pem";
|
||||
ssl_session_cache shared:SSL:1m;
|
||||
ssl_session_timeout 10m;
|
||||
ssl_ciphers PROFILE=SYSTEM;
|
||||
ssl_prefer_server_ciphers on;
|
||||
|
||||
error_page 404 /404.html;
|
||||
location = /404.html {
|
||||
}
|
||||
|
||||
location / {
|
||||
proxy_pass http://127.0.0.1:3000;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
location /api {
|
||||
proxy_pass http://127.0.0.1:8001;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
location /socket.io {
|
||||
proxy_pass http://127.0.0.1:5000;
|
||||
proxy_read_timeout 60;
|
||||
proxy_connect_timeout 60;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the use of websockets
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection 'upgrade';
|
||||
proxy_set_header Host $host;
|
||||
proxy_cache_bypass $http_upgrade;
|
||||
}
|
||||
|
||||
error_page 500 502 503 504 /50x.html;
|
||||
location = /50x.html {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=TR-369 Controller
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/controller -u 'root' -P '<password to broker>' -mongo '<mongoDB address>' -ap 8001
|
||||
|
||||
Restart=always
|
||||
RestartSec=4
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=Mochi broker
|
||||
|
||||
[Service]
|
||||
ExecStart=/usr/bin/mochi -path /home/ec2-user/oktopus/backend/services/mochi/cmd/auth.prod.json -full_chain_path /etc/letsencrypt/live/oktopus.ifsc.digital/fullchain.pem -private_key_path /etc/letsencrypt/live/oktopus.ifsc.digital/privkey.pem -redis ""
|
||||
|
||||
Restart=always
|
||||
RestartSec=4
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[Unit]
|
||||
Description=Socketio Server
|
||||
|
||||
[Service]
|
||||
ExecStart=/home/ec2-user/.nvm/versions/node/v20.1.0/bin/node /home/ec2-user/oktopus/backend/services/socketio/server.js
|
||||
|
||||
Restart=always
|
||||
RestartSec=4
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Loading…
Reference in New Issue
Block a user