blog

Version, currently main branch1 version
  • main branchlatestApr 11, 2024

github.com/ysbaddaden/swarmit

No description declared in shard.yml.

0 stars
0 dependents
License: Apache-2.0

Installation

# Add this to your shard.yml
dependencies:
  blog:
    github: ysbaddaden/swarmit
    branch: main

main is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
no constraint declared
License
Apache-2.0
Target
  • swarmit from src/server.cr

Dependencies

Runtime Dependencies

  • pg*github: will/crystal-pg
  • earl*github: ysbaddaden/earl, branch: main
  • frost*github: ysbaddaden/frost, branch: main
  • docker*github: ysbaddaden/docker.cr, branch: master

README

Swarmit

Docker Swarm User Interface

Status

Experimental.

Requirements

Requirements:

  • Docker Swarm, either as a single manager node, or as a full featured manager(s) + worker(s) cluster;
  • Google OAuth API service for authenticating users.
  • PostgreSQL database.

Setup

This is a Crystal application, so you must install Crystal and Shards.

Compile the application:

$ shards build --release

Export environment variables:

  • DOCKER_HOST (optional, defaults to unix:///var/run/docker.sock)
  • DATABASE_URL=postgres://user:password@host/database or PGHOST, PGPORT, ...
  • GOOGLE_OAUTH_CLIENT_ID
  • GOOGLE_OAUTH_CLIENT_SECRET

On initial setup, populate the PostgreSQL database from db/structure.sql. On upgrade, you should run the individual database migrations:

$ crystal i bin/migrate.cr

Run the application. It can run outside the Swarm (useful in development), but for production it should run within the Swarm.

bin/swarmit

TODO: Dockerfile and compose.yml

License

Distributed under CECILL v2.1.

See LICENSE (English) and LICENSE-FR (French) for details.

Authors