Docker Compose

docker-compose.yml
---
services:
  spaghetticannon:
    container_name: SpaghettiCannon
    image: ghcr.io/jamesread/spaghetticannon:latest
    environment:
      DB_HOST: mariadb
      DB_USER: spaghetticannon
      DB_PASS: password
      DB_NAME: spaghetticannon
    volumes:
      - spaghetticannon-config:/config
    restart: unless-stopped
    ports:
      - "8080:8080"
    networks:
      - spaghetticannon-network
    depends_on:
      - mariadb

  mariadb:
    container_name: mariadb
    image: docker.io/mariadb
    environment:
      MARIADB_DATABASE: spaghetticannon
      MARIADB_USER: spaghetticannon
      MARIADB_PASSWORD: password
      MARIADB_ROOT_PASSWORD: password
    networks:
      - spaghetticannon-network

volumes:
  spaghetticannon-config:
    name: spaghetticannon-config
    external: false

networks:
  spaghetticannon-network:
    external: false

The entrypoint runs sql-migrate up before the service starts. Align config.yaml database.* with the same host/user/password/name. See Database migrations.