Skip to content

Getting started

The Metekasse is seperate as the server component, which offers the API and provides accesss to the database, and the client component, which offers a web client. Both can be replaced, f.E. using a CLI tool as client or replacing the server with a custom implermentation.

This guide will install both the server and client.

Installing using Docker

This is a docker compose file, which you can use to quickly get started:

This setup will not expose the API to the outside, only allowing the HTTP client to interface with the API

services:
  db:
    image: postgres
    container_name: metekasse-db
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U $${POSTGRES_USER} -d $${POSTGRES_DB}"]
      interval: 5s
      timeout: 10s
      retries: 120

    restart: unless-stopped
    # set shared memory limit when using docker compose
    shm_size: 128mb

    volumes:
      - ./database:/var/lib/postgresql

    environment:
      POSTGRES_DB: mete
      POSTGRES_USER: mete
      POSTGRES_PASSWORD: YOUR_SUPER_SECRET_PASSWORD
  server:
    image: codeberg.org/chaosdorf/mete-server:beta
    container_name: metekasse-server
    restart: unless-stopped
    healthcheck:
      test: ["CMD", "curl", "http://127.0.0.1:8000/health"]
      interval: 1s
      timeout: 10s
      retries: 10
    depends_on:
      db:
        condition: service_healthy
        restart: true

    volumes:
      - ./files:/app/files

    environment: 
      METE_DB_HOST: db
      # These have to be the same as the database!
      METE_DB_USER: mete
      METE_DB_PASSWORD: YOUR_SUPER_SECRET_PASSWORD
      METE_DB_DATABASE: mete
  client:
    image: codeberg.org/chaosdorf/mete-client:beta
    container_name: metekasse-client
    restart: unless-stopped
    depends_on:
      server:
        condition: service_healthy
        restart: true

    ports:
      - "5000:5000"

    environment: 
      API_HOST: "http://server:8000"
      IMAGES_USE_PROXY: true