Commit
This commit is contained in:
279
.bash_history
Normal file
279
.bash_history
Normal file
@@ -0,0 +1,279 @@
|
|||||||
|
ls
|
||||||
|
cd .git
|
||||||
|
ls
|
||||||
|
cd ..
|
||||||
|
rm -rf .git
|
||||||
|
ls
|
||||||
|
nano .gitignoree
|
||||||
|
nano .gitignore
|
||||||
|
git init
|
||||||
|
git remote add origin https://github.com/LukeGus/ssh-project.git
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
git push -u origin master
|
||||||
|
git removpe .
|
||||||
|
git remove .
|
||||||
|
git push -u origin master
|
||||||
|
git reset
|
||||||
|
git reset --soft HEAD~1
|
||||||
|
git reset HEAD~1
|
||||||
|
git reset --hard HEAD~1
|
||||||
|
git add .
|
||||||
|
git push -u origin master
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
git push -u origin main
|
||||||
|
git push -u origin master
|
||||||
|
git reset
|
||||||
|
git clean -fd
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
git push -u origin master
|
||||||
|
git reset
|
||||||
|
git clean -fd
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
git push -u origin master
|
||||||
|
git reset
|
||||||
|
git clean -fd
|
||||||
|
git add .
|
||||||
|
git push -u origin master
|
||||||
|
git reset
|
||||||
|
git clean -fd
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
git push -u origin master
|
||||||
|
git reset
|
||||||
|
git clean -fd
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
git push -u origin master
|
||||||
|
git rm --cached .vscode-server/cli/servers/Stable-f1a4fb101478ce6ec82fe9627c43efbf9e98c813/server/node
|
||||||
|
git commit -m "Remove large file from Git history"
|
||||||
|
git push -u origin master
|
||||||
|
git ls-files .vscode-server/
|
||||||
|
git rm --cached .vscode-server
|
||||||
|
git rm -r --cached .vscode-server
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial Commit"
|
||||||
|
git push -f
|
||||||
|
git push -u origin master
|
||||||
|
git rm --cached .vscode-server/cli/servers/Stable-f1a4fb101478ce6ec82fe9627c43efbf9e98c813/server/node
|
||||||
|
git rm --cached .cache/code-server/code-server-4.95.3-linux-amd64.tar.gz
|
||||||
|
git commit -m "Remove large files from Git history"
|
||||||
|
git push origin master
|
||||||
|
sudo apt install git-filter-repo
|
||||||
|
ls
|
||||||
|
rm .git
|
||||||
|
rm -rf .git
|
||||||
|
sudo apt remove git
|
||||||
|
apt update
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install git
|
||||||
|
git init
|
||||||
|
git remote add origin https://github.com/LukeGus/ssh-project.git
|
||||||
|
git add .
|
||||||
|
git commit -m "Initial commit"
|
||||||
|
git push -u origin master
|
||||||
|
git push -u origin main
|
||||||
|
git checkout main
|
||||||
|
git push origin main
|
||||||
|
git push --set-upstream origin main
|
||||||
|
git push origin master
|
||||||
|
git branch -m master main
|
||||||
|
git push -u origin main
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git pull
|
||||||
|
git add .
|
||||||
|
git commit -m "Test"
|
||||||
|
<<<<<<< HEAD
|
||||||
|
<<<<<<< HEAD
|
||||||
|
ls
|
||||||
|
cd /home/bugattiguy527
|
||||||
|
ls
|
||||||
|
pwd
|
||||||
|
ls
|
||||||
|
cd /docker
|
||||||
|
ls
|
||||||
|
cd docker
|
||||||
|
ls
|
||||||
|
docker-compose build
|
||||||
|
docker compose
|
||||||
|
docker
|
||||||
|
sudo update
|
||||||
|
sudo apt update
|
||||||
|
sudo apt updrade
|
||||||
|
sudo apt upgrade
|
||||||
|
docker
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install ca-certificates curl
|
||||||
|
sudo install -m 0755 -d /etc/apt/keyrings
|
||||||
|
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
|
||||||
|
sudo chmod a+r /etc/apt/keyrings/docker.asc
|
||||||
|
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
|
||||||
|
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||||
|
sudo apt-get update
|
||||||
|
docker-compose build
|
||||||
|
docker compose build
|
||||||
|
sudo dockere compose build
|
||||||
|
sudo docker compose build
|
||||||
|
sudo systemctl start docker
|
||||||
|
ps -p 1 -o comm=
|
||||||
|
sudo dockerd &
|
||||||
|
docker-compose build
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git pull
|
||||||
|
git aadd .
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git pull
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
ls
|
||||||
|
cd ..
|
||||||
|
ls
|
||||||
|
cd src
|
||||||
|
ls
|
||||||
|
cd components
|
||||||
|
ls
|
||||||
|
node server.js
|
||||||
|
apt install node
|
||||||
|
sudo su
|
||||||
|
apt install node
|
||||||
|
node server.js
|
||||||
|
git a dd .
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git add .
|
||||||
|
git push
|
||||||
|
git pull
|
||||||
|
git reset
|
||||||
|
git reset --soft HEAD~2
|
||||||
|
git push
|
||||||
|
git add .
|
||||||
|
git pull
|
||||||
|
git commit -m "Commit"
|
||||||
|
git add .
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit:
|
||||||
|
git commit -m "Commit"
|
||||||
|
git add .
|
||||||
|
git push
|
||||||
|
git pull
|
||||||
|
gitt add .
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git status
|
||||||
|
git fetch
|
||||||
|
git pull
|
||||||
|
git rm --cached -r .
|
||||||
|
git reset --hard
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git reeset --hhard
|
||||||
|
git reeset --hard
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git reset --hard
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git push origin main
|
||||||
|
ls
|
||||||
|
cd ~
|
||||||
|
ls
|
||||||
|
rm -rf .git
|
||||||
|
apt remove git
|
||||||
|
sudo apt remove git
|
||||||
|
apt install git
|
||||||
|
sudo apt install git
|
||||||
|
git init
|
||||||
|
git remote add origin https://github.com/LukeGus/ssh-project.git
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git branch -m master main
|
||||||
|
git push -u origin main
|
||||||
|
git push
|
||||||
|
git pull
|
||||||
|
git push
|
||||||
|
git push --set-upstream origin main
|
||||||
|
git pull origin main --rebase
|
||||||
|
git pull origin main
|
||||||
|
git status
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git pushh
|
||||||
|
git push
|
||||||
|
git push origin HEAD:main
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push -f
|
||||||
|
git push origin HEAD:main -f
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git reset
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push
|
||||||
|
git push origin HEAD:main
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push origin HEAD:main
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push origin HEAD:main
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push origin HEAD:main
|
||||||
|
git add .
|
||||||
|
git commit -m "Commit"
|
||||||
|
git push origin HEAD:main
|
||||||
|
=======
|
||||||
|
>>>>>>> fc03385d60aedd35d147f7af3ce97533fa67a8d7
|
||||||
|
=======
|
||||||
|
>>>>>>> fc03385d60aedd35d147f7af3ce97533fa67a8d7
|
||||||
7
.bash_logout
Normal file
7
.bash_logout
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
# ~/.bash_logout: executed by bash(1) when login shell exits.
|
||||||
|
|
||||||
|
# when leaving the console clear the screen to increase privacy
|
||||||
|
|
||||||
|
if [ "$SHLVL" = 1 ]; then
|
||||||
|
[ -x /usr/bin/clear_console ] && /usr/bin/clear_console -q
|
||||||
|
fi
|
||||||
117
.bashrc
Normal file
117
.bashrc
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
# ~/.bashrc: executed by bash(1) for non-login shells.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
|
||||||
|
# for examples
|
||||||
|
|
||||||
|
# If not running interactively, don't do anything
|
||||||
|
case $- in
|
||||||
|
*i*) ;;
|
||||||
|
*) return;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# don't put duplicate lines or lines starting with space in the history.
|
||||||
|
# See bash(1) for more options
|
||||||
|
HISTCONTROL=ignoreboth
|
||||||
|
|
||||||
|
# append to the history file, don't overwrite it
|
||||||
|
shopt -s histappend
|
||||||
|
|
||||||
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
|
HISTSIZE=1000
|
||||||
|
HISTFILESIZE=2000
|
||||||
|
|
||||||
|
# check the window size after each command and, if necessary,
|
||||||
|
# update the values of LINES and COLUMNS.
|
||||||
|
shopt -s checkwinsize
|
||||||
|
|
||||||
|
# If set, the pattern "**" used in a pathname expansion context will
|
||||||
|
# match all files and zero or more directories and subdirectories.
|
||||||
|
#shopt -s globstar
|
||||||
|
|
||||||
|
# make less more friendly for non-text input files, see lesspipe(1)
|
||||||
|
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||||
|
|
||||||
|
# set variable identifying the chroot you work in (used in the prompt below)
|
||||||
|
if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
|
||||||
|
debian_chroot=$(cat /etc/debian_chroot)
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set a fancy prompt (non-color, unless we know we "want" color)
|
||||||
|
case "$TERM" in
|
||||||
|
xterm-color|*-256color) color_prompt=yes;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# uncomment for a colored prompt, if the terminal has the capability; turned
|
||||||
|
# off by default to not distract the user: the focus in a terminal window
|
||||||
|
# should be on the output of commands, not on the prompt
|
||||||
|
#force_color_prompt=yes
|
||||||
|
|
||||||
|
if [ -n "$force_color_prompt" ]; then
|
||||||
|
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
|
||||||
|
# We have color support; assume it's compliant with Ecma-48
|
||||||
|
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
|
||||||
|
# a case would tend to support setf rather than setaf.)
|
||||||
|
color_prompt=yes
|
||||||
|
else
|
||||||
|
color_prompt=
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$color_prompt" = yes ]; then
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
|
||||||
|
else
|
||||||
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
fi
|
||||||
|
unset color_prompt force_color_prompt
|
||||||
|
|
||||||
|
# If this is an xterm set the title to user@host:dir
|
||||||
|
case "$TERM" in
|
||||||
|
xterm*|rxvt*)
|
||||||
|
PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# enable color support of ls and also add handy aliases
|
||||||
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
#alias dir='dir --color=auto'
|
||||||
|
#alias vdir='vdir --color=auto'
|
||||||
|
|
||||||
|
alias grep='grep --color=auto'
|
||||||
|
alias fgrep='fgrep --color=auto'
|
||||||
|
alias egrep='egrep --color=auto'
|
||||||
|
fi
|
||||||
|
|
||||||
|
# colored GCC warnings and errors
|
||||||
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
|
# some more ls aliases
|
||||||
|
alias ll='ls -alF'
|
||||||
|
alias la='ls -A'
|
||||||
|
alias l='ls -CF'
|
||||||
|
|
||||||
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
|
# sleep 10; alert
|
||||||
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
|
|
||||||
|
# Alias definitions.
|
||||||
|
# You may want to put all your additions into a separate file like
|
||||||
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
|
if [ -f ~/.bash_aliases ]; then
|
||||||
|
. ~/.bash_aliases
|
||||||
|
fi
|
||||||
|
|
||||||
|
# enable programmable completion features (you don't need to enable
|
||||||
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
|
# sources /etc/bash.bashrc).
|
||||||
|
if ! shopt -oq posix; then
|
||||||
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||||
|
. /usr/share/bash-completion/bash_completion
|
||||||
|
elif [ -f /etc/bash_completion ]; then
|
||||||
|
. /etc/bash_completion
|
||||||
|
fi
|
||||||
|
fi
|
||||||
4
.config/code-server/config.yaml
Normal file
4
.config/code-server/config.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
bind-addr: 127.0.0.1:8080
|
||||||
|
auth: password
|
||||||
|
password: 704cd31bbfead3cfadb5cbb7
|
||||||
|
cert: false
|
||||||
11
.config/ngrok/multi-tunnel-ngrok.yml
Normal file
11
.config/ngrok/multi-tunnel-ngrok.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
version: 2
|
||||||
|
authtoken: 2H3ZoIoYvRBckudPKvb7iyNvTgW_48SFniUxViJjuvcUvr1tA
|
||||||
|
tunnels:
|
||||||
|
first:
|
||||||
|
proto: http
|
||||||
|
addr: http://localhost:3000
|
||||||
|
second:
|
||||||
|
proto: tcp
|
||||||
|
addr: 3001
|
||||||
|
|
||||||
3
.config/ngrok/ngrok.yml
Normal file
3
.config/ngrok/ngrok.yml
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
version: "3"
|
||||||
|
agent:
|
||||||
|
authtoken: 2H3ZoIoYvRBckudPKvb7iyNvTgW_48SFniUxViJjuvcUvr1tA
|
||||||
0
.docker/buildx/.lock
Normal file
0
.docker/buildx/.lock
Normal file
1
.docker/buildx/current
Normal file
1
.docker/buildx/current
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"Key":"unix:///var/run/docker.sock","Name":"","Global":false}
|
||||||
18
.dotnet/corefx/cryptography/crls/75d1b2ed.de05bb98.crl
Normal file
18
.dotnet/corefx/cryptography/crls/75d1b2ed.de05bb98.crl
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
-----BEGIN X509 CRL-----
|
||||||
|
MIIC3TCBxgIBATANBgkqhkiG9w0BAQwFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UE
|
||||||
|
ChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYD
|
||||||
|
VQQDExhEaWdpQ2VydCBUcnVzdGVkIFJvb3QgRzQXDTI0MTExOTIxMDg1OVoXDTI0
|
||||||
|
MTIxMDIxMDg1OVqgMDAuMB8GA1UdIwQYMBaAFOzX44LScV1kTN8uZz/nupiuHA9P
|
||||||
|
MAsGA1UdFAQEAgICojANBgkqhkiG9w0BAQwFAAOCAgEASW99eLNOfhm7qGKK7r2I
|
||||||
|
kiK4Rj6+YjmzEDmfCIgoGqbVbEi8IQtQch9Y5xKNX8rgPKdDlfGE03TcgZ6w6ygR
|
||||||
|
cQ62ocVEn5g/ipULaxQaKstyTqSY/3vf19+QYxTGPfcvTwtHgPrevgyqkXvSy+Iu
|
||||||
|
YcRpPX2RfEN5hBeFfhWnlLDj9jbqTtJw1rKzBpfvKZN/6IsxzTtRRdlceClVknyM
|
||||||
|
Ohc2oKAKBs2RKC1UnxgKl5Y30jnWbARiidJY89QaD3YBjFfMYKsRddSjJVR/Vk9I
|
||||||
|
RpkwikER9b1QmMO1kGl2tFr+mbluMCprs4x3C21Bgjllvyfrd/6F1suOx5RiHoeX
|
||||||
|
iokKUH+GCNfJMsMAWAKbE3BoCzdaFrKIyBO9w+0R5HPOJ+DqIGYZgRM5RiK30Rbn
|
||||||
|
ShaPzpU22OUvYcuZGGHa8W5snUlXuFYOzCV6ieEDGthCv9/mM9UyEDpodwYOqjJi
|
||||||
|
zVGHX39p6BhOpLDP5j3j/6kARtFm7yVQ3I5qD2N9CnNZOwErectFCLW50eJW4Oe2
|
||||||
|
N+r8Q0VqkBuf3slyBEfaQrVUAq9wvxn4gGUTd2HU3zhSw+tYkRkh06yBMipMwmf/
|
||||||
|
Z3imZj9ll4mhSpWqRkITKryKgZOwU3vWzngClgITeR1RRi+uMEsnitALzysV+U6B
|
||||||
|
t/uiR5yEPaAniMqIZ5yI7NM=
|
||||||
|
-----END X509 CRL-----
|
||||||
18
.dotnet/corefx/cryptography/crls/bd6662f5.8ba5d856.crl
Normal file
18
.dotnet/corefx/cryptography/crls/bd6662f5.8ba5d856.crl
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
-----BEGIN X509 CRL-----
|
||||||
|
MIIC3jCBxwIBATANBgkqhkiG9w0BAQsFADBjMQswCQYDVQQGEwJVUzEXMBUGA1UE
|
||||||
|
ChMORGlnaUNlcnQsIEluYy4xOzA5BgNVBAMTMkRpZ2lDZXJ0IFRydXN0ZWQgRzQg
|
||||||
|
UlNBNDA5NiBTSEEyNTYgVGltZVN0YW1waW5nIENBFw0yNDExMjUyMzAxMzdaFw0y
|
||||||
|
NDEyMDIyMzAxMzdaoDAwLjAfBgNVHSMEGDAWgBS6FtltTYUvcyl2mi91jGogj57I
|
||||||
|
bzALBgNVHRQEBAICA84wDQYJKoZIhvcNAQELBQADggIBAAi34UKL2UDOAGgb/iWI
|
||||||
|
2/YZ7RSmH1J2sUFLVWxb6f50USYYZGXj1FFeQWogaRhmSWtnSKFcpx//yZLWOEZZ
|
||||||
|
4hEA5H/nijAjmpN354p8AjGXxONDCaluZQtVDGIgfOPMT197GBX9UWpe7Y8thdax
|
||||||
|
o7b8KkiO2tk7Nigu3ciLI6cxr93KIgnFipbt+nMwdTUtGMGNqhqB/RVrUZ3lIu9B
|
||||||
|
PtDVFvhkG4W5rHYr9N2pGeIzQO6t1SDpfLxX2ye1zeE1tuwgMLs6kEMvhwiqyC7R
|
||||||
|
BsztpwttUYIKQzvCXYmXX1vEc5XIDCAku+DdxniXoDoZGvx8B7kplz8SfMyTcixy
|
||||||
|
UvQEqO88549QIbn/NXH2lQJ94v5TEzEJlbqrp7Qx+lH4OffpYJk2gN2yZWcWAlBz
|
||||||
|
utvzn1hLhgtDD1ILLkqK/s9EubMpqNg27cSRSgyBrEWVm5P6EFhR2qh5SsoOlbx6
|
||||||
|
/+HuF4LcHdxQ9/FrBSYiIKNuJc49wx4pngW9L+hDrYzBtVtXgn89r2BMcw59kCfI
|
||||||
|
ebyKq6UfdIpEVVkeSeCQAdRr43NmCbh2A610suWOs2yba7A5Lth3kfUMdcutj7Nv
|
||||||
|
jsVM2jWdYxnt58vJvrAqtFyAKH+YRDIBXAzrPYqHtNjSdhqae0DEXPFjyzIQyG9c
|
||||||
|
jJe0e3FgoOHoWrgEdo5uisM5
|
||||||
|
-----END X509 CRL-----
|
||||||
2316
.dotnet/corefx/cryptography/crls/d16da424.cbeb964c.crl
Normal file
2316
.dotnet/corefx/cryptography/crls/d16da424.cbeb964c.crl
Normal file
File diff suppressed because it is too large
Load Diff
41
.github/workflows/docker-image.yml
vendored
Normal file
41
.github/workflows/docker-image.yml
vendored
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
name: Build and Push Docker Image
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
|
- name: Cache Docker layers
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
|
- name: Set up Docker login to GHCR
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Generate docker tag
|
||||||
|
id: prep
|
||||||
|
run: |
|
||||||
|
echo "REPO_NAME=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
|
||||||
|
echo "DATE_TAG=$(date +%s)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- name: Build Docker image
|
||||||
|
run: docker build -f docker/Dockerfile . --tag ghcr.io/$REPO_NAME/ssh-project:$DATE_TAG
|
||||||
|
|
||||||
|
- name: Push Docker image to GHCR
|
||||||
|
run: docker push ghcr.io/$REPO_NAME/ssh-project:$DATE_TAG
|
||||||
131
.gitignore
vendored
Normal file
131
.gitignore
vendored
Normal file
@@ -0,0 +1,131 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
# Diagnostic reports (https://nodejs.org/api/report.html)
|
||||||
|
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
|
||||||
|
|
||||||
|
# Runtime data
|
||||||
|
pids
|
||||||
|
*.pid
|
||||||
|
*.seed
|
||||||
|
*.pid.lock
|
||||||
|
|
||||||
|
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||||
|
lib-cov
|
||||||
|
|
||||||
|
# Coverage directory used by tools like istanbul
|
||||||
|
coverage
|
||||||
|
*.lcov
|
||||||
|
|
||||||
|
# nyc test coverage
|
||||||
|
.nyc_output
|
||||||
|
|
||||||
|
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
|
||||||
|
.grunt
|
||||||
|
|
||||||
|
# Bower dependency directory (https://bower.io/)
|
||||||
|
bower_components
|
||||||
|
|
||||||
|
# node-waf configuration
|
||||||
|
.lock-wscript
|
||||||
|
|
||||||
|
# Compiled binary addons (https://nodejs.org/api/addons.html)
|
||||||
|
build/Release
|
||||||
|
|
||||||
|
# Dependency directories
|
||||||
|
node_modules/
|
||||||
|
jspm_packages/
|
||||||
|
|
||||||
|
# TypeScript v1 declaration files
|
||||||
|
typings/
|
||||||
|
|
||||||
|
# TypeScript cache
|
||||||
|
*.tsbuildinfo
|
||||||
|
|
||||||
|
# Optional npm cache directory
|
||||||
|
.npm
|
||||||
|
|
||||||
|
# Optional eslint cache
|
||||||
|
.eslintcache
|
||||||
|
|
||||||
|
# Microbundle cache
|
||||||
|
.rpt2_cache/
|
||||||
|
.rts2_cache_cjs/
|
||||||
|
.rts2_cache_es/
|
||||||
|
.rts2_cache_umd/
|
||||||
|
|
||||||
|
# Optional REPL history
|
||||||
|
.node_repl_history
|
||||||
|
|
||||||
|
# Output of 'npm pack'
|
||||||
|
*.tgz
|
||||||
|
|
||||||
|
# Yarn Integrity file
|
||||||
|
.yarn-integrity
|
||||||
|
|
||||||
|
# dotenv environment variables file
|
||||||
|
.env
|
||||||
|
.env.test
|
||||||
|
|
||||||
|
# parcel-bundler cache (https://parceljs.org/)
|
||||||
|
.cache
|
||||||
|
|
||||||
|
# Next.js build output
|
||||||
|
.next
|
||||||
|
|
||||||
|
# Nuxt.js build / generate output
|
||||||
|
.nuxt
|
||||||
|
dist
|
||||||
|
|
||||||
|
# Gatsby files
|
||||||
|
.cache/
|
||||||
|
# Comment in the public line in if your project uses Gatsby and *not* Next.js
|
||||||
|
# https://nextjs.org/blog/next-9-1#public-directory-support
|
||||||
|
# public
|
||||||
|
|
||||||
|
# vuepress build output
|
||||||
|
.vuepress/dist
|
||||||
|
|
||||||
|
# Serverless directories
|
||||||
|
.serverless/
|
||||||
|
|
||||||
|
# FuseBox cache
|
||||||
|
.fusebox/
|
||||||
|
|
||||||
|
# DynamoDB Local files
|
||||||
|
.dynamodb/
|
||||||
|
|
||||||
|
# TernJS port file
|
||||||
|
.tern-port
|
||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
|
||||||
|
|
||||||
|
# dependencies
|
||||||
|
/node_modules
|
||||||
|
/.pnp
|
||||||
|
.pnp.js
|
||||||
|
|
||||||
|
# testing
|
||||||
|
/coverage
|
||||||
|
|
||||||
|
# production
|
||||||
|
/build
|
||||||
|
|
||||||
|
# misc
|
||||||
|
.DS_Store
|
||||||
|
.env.local
|
||||||
|
.env.development.local
|
||||||
|
.env.test.local
|
||||||
|
.env.production.local
|
||||||
|
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
|
||||||
|
# VSCode Files
|
||||||
|
.vscode-server/
|
||||||
|
/vscode-server
|
||||||
0
.init_done
Normal file
0
.init_done
Normal file
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
{"input":{"location":{"$mid":1,"fsPath":"/home/bugattiguy527/.local/share/code-server/extensions/extensions.json","external":"file:///home/bugattiguy527/.local/share/code-server/extensions/extensions.json","path":"/home/bugattiguy527/.local/share/code-server/extensions/extensions.json","scheme":"file"},"mtime":1732635039605,"profile":true,"profileScanOptions":{"bailOutWhenFileNotFound":true},"type":1,"excludeObsolete":true,"validate":true,"productVersion":"1.95.3","productDate":"2024-11-15T19:35:09.428Z","productCommit":"912a7a9d89f560d1a204caf205833db0850e7b4b","devMode":false,"language":"en","translations":{}},"result":[]}
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"workbench.colorTheme": "Default Dark Modern"
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"resource":"vscode-remote:/home/bugattiguy527/.local/share/code-server/User/settings.json","entries":[{"id":"LtdN.json","timestamp":1732635057113}]}
|
||||||
42
.local/share/code-server/User/History/2e659bb2/8UPb
Normal file
42
.local/share/code-server/User/History/2e659bb2/8UPb
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Stage 1: Build React frontend
|
||||||
|
FROM node:18-slim as build
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies and build the frontend
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Backend + Nginx setup
|
||||||
|
FROM node:18-slim
|
||||||
|
|
||||||
|
# Set working directory for the backend
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy backend files and entrypoint script
|
||||||
|
COPY . .
|
||||||
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Install backend dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the React frontend build into a directory for Nginx
|
||||||
|
RUN mkdir -p /usr/share/nginx/html
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Install Nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx && apt-get clean
|
||||||
|
|
||||||
|
# Copy Nginx configuration
|
||||||
|
COPY /docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Expose the ports
|
||||||
|
EXPOSE 80 3001
|
||||||
|
|
||||||
|
# Start both the backend and Nginx
|
||||||
|
CMD ["/usr/local/bin/entrypoint.sh"]gi
|
||||||
30
.local/share/code-server/User/History/2e659bb2/8otg
Normal file
30
.local/share/code-server/User/History/2e659bb2/8otg
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
|
# Stage 1: Build the React app (Frontend)
|
||||||
|
FROM node:18-slim AS frontend-build
|
||||||
|
WORKDIR /app
|
||||||
|
# Copy all project files into the image
|
||||||
|
COPY . .
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
# Build the application
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Setup Nginx to serve the React App
|
||||||
|
FROM nginx:alpine AS frontend-server
|
||||||
|
# Copy built files from builder stage to Nginx's serving directory
|
||||||
|
COPY --from=frontend-build /app/dist /usr/share/nginx/html
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
||||||
|
# Stage 3: Setup the Backend
|
||||||
|
FROM node:18-slim AS backend
|
||||||
|
WORKDIR /app
|
||||||
|
# Copy package.json and package-lock.json
|
||||||
|
COPY package*.json ./
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
# Copy server.js from its new location
|
||||||
|
COPY src/components/server.js /app/server.js
|
||||||
|
EXPOSE 3001
|
||||||
|
# Start the backend server
|
||||||
|
CMD ["node", "server.js"]
|
||||||
42
.local/share/code-server/User/History/2e659bb2/J4VB
Normal file
42
.local/share/code-server/User/History/2e659bb2/J4VB
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Stage 1: Build React frontend
|
||||||
|
FROM node:18-slim as build
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies and build the frontend
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Backend + Nginx setup
|
||||||
|
FROM node:18-slim
|
||||||
|
|
||||||
|
# Set working directory for the backend
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy backend files and entrypoint script
|
||||||
|
COPY . .
|
||||||
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Install backend dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the React frontend build into a directory for Nginx
|
||||||
|
RUN mkdir -p /usr/share/nginx/html
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Install Nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx && apt-get clean
|
||||||
|
|
||||||
|
# Copy Nginx configuration
|
||||||
|
COPY /docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Expose the ports
|
||||||
|
EXPOSE 80 3001
|
||||||
|
|
||||||
|
# Start both the backend and Nginx
|
||||||
|
CMD ["/usr/local/bin/entrypoint.sh"]
|
||||||
73
.local/share/code-server/User/History/2e659bb2/TUF1
Normal file
73
.local/share/code-server/User/History/2e659bb2/TUF1
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
|
# Stage 1: Build the React app (Frontend)
|
||||||
|
FROM node:18-slim AS frontend-build
|
||||||
|
WORKDIR /app
|
||||||
|
# Copy all project files into the image
|
||||||
|
COPY . .
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
# Build the application
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Setup Nginx to serve the React App
|
||||||
|
FROM nginx:alpine AS frontend-server
|
||||||
|
# Copy built files from builder stage to Nginx's serving directory
|
||||||
|
COPY --from=frontend-build /app/dist /usr/share/nginx/html
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
||||||
|
# Stage 3: Setup the Backend
|
||||||
|
FROM node:18-slim AS backend
|
||||||
|
WORKDIR /app
|
||||||
|
# Copy package.json and package-lock.json
|
||||||
|
COPY package*.json ./
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
# Copy server.js from its new location
|
||||||
|
COPY src/components/server.js /app/server.js
|
||||||
|
EXPOSE 3001
|
||||||
|
# Start the backend server
|
||||||
|
CMD ["node", "server.js"]
|
||||||
|
=======
|
||||||
|
# Stage 1: Build React frontend
|
||||||
|
FROM node:18-slim as build
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies and build the frontend
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Backend + Nginx setup
|
||||||
|
FROM node:18-slim
|
||||||
|
|
||||||
|
# Set working directory for the backend
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy backend files and entrypoint script
|
||||||
|
COPY . .
|
||||||
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Install backend dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the React frontend build into a directory for Nginx
|
||||||
|
RUN mkdir -p /usr/share/nginx/html
|
||||||
|
COPY --from=build dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Install Nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx && apt-get clean
|
||||||
|
|
||||||
|
# Copy Nginx configuration
|
||||||
|
COPY /docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Expose the ports
|
||||||
|
EXPOSE 80 3001
|
||||||
|
|
||||||
|
# Start both the backend and Nginx
|
||||||
|
CMD ["/usr/local/bin/entrypoint.sh"]
|
||||||
74
.local/share/code-server/User/History/2e659bb2/XU8z
Normal file
74
.local/share/code-server/User/History/2e659bb2/XU8z
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
<<<<<<< HEAD
|
||||||
|
# Stage 1: Build the React app (Frontend)
|
||||||
|
FROM node:18-slim AS frontend-build
|
||||||
|
WORKDIR /app
|
||||||
|
# Copy all project files into the image
|
||||||
|
COPY . .
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
# Build the application
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Setup Nginx to serve the React App
|
||||||
|
FROM nginx:alpine AS frontend-server
|
||||||
|
# Copy built files from builder stage to Nginx's serving directory
|
||||||
|
COPY --from=frontend-build /app/dist /usr/share/nginx/html
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
||||||
|
# Stage 3: Setup the Backend
|
||||||
|
FROM node:18-slim AS backend
|
||||||
|
WORKDIR /app
|
||||||
|
# Copy package.json and package-lock.json
|
||||||
|
COPY package*.json ./
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
# Copy server.js from its new location
|
||||||
|
COPY src/components/server.js /app/server.js
|
||||||
|
EXPOSE 3001
|
||||||
|
# Start the backend server
|
||||||
|
CMD ["node", "server.js"]
|
||||||
|
=======
|
||||||
|
# Stage 1: Build React frontend
|
||||||
|
FROM node:18-slim as build
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies and build the frontend
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Backend + Nginx setup
|
||||||
|
FROM node:18-slim
|
||||||
|
|
||||||
|
# Set working directory for the backend
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy backend files and entrypoint script
|
||||||
|
COPY . .
|
||||||
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Install backend dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the React frontend build into a directory for Nginx
|
||||||
|
RUN mkdir -p /usr/share/nginx/html
|
||||||
|
COPY --from=build dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Install Nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx && apt-get clean
|
||||||
|
|
||||||
|
# Copy Nginx configuration
|
||||||
|
COPY /docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Expose the ports
|
||||||
|
EXPOSE 80 3001
|
||||||
|
|
||||||
|
# Start both the backend and Nginx
|
||||||
|
CMD ["/usr/local/bin/entrypoint.sh"]
|
||||||
|
>>>>>>> fc03385d60aedd35d147f7af3ce97533fa67a8d7
|
||||||
42
.local/share/code-server/User/History/2e659bb2/Z5sv
Normal file
42
.local/share/code-server/User/History/2e659bb2/Z5sv
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Stage 1: Build React frontend
|
||||||
|
FROM node:18-slim as build
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies and build the frontend
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Backend + Nginx setup
|
||||||
|
FROM node:18-slim
|
||||||
|
|
||||||
|
# Set working directory for the backend
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy backend files and entrypoint script
|
||||||
|
COPY . .
|
||||||
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Install backend dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the React frontend build into a directory for Nginx
|
||||||
|
RUN mkdir -p /usr/share/nginx/html
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Install Nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx && apt-get clean
|
||||||
|
|
||||||
|
# Copy Nginx configuration
|
||||||
|
COPY /docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Expose the ports
|
||||||
|
EXPOSE 80 3001
|
||||||
|
|
||||||
|
# Start both the backend and Nginx
|
||||||
|
CMD ["/usr/local/bin/entrypoint.sh"]gi
|
||||||
42
.local/share/code-server/User/History/2e659bb2/ars1
Normal file
42
.local/share/code-server/User/History/2e659bb2/ars1
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Stage 1: Build React frontend
|
||||||
|
FROM node:18-slim as build
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies and build the frontend
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Backend + Nginx setup
|
||||||
|
FROM node:18-slim
|
||||||
|
|
||||||
|
# Set working directory for the backend
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy backend files and entrypoint script
|
||||||
|
COPY . .
|
||||||
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Install backend dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the React frontend build into a directory for Nginx
|
||||||
|
RUN mkdir -p /usr/share/nginx/html
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Install Nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx && apt-get clean
|
||||||
|
|
||||||
|
# Copy Nginx configuration
|
||||||
|
COPY /docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Expose the ports
|
||||||
|
EXPOSE 80 3001
|
||||||
|
|
||||||
|
# Start both the backend and Nginx
|
||||||
|
CMD ["/usr/local/bin/entrypoint.sh"]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":1,"resource":"vscode-remote://coder.karmaashomepage.online/home/bugattiguy527/docker/Dockerfile","entries":[{"id":"TUF1","timestamp":1732635492973},{"id":"8otg","timestamp":1732635506681},{"id":"XU8z","source":"undoRedo.source","timestamp":1732635515769},{"id":"ars1","timestamp":1732635532917},{"id":"8UPb","timestamp":1732635628577},{"id":"gWeB","timestamp":1732635658901},{"id":"Z5sv","source":"undoRedo.source","timestamp":1732635671649},{"id":"J4VB","timestamp":1732635674581}]}
|
||||||
0
.local/share/code-server/User/History/2e659bb2/gWeB
Normal file
0
.local/share/code-server/User/History/2e659bb2/gWeB
Normal file
@@ -0,0 +1 @@
|
|||||||
|
{"content":{"settings":"{}","tasks":"{}","launch":"{\n \"version\": \"0.2.0\",\n \"configurations\": [\n {\n \"name\": \"Run application\",\n \"type\": \"node\",\n \"request\": \"launch\",\n \"cwd\": \"${workspaceFolder}\",\n \"console\": \"integratedTerminal\",\n \"runtimeExecutable\": \"npm\",\n \"runtimeArgs\": [\n \"run-script\",\n \"start\"\n ],\n \"skipFiles\": [\n \"<node_internals>/**\"\n ]\n }\n ]\n}"}}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
1
.local/share/code-server/User/machineid
Normal file
1
.local/share/code-server/User/machineid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
79efcc96-1486-4989-a911-393bcc574a8b
|
||||||
3
.local/share/code-server/User/settings.json
Normal file
3
.local/share/code-server/User/settings.json
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"workbench.colorTheme": "Default Dark Modern"
|
||||||
|
}
|
||||||
1
.local/share/code-server/User/systemExtensionsCache.json
Normal file
1
.local/share/code-server/User/systemExtensionsCache.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"pid":287,"willReleaseAt":0}
|
||||||
9
.local/share/code-server/coder.json
Normal file
9
.local/share/code-server/coder.json
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
{
|
||||||
|
"query": {
|
||||||
|
"folder": "/home/bugattiguy527"
|
||||||
|
},
|
||||||
|
"update": {
|
||||||
|
"checked": 1732635045996,
|
||||||
|
"version": "4.95.3"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
.local/share/code-server/extensions/extensions.json
Normal file
1
.local/share/code-server/extensions/extensions.json
Normal file
@@ -0,0 +1 @@
|
|||||||
|
[]
|
||||||
0
.local/share/code-server/heartbeat
Normal file
0
.local/share/code-server/heartbeat
Normal file
1
.local/share/code-server/machineid
Normal file
1
.local/share/code-server/machineid
Normal file
@@ -0,0 +1 @@
|
|||||||
|
aeeb7e20-e139-4512-8519-2d804ed5608c
|
||||||
1
.local/share/code-server/serve-web-key-half
Normal file
1
.local/share/code-server/serve-web-key-half
Normal file
@@ -0,0 +1 @@
|
|||||||
|
}Ç<>È26x¨´±GËÿˆ<C3BF>eC¢“»rÛœ¥¿°oÕL›
|
||||||
27
.profile
Normal file
27
.profile
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
# ~/.profile: executed by the command interpreter for login shells.
|
||||||
|
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
|
||||||
|
# exists.
|
||||||
|
# see /usr/share/doc/bash/examples/startup-files for examples.
|
||||||
|
# the files are located in the bash-doc package.
|
||||||
|
|
||||||
|
# the default umask is set in /etc/profile; for setting the umask
|
||||||
|
# for ssh logins, install and configure the libpam-umask package.
|
||||||
|
#umask 022
|
||||||
|
|
||||||
|
# if running bash
|
||||||
|
if [ -n "$BASH_VERSION" ]; then
|
||||||
|
# include .bashrc if it exists
|
||||||
|
if [ -f "$HOME/.bashrc" ]; then
|
||||||
|
. "$HOME/.bashrc"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set PATH so it includes user's private bin if it exists
|
||||||
|
if [ -d "$HOME/bin" ] ; then
|
||||||
|
PATH="$HOME/bin:$PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# set PATH so it includes user's private bin if it exists
|
||||||
|
if [ -d "$HOME/.local/bin" ] ; then
|
||||||
|
PATH="$HOME/.local/bin:$PATH"
|
||||||
|
fi
|
||||||
0
.sudo_as_admin_successful
Normal file
0
.sudo_as_admin_successful
Normal file
20
.vscode/launch.json
vendored
Normal file
20
.vscode/launch.json
vendored
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": "Run application",
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"runtimeExecutable": "npm",
|
||||||
|
"runtimeArgs": [
|
||||||
|
"run-script",
|
||||||
|
"start"
|
||||||
|
],
|
||||||
|
"skipFiles": [
|
||||||
|
"<node_internals>/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
4
.wget-hsts
Normal file
4
.wget-hsts
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
# HSTS 1.0 Known Hosts database for GNU Wget.
|
||||||
|
# Edit at your own risk.
|
||||||
|
# <hostname> <port> <incl. subdomains> <created> <max-age>
|
||||||
|
update.code.visualstudio.com 0 1 1732582713 31536000
|
||||||
35
Dockerfile
Normal file
35
Dockerfile
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# Stage 1: Build the React app (Frontend)
|
||||||
|
FROM node:18-slim AS frontend-build
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy all project files into the image
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Build the application
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Setup Nginx to serve the React App
|
||||||
|
FROM nginx:alpine AS frontend-server
|
||||||
|
|
||||||
|
# Copy built files from builder stage to nginx
|
||||||
|
COPY --from=frontend-build /app/dist /usr/share/nginx/html
|
||||||
|
EXPOSE 80
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
||||||
|
# Stage 3: Setup the Backend
|
||||||
|
FROM node:18-slim AS backend
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy package.json and package-lock.json
|
||||||
|
COPY package*.json ./
|
||||||
|
|
||||||
|
# Install dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy server.js from its new location
|
||||||
|
COPY src/components/server.js ./
|
||||||
|
EXPOSE 3001
|
||||||
|
CMD ["node", "server.js"]
|
||||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2022 GitHub
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
||||||
24
docker-compose.yml
Normal file
24
docker-compose.yml
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
services:
|
||||||
|
frontend:
|
||||||
|
build:
|
||||||
|
context: /workspaces/codespaces-react # Path to your project root
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: frontend-server # Building the frontend server
|
||||||
|
ports:
|
||||||
|
- "80:80" # Port mapping for HTTP traffic
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
|
||||||
|
backend:
|
||||||
|
build:
|
||||||
|
context: /workspaces/codespaces-react # Path to your project root
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
target: backend # Building the backend
|
||||||
|
ports:
|
||||||
|
- "3005:3005" # Port mapping for your Node backend
|
||||||
|
networks:
|
||||||
|
- app-network
|
||||||
|
|
||||||
|
networks:
|
||||||
|
app-network: # Define a network for containers to communicate
|
||||||
|
driver: bridge
|
||||||
42
docker/Dockerfile
Normal file
42
docker/Dockerfile
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
# Stage 1: Build React frontend
|
||||||
|
FROM node:18-slim as build
|
||||||
|
|
||||||
|
# Set working directory
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy project files
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
# Install dependencies and build the frontend
|
||||||
|
RUN npm install
|
||||||
|
RUN npm run build
|
||||||
|
|
||||||
|
# Stage 2: Backend + Nginx setup
|
||||||
|
FROM node:18-slim
|
||||||
|
|
||||||
|
# Set working directory for the backend
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Copy backend files and entrypoint script
|
||||||
|
COPY . .
|
||||||
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Install backend dependencies
|
||||||
|
RUN npm install
|
||||||
|
|
||||||
|
# Copy the React frontend build into a directory for Nginx
|
||||||
|
RUN mkdir -p /usr/share/nginx/html
|
||||||
|
COPY --from=build /app/dist /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Install Nginx
|
||||||
|
RUN apt-get update && apt-get install -y nginx && apt-get clean
|
||||||
|
|
||||||
|
# Copy Nginx configuration
|
||||||
|
COPY /docker/nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Expose the ports
|
||||||
|
EXPOSE 80 3001
|
||||||
|
|
||||||
|
# Start both the backend and Nginx
|
||||||
|
CMD ["/usr/local/bin/entrypoint.sh"]
|
||||||
23
docker/nginx.conf
Normal file
23
docker/nginx.conf
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
|
||||||
|
server_name localhost;
|
||||||
|
|
||||||
|
# Serve the React app
|
||||||
|
root /usr/share/nginx/html;
|
||||||
|
index index.html;
|
||||||
|
|
||||||
|
# Frontend routes
|
||||||
|
location / {
|
||||||
|
try_files $uri /index.html;
|
||||||
|
}
|
||||||
|
|
||||||
|
# API routes (proxy to backend)
|
||||||
|
location /api/ {
|
||||||
|
proxy_pass http://127.0.0.1:3001; # Forward API requests to backend
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
}
|
||||||
|
}
|
||||||
7
entrypoint.sh
Normal file
7
entrypoint.sh
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
# Start the backend server in the background
|
||||||
|
node server.js &
|
||||||
|
|
||||||
|
# Start Nginx in the foreground
|
||||||
|
nginx -g "daemon off;"
|
||||||
35
index.html
Normal file
35
index.html
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="en">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<link rel="icon" href="/favicon.ico" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||||
|
<meta name="theme-color" content="#000000" />
|
||||||
|
<meta
|
||||||
|
name="description"
|
||||||
|
content="Web site created using @vitejs/plugin-react"
|
||||||
|
/>
|
||||||
|
<link rel="apple-touch-icon" href="/logo192.png" />
|
||||||
|
<!--
|
||||||
|
manifest.json provides metadata used when your web app is installed on a
|
||||||
|
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
|
||||||
|
-->
|
||||||
|
<link rel="manifest" href="/manifest.json" />
|
||||||
|
<title>React App</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
<div id="root"></div>
|
||||||
|
<!--
|
||||||
|
This HTML file is a template.
|
||||||
|
If you open it directly in the browser, you will see an empty page.
|
||||||
|
|
||||||
|
You can add webfonts, meta tags, or analytics to this file.
|
||||||
|
The build step will place the bundled scripts into the <body> tag.
|
||||||
|
|
||||||
|
To begin the development, run `npm start` or `yarn start`.
|
||||||
|
To create a production bundle, use `npm run build` or `yarn build`.
|
||||||
|
-->
|
||||||
|
</body>
|
||||||
|
<script type="module" src="/src/index.jsx"></script>
|
||||||
|
</html>
|
||||||
5
jsconfig.json
Normal file
5
jsconfig.json
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"moduleResolution": "node"
|
||||||
|
}
|
||||||
|
}
|
||||||
11
ngrok.yml
Normal file
11
ngrok.yml
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
version: 2
|
||||||
|
authtoken: 2H3ZoIoYvRBckudPKvb7iyNvTgW_48SFniUxViJjuvcUvr1tA
|
||||||
|
tunnels:
|
||||||
|
first:
|
||||||
|
proto: http
|
||||||
|
addr: http://localhost:3000
|
||||||
|
second:
|
||||||
|
proto: tcp
|
||||||
|
addr: 3005
|
||||||
|
|
||||||
7830
package-lock.json
generated
Normal file
7830
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
54
package.json
Normal file
54
package.json
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
{
|
||||||
|
"name": "codespaces-react",
|
||||||
|
"version": "0.1.0",
|
||||||
|
"private": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@testing-library/jest-dom": "^5.16.5",
|
||||||
|
"@testing-library/react": "^13.4.0",
|
||||||
|
"@testing-library/user-event": "^14.4.3",
|
||||||
|
"express": "^4.21.1",
|
||||||
|
"guacamole-common-js": "^1.5.0",
|
||||||
|
"http-proxy-middleware": "^3.0.3",
|
||||||
|
"react": "^18.2.0",
|
||||||
|
"react-dom": "^18.2.0",
|
||||||
|
"ssh2": "^1.16.0",
|
||||||
|
"web-vitals": "^3.1.0",
|
||||||
|
"ws": "^8.18.0",
|
||||||
|
"xterm": "^5.3.0"
|
||||||
|
},
|
||||||
|
"overrides": {
|
||||||
|
"@svgr/webpack": "^8.0.1",
|
||||||
|
"@adobe/css-tools": "^4.3.1",
|
||||||
|
"postcss": "^8.4.31"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"start": "BROWSER=none WDS_SOCKET_PORT=0 vite --port 3000",
|
||||||
|
"build": "vite build",
|
||||||
|
"preview": "vite preview",
|
||||||
|
"test": "vitest"
|
||||||
|
},
|
||||||
|
"eslintConfig": {
|
||||||
|
"extends": [
|
||||||
|
"react-app",
|
||||||
|
"react-app/jest"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"browserslist": {
|
||||||
|
"production": [
|
||||||
|
">0.2%",
|
||||||
|
"not dead",
|
||||||
|
"not op_mini all"
|
||||||
|
],
|
||||||
|
"development": [
|
||||||
|
"last 1 chrome version",
|
||||||
|
"last 1 firefox version",
|
||||||
|
"last 1 safari version"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@vitejs/plugin-react": "^4.1.1",
|
||||||
|
"jsdom": "^22.1.0",
|
||||||
|
"vite": "^4.5.5",
|
||||||
|
"vitest": "^0.34.6"
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
public/Octocat.png
Normal file
BIN
public/Octocat.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.0 MiB |
BIN
public/favicon.ico
Normal file
BIN
public/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
BIN
public/logo192.png
Normal file
BIN
public/logo192.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.2 KiB |
BIN
public/logo512.png
Normal file
BIN
public/logo512.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 9.4 KiB |
25
public/manifest.json
Normal file
25
public/manifest.json
Normal file
@@ -0,0 +1,25 @@
|
|||||||
|
{
|
||||||
|
"short_name": "React App",
|
||||||
|
"name": "Create React App Sample",
|
||||||
|
"icons": [
|
||||||
|
{
|
||||||
|
"src": "favicon.ico",
|
||||||
|
"sizes": "64x64 32x32 24x24 16x16",
|
||||||
|
"type": "image/x-icon"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo192.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "192x192"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"src": "logo512.png",
|
||||||
|
"type": "image/png",
|
||||||
|
"sizes": "512x512"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"start_url": ".",
|
||||||
|
"display": "standalone",
|
||||||
|
"theme_color": "#000000",
|
||||||
|
"background_color": "#ffffff"
|
||||||
|
}
|
||||||
3
public/robots.txt
Normal file
3
public/robots.txt
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
# https://www.robotstxt.org/robotstxt.html
|
||||||
|
User-agent: *
|
||||||
|
Disallow:
|
||||||
16
src/App.css
Normal file
16
src/App.css
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
.app {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100vh;
|
||||||
|
background-color: #1e1e1e;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.display {
|
||||||
|
width: 80%;
|
||||||
|
height: 70vh;
|
||||||
|
border: 2px solid #444;
|
||||||
|
background: black;
|
||||||
|
}
|
||||||
83
src/App.jsx
Normal file
83
src/App.jsx
Normal file
@@ -0,0 +1,83 @@
|
|||||||
|
import React, { useEffect, useRef, useState } from 'react';
|
||||||
|
import { Terminal } from 'xterm';
|
||||||
|
import 'xterm/css/xterm.css';
|
||||||
|
|
||||||
|
const App = () => {
|
||||||
|
const terminalRef = useRef(null);
|
||||||
|
const terminal = useRef(null);
|
||||||
|
const socket = useRef(null);
|
||||||
|
const inputBuffer = useRef(''); // Buffer to hold user input
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
// Initialize xterm.js Terminal
|
||||||
|
terminal.current = new Terminal({
|
||||||
|
cursorBlink: true,
|
||||||
|
theme: {
|
||||||
|
background: '#1e1e1e',
|
||||||
|
foreground: '#ffffff',
|
||||||
|
},
|
||||||
|
macOptionIsMeta: true, // Enable Meta key for Mac users
|
||||||
|
allowProposedApi: true, // Allow advanced terminal features
|
||||||
|
});
|
||||||
|
|
||||||
|
terminal.current.open(terminalRef.current);
|
||||||
|
|
||||||
|
// Connect to the WebSocket server
|
||||||
|
socket.current = new WebSocket('2.tcp.ngrok.io:10908');
|
||||||
|
|
||||||
|
// WebSocket Event Handlers
|
||||||
|
socket.current.onopen = () => {
|
||||||
|
terminal.current.writeln('Connected to WebSocket server.');
|
||||||
|
};
|
||||||
|
|
||||||
|
socket.current.onmessage = (event) => {
|
||||||
|
terminal.current.write(event.data);
|
||||||
|
};
|
||||||
|
|
||||||
|
socket.current.onerror = (error) => {
|
||||||
|
terminal.current.writeln(`WebSocket error: ${error.message}`);
|
||||||
|
};
|
||||||
|
|
||||||
|
socket.current.onclose = () => {
|
||||||
|
terminal.current.writeln('Disconnected from WebSocket server.');
|
||||||
|
};
|
||||||
|
|
||||||
|
// Handle terminal input
|
||||||
|
terminal.current.onData((data) => {
|
||||||
|
if (data === '\r') {
|
||||||
|
// On Enter
|
||||||
|
if (inputBuffer.current.trim() !== '') {
|
||||||
|
socket.current.send(inputBuffer.current + '\n'); // Send the buffer to the server
|
||||||
|
}
|
||||||
|
terminal.current.write('\r\nbugattiguy527@oracle1:~$ '); // Always write a new prompt
|
||||||
|
inputBuffer.current = ''; // Clear the buffer
|
||||||
|
} else if (data === '\u007F') {
|
||||||
|
// Handle Backspace
|
||||||
|
if (inputBuffer.current.length > 0) {
|
||||||
|
inputBuffer.current = inputBuffer.current.slice(0, -1);
|
||||||
|
terminal.current.write('\b \b');
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Append input to buffer and display
|
||||||
|
inputBuffer.current += data;
|
||||||
|
terminal.current.write(data);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
terminal.current.dispose();
|
||||||
|
if (socket.current) {
|
||||||
|
socket.current.close();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
<h1>SSH Web Terminal</h1>
|
||||||
|
<div ref={terminalRef} style={{ height: '80vh', width: '100%' }}></div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default App;
|
||||||
69
src/components/server.js
Normal file
69
src/components/server.js
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
const WebSocket = require('ws');
|
||||||
|
const ssh2 = require('ssh2');
|
||||||
|
const http = require('http');
|
||||||
|
|
||||||
|
// Create an HTTP server to serve WebSocket connections
|
||||||
|
const server = http.createServer((req, res) => {
|
||||||
|
res.writeHead(200, { 'Content-Type': 'text/plain' });
|
||||||
|
res.end('WebSocket server is running\n');
|
||||||
|
});
|
||||||
|
|
||||||
|
// Create a WebSocket server attached to the HTTP server
|
||||||
|
const wss = new WebSocket.Server({ server });
|
||||||
|
|
||||||
|
// WebSocket connection handling
|
||||||
|
wss.on('connection', (ws) => {
|
||||||
|
console.log('WebSocket connection established');
|
||||||
|
|
||||||
|
const conn = new ssh2.Client(); // Create a new SSH connection instance
|
||||||
|
|
||||||
|
// When the SSH connection is ready
|
||||||
|
conn.on('ready', () => {
|
||||||
|
console.log('SSH Connection established');
|
||||||
|
|
||||||
|
// Start an interactive shell session
|
||||||
|
conn.shell((err, stream) => {
|
||||||
|
if (err) {
|
||||||
|
console.log(`SSH Error: ${err}`);
|
||||||
|
ws.send(`Error: ${err}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Handle data from SSH session
|
||||||
|
stream.on('data', (data) => {
|
||||||
|
console.log(`SSH Output: ${data}`);
|
||||||
|
ws.send(data.toString()); // Send the SSH output back to WebSocket client
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle stream close event
|
||||||
|
stream.on('close', () => {
|
||||||
|
console.log('SSH stream closed');
|
||||||
|
conn.end();
|
||||||
|
});
|
||||||
|
|
||||||
|
// When the WebSocket client sends a message, forward it to the SSH stream
|
||||||
|
ws.on('message', (message) => {
|
||||||
|
console.log(`Received message from WebSocket: ${message}`);
|
||||||
|
stream.write(message + '\n'); // Write the message to the SSH shell
|
||||||
|
});
|
||||||
|
});
|
||||||
|
}).on('error', (err) => {
|
||||||
|
console.log('SSH Connection Error: ', err);
|
||||||
|
}).connect({
|
||||||
|
host: '164.152.19.153', // Replace with your SSH host
|
||||||
|
port: 22, // Default SSH port
|
||||||
|
username: 'bugattiguy527', // Replace with your SSH username
|
||||||
|
password: 'bugatti$123', // Replace with your SSH password or use private key
|
||||||
|
});
|
||||||
|
|
||||||
|
// Handle WebSocket close event
|
||||||
|
ws.on('close', () => {
|
||||||
|
console.log('WebSocket closed');
|
||||||
|
conn.end(); // Close SSH connection when WebSocket client disconnects
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Start the WebSocket server on port 3001
|
||||||
|
server.listen(3001, () => {
|
||||||
|
console.log('WebSocket server is listening on ws://localhost:3001');
|
||||||
|
});
|
||||||
13
src/index.css
Normal file
13
src/index.css
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
||||||
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
||||||
|
sans-serif;
|
||||||
|
-webkit-font-smoothing: antialiased;
|
||||||
|
-moz-osx-font-smoothing: grayscale;
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
||||||
|
monospace;
|
||||||
|
}
|
||||||
17
src/index.jsx
Normal file
17
src/index.jsx
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import React from 'react';
|
||||||
|
import ReactDOM from 'react-dom/client';
|
||||||
|
import './index.css';
|
||||||
|
import App from './App';
|
||||||
|
import reportWebVitals from './reportWebVitals';
|
||||||
|
|
||||||
|
const root = ReactDOM.createRoot(document.getElementById('root'));
|
||||||
|
root.render(
|
||||||
|
<React.StrictMode>
|
||||||
|
<App />
|
||||||
|
</React.StrictMode>
|
||||||
|
);
|
||||||
|
|
||||||
|
// If you want to start measuring performance in your app, pass a function
|
||||||
|
// to log results (for example: reportWebVitals(console.log))
|
||||||
|
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
|
||||||
|
reportWebVitals();
|
||||||
1
src/logo.svg
Normal file
1
src/logo.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 841.9 595.3"><g fill="#61DAFB"><path d="M666.3 296.5c0-32.5-40.7-63.3-103.1-82.4 14.4-63.6 8-114.2-20.2-130.4-6.5-3.8-14.1-5.6-22.4-5.6v22.3c4.6 0 8.3.9 11.4 2.6 13.6 7.8 19.5 37.5 14.9 75.7-1.1 9.4-2.9 19.3-5.1 29.4-19.6-4.8-41-8.5-63.5-10.9-13.5-18.5-27.5-35.3-41.6-50 32.6-30.3 63.2-46.9 84-46.9V78c-27.5 0-63.5 19.6-99.9 53.6-36.4-33.8-72.4-53.2-99.9-53.2v22.3c20.7 0 51.4 16.5 84 46.6-14 14.7-28 31.4-41.3 49.9-22.6 2.4-44 6.1-63.6 11-2.3-10-4-19.7-5.2-29-4.7-38.2 1.1-67.9 14.6-75.8 3-1.8 6.9-2.6 11.5-2.6V78.5c-8.4 0-16 1.8-22.6 5.6-28.1 16.2-34.4 66.7-19.9 130.1-62.2 19.2-102.7 49.9-102.7 82.3 0 32.5 40.7 63.3 103.1 82.4-14.4 63.6-8 114.2 20.2 130.4 6.5 3.8 14.1 5.6 22.5 5.6 27.5 0 63.5-19.6 99.9-53.6 36.4 33.8 72.4 53.2 99.9 53.2 8.4 0 16-1.8 22.6-5.6 28.1-16.2 34.4-66.7 19.9-130.1 62-19.1 102.5-49.9 102.5-82.3zm-130.2-66.7c-3.7 12.9-8.3 26.2-13.5 39.5-4.1-8-8.4-16-13.1-24-4.6-8-9.5-15.8-14.4-23.4 14.2 2.1 27.9 4.7 41 7.9zm-45.8 106.5c-7.8 13.5-15.8 26.3-24.1 38.2-14.9 1.3-30 2-45.2 2-15.1 0-30.2-.7-45-1.9-8.3-11.9-16.4-24.6-24.2-38-7.6-13.1-14.5-26.4-20.8-39.8 6.2-13.4 13.2-26.8 20.7-39.9 7.8-13.5 15.8-26.3 24.1-38.2 14.9-1.3 30-2 45.2-2 15.1 0 30.2.7 45 1.9 8.3 11.9 16.4 24.6 24.2 38 7.6 13.1 14.5 26.4 20.8 39.8-6.3 13.4-13.2 26.8-20.7 39.9zm32.3-13c5.4 13.4 10 26.8 13.8 39.8-13.1 3.2-26.9 5.9-41.2 8 4.9-7.7 9.8-15.6 14.4-23.7 4.6-8 8.9-16.1 13-24.1zM421.2 430c-9.3-9.6-18.6-20.3-27.8-32 9 .4 18.2.7 27.5.7 9.4 0 18.7-.2 27.8-.7-9 11.7-18.3 22.4-27.5 32zm-74.4-58.9c-14.2-2.1-27.9-4.7-41-7.9 3.7-12.9 8.3-26.2 13.5-39.5 4.1 8 8.4 16 13.1 24 4.7 8 9.5 15.8 14.4 23.4zM420.7 163c9.3 9.6 18.6 20.3 27.8 32-9-.4-18.2-.7-27.5-.7-9.4 0-18.7.2-27.8.7 9-11.7 18.3-22.4 27.5-32zm-74 58.9c-4.9 7.7-9.8 15.6-14.4 23.7-4.6 8-8.9 16-13 24-5.4-13.4-10-26.8-13.8-39.8 13.1-3.1 26.9-5.8 41.2-7.9zm-90.5 125.2c-35.4-15.1-58.3-34.9-58.3-50.6 0-15.7 22.9-35.6 58.3-50.6 8.6-3.7 18-7 27.7-10.1 5.7 19.6 13.2 40 22.5 60.9-9.2 20.8-16.6 41.1-22.2 60.6-9.9-3.1-19.3-6.5-28-10.2zM310 490c-13.6-7.8-19.5-37.5-14.9-75.7 1.1-9.4 2.9-19.3 5.1-29.4 19.6 4.8 41 8.5 63.5 10.9 13.5 18.5 27.5 35.3 41.6 50-32.6 30.3-63.2 46.9-84 46.9-4.5-.1-8.3-1-11.3-2.7zm237.2-76.2c4.7 38.2-1.1 67.9-14.6 75.8-3 1.8-6.9 2.6-11.5 2.6-20.7 0-51.4-16.5-84-46.6 14-14.7 28-31.4 41.3-49.9 22.6-2.4 44-6.1 63.6-11 2.3 10.1 4.1 19.8 5.2 29.1zm38.5-66.7c-8.6 3.7-18 7-27.7 10.1-5.7-19.6-13.2-40-22.5-60.9 9.2-20.8 16.6-41.1 22.2-60.6 9.9 3.1 19.3 6.5 28.1 10.2 35.4 15.1 58.3 34.9 58.3 50.6-.1 15.7-23 35.6-58.4 50.6zM320.8 78.4z"/><circle cx="420.9" cy="296.5" r="45.7"/><path d="M520.5 78.1z"/></g></svg>
|
||||||
|
After Width: | Height: | Size: 2.6 KiB |
13
src/reportWebVitals.js
Normal file
13
src/reportWebVitals.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
const reportWebVitals = onPerfEntry => {
|
||||||
|
if (onPerfEntry && onPerfEntry instanceof Function) {
|
||||||
|
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
|
||||||
|
getCLS(onPerfEntry);
|
||||||
|
getFID(onPerfEntry);
|
||||||
|
getFCP(onPerfEntry);
|
||||||
|
getLCP(onPerfEntry);
|
||||||
|
getTTFB(onPerfEntry);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default reportWebVitals;
|
||||||
5
src/setupTests.js
Normal file
5
src/setupTests.js
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
// jest-dom adds custom jest matchers for asserting on DOM nodes.
|
||||||
|
// allows you to do things like:
|
||||||
|
// expect(element).toHaveTextContent(/react/i)
|
||||||
|
// learn more: https://github.com/testing-library/jest-dom
|
||||||
|
import '@testing-library/jest-dom';
|
||||||
17
vite.config.js
Normal file
17
vite.config.js
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import { defineConfig } from "vite";
|
||||||
|
import react from "@vitejs/plugin-react";
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
plugins: [react()],
|
||||||
|
test: {
|
||||||
|
globals: true,
|
||||||
|
environment: 'jsdom',
|
||||||
|
},
|
||||||
|
build: {
|
||||||
|
outDir: "dist", // Output directory for the build
|
||||||
|
rollupOptions: {
|
||||||
|
// Use a relative path from the project root (adjusted to reflect Docker WORKDIR)
|
||||||
|
input: 'index.html',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user