Skip to content

Create service template #2

Closed
Closed
@practicalli-johnny

Description

@practicalli-johnny

Create practicalli/service template for use with seancorfield/deps-new project

dev/user.clj for development tools ✅

  • hotloading libraries with add-libs
  • portal data inspector
  • mulog and tap publisher
  • make tasks for consistent UI over all projects

Library dependencies ✅

  • Latest Clojure release (version substitution)
  • kaocha test runner
  • kaochatests.edn configuration
  • mulog for logging
  • Integrant & areo for system configuration
  • add-libs for hot-loading (Clojure 11 & 12)
  • reitit & reitit-ring for routing (basic API)
  • Practicalli middleware (mulog trace events)

Editor support ✅

  • Emacs .dir-locals.el configuration with recommended aliases

Build.tools configuration ✅

Include project alias for tools.build and a build.clj built tasks

  • clean
  • uberjar

Docker configuration ✅

  • multi-stage Dockerfile - build using tools.build script and run on OpenJDK image (with service healthcheck)
  • compose.yaml for local development (optional postgres database & service conditional start)

Common aliases ✅

  • :run/service - run the project using clojure.exec
  • :dev/reloaded - include dev/user.clj file and associated development tools
  • :test/env - paths and deps for test runners
  • :test/run - run kaocha test runner
  • :test/watch - run kaocha test runner in watch mode

Optional parts

+postgres - adds next.jdbc, honeysql, postgresql driver. Example code for clojure.specs that matches the example database schema. Example persistence layer. Tools to generate spec from dB schema (and vice versa)

Related: practicalli/clojure#404

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions