Skip to content

gixia-org/aisafetystudy

Repository files navigation

AI Safety Study Group

AI Safety Study Group is a group of learners interested in AI Safety. We aim to explore the ethical, social, and technical challenges that arise when developing AI systems that can be used for harm. Check our homepage to join the community.

Build & Deploy

Currently it's a small project and directly running on Azure machine.

Option 1: Direct deployment (single app)

Run following to build and start the web app:

npm run build
pm2 start npm --name "aisafetystudy" -- run start
# Or restart if already running
# pm2 restart aisafetystudy

Option 2: Multi-app deployment with nginx

For multiple apps with different subdomains:

# Build and start this app on port 3000
npm run build
PORT=3000 pm2 start npm --name "aisafetystudy" -- run start

Nginx Configuration

Create /etc/nginx/sites-available/react-apps:

# AI Safety Study Group - aisafetystudy.gixia.org
server {
    listen 80;
    server_name aisafetystudy.gixia.org;
    
    location / {
        proxy_pass http://localhost:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_cache_bypass $http_upgrade;
    }
}

Enable the configuration:

sudo ln -s /etc/nginx/sites-available/react-apps /etc/nginx/sites-enabled/
sudo nginx -t
sudo systemctl reload nginx

Contributing

The code is mostly generated by ChatGPT and Trae IDE. We welcome contributions from all levels of experience. If you have any suggestion or feedback, please feel free to open an issue or submit a pull request.