Skip to content

WillSquire/docker-diesel-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

Diesel CLI

Minimalistic Diesel CLI container.

Usage

Run Diesel CLI:

docker run willsquire/diesel-cli

Commands

A practical example with setup:

docker run --rm \
  -v "$(pwd)":/app \
  --network="project_name_default" \
  willsquire/diesel-cli \
  --database-url="mysql://username:password@db_service/db_name" \
  setup

Note:

-v is the Rust project containing the migrates and config for Diesel.

--database-url is the database Diesel will connect to.

--network is needed only if the database is running within an existing docker network, e.g. in docker-compose. Usually the network name is the current directory name appended with _default.

See Diesel's docs for a full command list

Builds

Use in builds:

FROM willsquire/diesel-cli as builder
COPY . .
RUN diesel setup

Releases

No releases published

Packages

No packages published