chore: update docs
39503b03
1 file(s) · +65 −32
| 1 | 1 | # Quickstart |
|
| 2 | 2 | ||
| 3 | - | Get up and running with any Andromeda app in minutes. |
|
| 3 | + | Andromeda is a suite of apps that are easy to self host, whether you're a complete beginner or a seasoned devops engineer. We'll show you how to deploy a minimal micro blogging app called [Posts](/apps/posts) two different ways: |
|
| 4 | + | ||
| 5 | + | - Railway (recommended for beginners) |
|
| 6 | + | - Docker |
|
| 7 | + | ||
| 8 | + | ## Railway |
|
| 9 | + | ||
| 10 | + | Railway is halfway between a VPS (virtual private server) and a hosting platform like Netlify or Vercel. It's the perfect place to host an Andromeda app if you're a beginner. |
|
| 11 | + | ||
| 12 | + | ::::steps |
|
| 13 | + | ### Deploy |
|
| 14 | + | ||
| 15 | + | Click on the button below to sign up if you haven't already and start the process of deploying Posts. |
|
| 16 | + | ||
| 17 | + | [](https://railway.com/deploy/tYtJYp?referralCode=JGcIp6) |
|
| 18 | + | ||
| 19 | + | ### Configure |
|
| 20 | + | ||
| 21 | + | Railway will show a `Configure` button, and when you click on it you will need to fill in two things: |
|
| 22 | + | ||
| 23 | + | - `SITE_URL` - This will be the site of your deployed app. If you don't know what that URL will be then you can just put a placeholder for now like `https://example.com`. |
|
| 24 | + | - `POSTS_PASSWORD` - The password you want to set to access the admin dashboard. |
|
| 25 | + | ||
| 26 | + |  |
|
| 27 | + | ||
| 28 | + | Once you have filled these out you can click the `Save Config` button at the bottom. Then click `Deploy`! |
|
| 29 | + | ||
| 30 | + | ### Use |
|
| 31 | + | ||
| 32 | + | Your app is now live! If you click on the square with your app you can see the hosted URL for it. |
|
| 4 | 33 | ||
| 5 | - | ## Prerequisites |
|
| 34 | + |  |
|
| 6 | 35 | ||
| 7 | - | Make sure [Rust](https://www.rust-lang.org/tools/install) is installed: |
|
| 36 | + | One more thing that is worth adjusting is copying the URL, going into the `Variables` tab, clicking `Edit` for the `SITE_URL` variable, and pasting in your hosted app URL. This will make sure its fully functional. |
|
| 8 | 37 | ||
| 9 | - | ```bash |
|
| 10 | - | rustc --version |
|
| 11 | - | ``` |
|
| 38 | + |  |
|
| 12 | 39 | ||
| 13 | - | ## Clone the Workspace |
|
| 40 | + | Granted those Railway URLs are not pretty, so if you happen to get a custom domain, just visit the `Settings` tab and under the `Networking` section click `+ Custom Domain` and set it up. Of course make sure to update the `SITE_URL` variable again if you do this! |
|
| 41 | + | :::: |
|
| 14 | 42 | ||
| 15 | - | ```bash |
|
| 16 | - | git clone https://github.com/stevedylandev/andromeda.git |
|
| 17 | - | cd andromeda |
|
| 18 | - | ``` |
|
| 43 | + | ## Docker |
|
| 44 | + | ||
| 45 | + | ::::steps |
|
| 46 | + | ### Setup |
|
| 47 | + | ||
| 48 | + | Create a new folder and add a `docker-compose.yml` file: |
|
| 19 | 49 | ||
| 20 | - | ## Build All Apps |
|
| 50 | + | ```yaml |
|
| 51 | + | services: |
|
| 52 | + | posts: |
|
| 53 | + | image: ghcr.io/stevedylandev/posts:latest |
|
| 54 | + | platform: linux/amd64 |
|
| 55 | + | ports: |
|
| 56 | + | - "${PORT:-3000}:${PORT:-3000}" |
|
| 57 | + | env_file: |
|
| 58 | + | - .env |
|
| 59 | + | volumes: |
|
| 60 | + | - posts-data:/data |
|
| 61 | + | restart: unless-stopped |
|
| 21 | 62 | ||
| 22 | - | ```bash |
|
| 23 | - | cargo build --release |
|
| 63 | + | volumes: |
|
| 64 | + | posts-data: |
|
| 24 | 65 | ``` |
|
| 25 | 66 | ||
| 26 | - | ## Run a Specific App |
|
| 67 | + | ### Configure |
|
| 27 | 68 | ||
| 28 | - | Each app is a workspace member. Run any of them with `cargo run -p`: |
|
| 69 | + | Create a `.env` file in the same folder with the following: |
|
| 29 | 70 | ||
| 30 | 71 | ```bash |
|
| 31 | - | cargo run -p sipp -- server --port 3000 |
|
| 32 | - | cargo run -p feeds |
|
| 33 | - | cargo run -p parcels |
|
| 34 | - | cargo run -p jotts |
|
| 35 | - | cargo run -p og |
|
| 36 | - | cargo run -p shrink |
|
| 72 | + | POSTS_PASSWORD=changeme |
|
| 73 | + | SITE_URL=http://localhost:3000 |
|
| 37 | 74 | ``` |
|
| 38 | 75 | ||
| 39 | - | Most apps start on `http://localhost:3000` by default. Check each app's page for specific environment variables and configuration. |
|
| 76 | + | Make sure to update `POSTS_PASSWORD` with your own password and `SITE_URL` with your domain if you have one hooked up to your docker setup. |
|
| 40 | 77 | ||
| 41 | - | ## Environment Variables |
|
| 78 | + | ### Deploy |
|
| 42 | 79 | ||
| 43 | - | Most apps use a `.env` file for configuration. Copy the example file and fill in your values: |
|
| 80 | + | Start the app: |
|
| 44 | 81 | ||
| 45 | 82 | ```bash |
|
| 46 | - | cp apps/<app-name>/.env.example .env |
|
| 83 | + | docker compose up -d |
|
| 47 | 84 | ``` |
|
| 48 | 85 | ||
| 49 | - | ## Deployment |
|
| 50 | - | ||
| 51 | - | Every app compiles to a single binary with embedded assets, making deployment straightforward. Each app supports: |
|
| 86 | + | This will start Posts on port `3000` with a persistent volume for the SQLite database and uploads. Visit `http://localhost:3000` and log in at `/login` with your configured password. |
|
| 87 | + | :::: |
|
| 52 | 88 | ||
| 53 | - | - **Railway** - one-click deploy buttons on each app's page |
|
| 54 | - | - **Docker** - `docker compose up -d` |
|
| 55 | - | - **Binary** - copy the binary to your server and run it directly |