Skip to content

stefanjarina/sda

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sda (Simple Docker Apps)

A cli application for simply creating various servers or apps in a docker containers

This tool is not really meant to be robust, but rather a quick way to get a server up and running in a docker with already set up volumes and ports as well as sitting in the same network as other services.

It is meant only for development purposes as it does not provide any security or performance optimizations needed for use in production.

It replaces for me a workflow of going to docker hub, finding an image, reading the docs, and running it via docker run every time I need it. Instead I add it to config file and it is ready to go wherever I need it.

I provide a hefty list of already supported servers, but you can easily add your own by editing the sda.yaml file in $HOME/.config/sda directory.

Disclaimers

This is PoC, a rewrite of a powershell module I've used for a long time The API might still be changing

This is also project written while learning language and because I use it often when I need some dirty server in docker

Installation

  • Download linux or windows binary from Releases

  • Using Golang

go install github.com/stefanjarina/sda@latest

Usage

# list all running services
sda list   # -or-  sda list -r
# list all available services
sda list -a
# list all stopped services
sda list -s
# list all created services (running + stopped)
sda list -c

# Create a new service with defaults
sda create mssql
# Create a new service with custom password
sda create mssql -p mypassword
# Create a new service with custom password and do not start it immediately
sda create mssql -p mypassword --no-start

# Start a service
sda start mssql

# Stop a service
sda stop mssql

# Remove a service
sda remove mssql
# Remove a service and all volumes
sda remove mssql --volumes

# Show service info
sda show mssql
# Show service info in json
sda show mssql --json

# Connect to a service (if supported)
sda connect mssql
# Connect to a service with custom password
sda connect mssql -p mypassword
# Open in browser (if supported)
sda connect ravendb --web

Supported Services

name Website Docker HUB
mssql MS SQL Docker HUB
postgres Postgres Docker HUB
mariadb Mariadb Docker HUB
mysql Mariadb Docker HUB
mongodb Mongodb Docker HUB
redis Redis Docker HUB
redispersistent Redis Docker HUB
cassandra Cassandra Docker HUB
ravendb Ravendb Docker HUB
clickhouse Clickhouse Docker HUB
dremio Dremio Docker HUB
dynamodb Dynamodb Docker HUB
elasticsearch Elasticsearch Docker HUB
solr Solr Docker HUB
neo4j Neo4j Docker HUB
orientdb OrientDB Docker HUB
arangodb ArangoDB Docker HUB
rethinkdb RethinkDB Docker HUB
presto Presto Docker HUB
scylladb ScyllaDB Docker HUB
firebird Firebird Docker HUB
vertica Vertica Docker HUB
crate Crate Docker HUB
couchbase Couchbase Docker HUB
marklogic MarkLogic Server Docker HUB
surrealdb SurrealDB Docker HUB
aerospike Aerospike Docker HUB
portainer Portainer Docker HUB

TODO

  • better output for list command
  • add logs command
  • add --recreate flag to create command
  • add tests
  • support bulk actions (stop/start all, etc.)
  • Generate documentation
  • More general polish (e.g. typos, common messages to be similar, naming to be similar, etc.)
  • Add GitHub Actions for CI/CD
    • Create GitHub release
  • Improve installation instructions
    • create windows installer
    • investigate scoop, chocolatey, winget
    • create deb + rpm packages
    • investigate snap
    • investigate AUR
  • Add more customization options with sane defaults (e.g. custom ports, custom network, ...)
  • Add versioning autoincrement (via tags?)
  • Support calling docker compose maybe? (e.g. for more complex setups)

Ultimate TODO for services

  • elasticsearch - fix cli connect command
  • SurrealDB - add support

About

A cli application for simply creating a various servers or apps in a docker containers

Resources

License

Stars

Watchers

Forks

Packages

No packages published