Getting Started with Azshrtr
Welcome to the Azshrtr. This guide will help you get started with Azshrtr in both Azshrtr Cloud and self-hosted environments.
Azshrtr Cloud
Using Azshrtr Cloud is the simplest way to get started with our Azshrtr Follow these steps:
-
Sign Up / Log In:
-
Generate API Token:
- Navigate to the API section in your account settings.
- Click on "Generate API Token".
- Copy the token provided. Keep it secure and do not share it publicly.
-
Using the API Token:
- Include the token in the
Authorization
header of your HTTP requests. - Example:
curl -X GET "https://api.azshrtr.com/v1/resource" \
-H "Authorization: Bearer YOUR_API_TOKEN"
- Include the token in the
Self-Hosted
For a self-hosted setup, you can use Docker Compose to get started quickly. Here’s an example docker-compose.yml
file to set up Azshrtr locally:
version: '3.8'
services:
azshrtr:
image: azshrtr/azshrtr:latest
container_name: azshrtr
environment:
- AZODIK_API_KEY=your_api_key
- AZODIK_DB_HOST=db
- AZODIK_DB_PORT=5432
- AZODIK_DB_USER=your_db_user
- AZODIK_DB_PASSWORD=your_db_password
- AZODIK_DB_NAME=your_db_name
ports:
- '8080:8080'
depends_on:
- db
db:
image: postgres:13
container_name: azshrtr-db
environment:
- POSTGRES_USER=your_db_user
- POSTGRES_PASSWORD=your_db_password
- POSTGRES_DB=your_db_name
volumes:
- db-data:/var/lib/postgresql/data
volumes:
db-data:
Steps to Run the Docker Compose Setup
Install Docker and Docker Compose:
- Follow the Docker installation guide to install Docker.
- Follow the Docker Compose installation guide to install Docker Compose.
- Save the Docker Compose File:
- Save the above YAML content to a file named docker-compose.yml.
Start the Services
Run the following command to start the services:
docker-compose up -d
Access the API
Your Azshrtr instance should now be running on http://localhost:8080.