### Python requirements.txt Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Example requirements.txt file for Python projects. Lists dependencies like Flask and Gunicorn. ```text # requirements.txt flask==2.0.0 gunicorn==20.1.0 ``` -------------------------------- ### Deploy Projects with beamup Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt The default command for configuring and deploying projects. It handles initial setup and Git repository initialization. ```bash # Navigate to your project directory and run beamup cd my-project # First-time setup will prompt for configuration beamup # Output: # Beamup Host: deployer.beamup.dev # GitHub Username: myusername # Configuration saved at "/home/user/beamup-config.json" # Project Name (default: my-project): # Project configuration saved at "/home/user/my-project/beamup.json" # The current folder is not a git repository, would you like to make it a git repository? (y/n): y # Do you want to deploy "my-project"? (y/n): y # Deploying to a1b2c3d4e5f6-my-project.beamup.dev # Project URL: a1b2c3d4e5f6-my-project.beamup.dev ``` -------------------------------- ### Install Beamup CLI Source: https://github.com/stremio/stremio-beamup-cli/blob/master/README.md Install the Beamup CLI globally using npm. This command is used to add the CLI tool to your system's PATH. ```bash npm install beamup-cli -g ``` -------------------------------- ### Node.js Server Example Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt A basic Node.js server using Express that listens on a configurable port. Ensure your project supports the PORT environment variable. ```javascript // server.js - Example Node.js server compatible with Beamup const express = require('express'); const app = express(); const PORT = process.env.PORT || 3000; app.get('/', (req, res) => { res.json({ status: 'running', env: process.env.NODE_ENV }); }); app.listen(PORT, () => { console.log(`Server started on port ${PORT}`); }); ``` -------------------------------- ### Node.js package.json Configuration Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Example package.json for a Node.js project. It specifies the main file and includes necessary dependencies like Express. ```json // package.json { "name": "my-beamup-project", "version": "1.0.0", "main": "server.js", "scripts": { "start": "node server.js" }, "dependencies": { "express": "^4.18.0" } } ``` -------------------------------- ### Python Procfile Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Example Procfile for Python applications. It defines the web process using Gunicorn and binds to the PORT environment variable. ```text # Procfile web: gunicorn app:app --bind 0.0.0.0:$PORT ``` -------------------------------- ### Dockerfile for Deployment Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt A Dockerfile for deploying Node.js applications. It installs dependencies, copies application files, and exposes the application port. ```dockerfile # Dockerfile FROM node:18-alpine WORKDIR /app COPY package*.json ./ RUN npm install --production COPY . . EXPOSE 5000 CMD ["node", "server.js"] ``` -------------------------------- ### Initialize Projects with beamup init Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Set up project configuration and Git remotes without triggering a deployment. ```bash # Initialize with interactive prompt beamup init # Or provide project name directly beamup init my-new-addon # Output: # Project configuration saved at "/home/user/my-project/beamup.json" ``` -------------------------------- ### Configure Beamup CLI Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Set the Beamup host and GitHub username for authentication. ```bash # Interactive configuration beamup config # Or provide values directly beamup config deployer.beamup.dev myGithubUsername # Output: # Configuration saved at "/home/user/beamup-config.json" ``` -------------------------------- ### View Logs with beamup logs Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Retrieve runtime logs for debugging and monitoring. ```bash beamup logs # Output example: # 2024-01-15T10:30:00.000Z app[web.1]: Server started on port 5000 # 2024-01-15T10:30:05.000Z app[web.1]: Connected to database # 2024-01-15T10:31:22.000Z app[web.1]: GET /api/users 200 15ms # 2024-01-15T10:31:45.000Z app[web.1]: POST /api/data 201 42ms ``` -------------------------------- ### Configure BeamUp CLI Host and Username Source: https://github.com/stremio/stremio-beamup-cli/wiki/FAQ Use this command to configure the BeamUp CLI with your host and GitHub username. This can help resolve 'access denied' or 'Could not read from remote repository' errors caused by duplicate SSH key hashes. ```bash ssh -T dokku@YourBeamupHost beamup config YourBeamupHost YourGithubUsername ssh -T dokku@YourBeamupHost ``` -------------------------------- ### Deploy Projects with beamup deploy Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Push code via Git to trigger the build process on the server. ```bash beamup deploy # If no changes since last deployment: # The commit history did not change since the last deployment, would you like to create a new commit for your project? (y/n): y # Creating a new commit with the title "Auto-commit" # Deploying to a1b2c3d4e5f6-my-project.beamup.dev # Project URL: a1b2c3d4e5f6-my-project.beamup.dev # Alternative: Use git push directly after initial setup git push beamup master ``` -------------------------------- ### Project Configuration File Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt The local configuration file stores project-specific metadata like the name and last commit hash. ```json { "projectName": "my-stremio-addon", "lastCommit": "a1b2c3d" } ``` -------------------------------- ### View Project Logs with Beamup CLI Source: https://github.com/stremio/stremio-beamup-cli/blob/master/README.md Access your project's logs by executing the `logs` command. This is useful for debugging and monitoring your deployed application. ```bash beamup logs ``` -------------------------------- ### Global Configuration File Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt The global configuration file stores the Beamup host and GitHub username. ```json { "host": "deployer.beamup.dev", "githubUsername": "myGithubUsername" } ``` -------------------------------- ### Troubleshooting Access Denied Errors Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Commands to troubleshoot SSH access denied errors. This involves testing the SSH connection, reconfiguring Beamup with GitHub SSH keys, and retrying deployment. ```bash # Test SSH connection to see current key hash ssh -T dokku@deployer.beamup.dev # Reconfigure beamup to sync GitHub SSH keys beamup config deployer.beamup.dev YourGithubUsername # Test SSH connection again - hash should change if this was the issue ssh -T dokku@deployer.beamup.dev # Retry deployment beamup deploy ``` -------------------------------- ### Add Secrets to Project with Beamup CLI Source: https://github.com/stremio/stremio-beamup-cli/blob/master/README.md Add secrets to your project as environment variables using the `secrets` command. Replace `` and `` with your actual secret details. ```bash beamup secrets ``` -------------------------------- ### Manage Secrets with beamup secrets Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Add environment variables as secrets for use at runtime. ```bash # Add a single secret beamup secrets DATABASE_URL "postgres://user:pass@host:5432/db" # Output: Added secret "DATABASE_URL" to project # Add API keys beamup secrets API_KEY "sk_live_abc123xyz" # Output: Added secret "API_KEY" to project # Set Node environment beamup secrets NODE_ENV "production" # Output: Added secret "NODE_ENV" to project ``` -------------------------------- ### Redeploying with a New Name Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Commands to redeploy a project under a new name by removing the old Beamup configuration and redeploying. ```bash # Remove the existing beamup git remote git remote rm beamup # Delete the local beamup configuration rm beamup.json # Optionally delete the old deployment first beamup delete # Redeploy with a new name beamup # Enter new project name when prompted ``` -------------------------------- ### Delete Project with Beamup CLI Source: https://github.com/stremio/stremio-beamup-cli/blob/master/README.md Use the `delete` command to completely remove your project from the Beamup server. Ensure you have backed up any necessary data before execution. ```bash beamup delete ``` -------------------------------- ### Update Project via Git Push Source: https://github.com/stremio/stremio-beamup-cli/blob/master/README.md Update your deployed projects by pushing changes directly to the Beamup remote using Git. This method is an alternative to the `beamup` deploy command. ```bash git push beamup master ``` -------------------------------- ### Delete Projects with beamup delete Source: https://context7.com/stremio/stremio-beamup-cli/llms.txt Permanently remove a project from the Beamup server. ```bash beamup delete # Output: # You are about to delete this project. This action cannot be undone. Do you want to continue? (y/n): y # Project deleted successfully ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.