diff --git a/README.md b/README.md index d28d3b87..79e25f11 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ Phoenix, when used, also connects to two other services: Atlassian, which runs [ To deploy this code to https://do-staging.tosdr.org: * get an Ubuntu 24.04 server * ssh into it as root -* download the `staging-deploy.sh` script from this repo, and run it +* download the `./staging/deploy.sh` script from this repo, and run it ## Development diff --git a/staging-deploy.sh b/staging/deploy.sh similarity index 88% rename from staging-deploy.sh rename to staging/deploy.sh index e24f38fe..1f4b9c2f 100644 --- a/staging-deploy.sh +++ b/staging/deploy.sh @@ -13,7 +13,25 @@ sudo apt-get install -yq docker-ce docker-ce-cli containerd.io docker-buildx-plu sudo service docker start sudo docker run hello-world -# edit.tosdr.org +# pyenv +apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev +curl https://pyenv.run | bash +echo -e 'export PYENV_ROOT="$HOME/.pyenv"\nexport PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc +echo -e 'eval "$(pyenv init --path)"\neval "$(pyenv init -)"' >> ~/.bashrc +source ~/.bashrc + +# Node.js +curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash +source ~/.bashrc +nvm install 20 +nvm use 20 +corepack enable +yarn --version -q + +# Postgres +apt install -q libpq-dev + +# Phoenix git clone https://github.com/tosdr/edit.tosdr.org.git cd edit.tosdr.org docker compose build @@ -24,13 +42,6 @@ docker exec -it edittosdrorg-web-1 rails db:seed docker compose down cd .. -# pyenv -apt install -y make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev -curl https://pyenv.run | bash -echo -e 'export PYENV_ROOT="$HOME/.pyenv"\nexport PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc -echo -e 'eval "$(pyenv init --path)"\neval "$(pyenv init -)"' >> ~/.bashrc -source ~/.bashrc - # Hypothesis git clone https://github.com/tosdr/h cd h diff --git a/staging/nginxproxymanager/docker-compose.yml b/staging/nginxproxymanager/docker-compose.yml new file mode 100644 index 00000000..a7b4bbd6 --- /dev/null +++ b/staging/nginxproxymanager/docker-compose.yml @@ -0,0 +1,12 @@ +version: '3.8' +services: + app: + image: 'jc21/nginx-proxy-manager:latest' + restart: unless-stopped + ports: + - '80:80' + - '81:81' + - '443:443' + volumes: + - ./data:/data + - ./letsencrypt:/etc/letsencrypt \ No newline at end of file