Skip to content

Commit

Permalink
Make a start with #1158
Browse files Browse the repository at this point in the history
  • Loading branch information
michielbdejong committed Jun 3, 2024
1 parent 01cde51 commit dba6255
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
27 changes: 19 additions & 8 deletions staging-deploy.sh → staging/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
12 changes: 12 additions & 0 deletions staging/nginxproxymanager/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit dba6255

Please sign in to comment.