Quickstart
Prerequisites¶
Before you begin, ensure you meet the following prerequisites:
Linux distribution¶
A Debian based distribution (e.g., Debian, Ubuntu, etc.) is required. Other distributions might work, but are not officially supported.
Docker¶
Ensure Docker is installed on your system. You can install Docker by following the official Docker installation guide.
Docker Compose¶
Ensure Docker Compose is installed. You can install it by following the official Docker Compose installation guide.
Backend services¶
The following backend services are required to be configured and running: - PostgreSQL - Caddy
Caddy must be ran via docker, as it relies on recognising docker labels for reverse proxying. PostgreSQL can be ran natively but docker is recommended for ease of setup.
You can use the example compose file to set up these services. Make sure to configure the environment variables in the .env
file accordingly.
Example docker-compose.yml
services:
db:
image: postgres:latest
restart: unless-stopped
container_name: svs-db
env_file:
- .env
ports:
- "5432:5432"
volumes:
- pgdata:/var/lib/postgresql/data
caddy:
image: lucaslorentz/caddy-docker-proxy:latest
container_name: caddy
restart: unless-stopped
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- caddy_data:/data
- caddy_config:/config
environment:
- CADDY_INGRESS_NETWORK=caddy
networks:
- caddy
volumes:
pgdata:
caddy_data:
caddy_config:
networks:
caddy:
driver: bridge
Example docker-compose .env file
Application setup¶
Install the library¶
Pre-release
The library is currently in pre-release. To install the latest pre-release version, use the following command:
Run setup script¶
Run the setup script to initialze the configuration. Requires sudo privileges to create necessary directories and set permissions.
See also svs setup init for more information.
Configure environment variables¶
The CLI wll create a .env
for svs which requires configuration. Edit the file to set the necessary environment variables.
That's it. Head over to the cli documentation to get started with using the CLI.