Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Add just dc recipe #886

Merged
merged 2 commits into from
Aug 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions api/docs/guides/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

Ensure that you have installed `mkcert` (and the corresponding NSS tools). You can run `mkcert -install` to verify your installation.

> _**Note:**_ Our Docker compose configuration requires specific environment configuration that is automatically handled by `just`. While you can run compose directly, it's advised to use the `just dc` alias for `docker-compose` as this ensures the environment will be properly configured.

## Steps

1. Ensure that the [Docker daemon](https://docs.docker.com/config/daemon/) is running.
Expand Down
12 changes: 8 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,21 @@ DOCKER_FILE := "-f " + (
export DOCKER_USER_ID := `id -u`
export DOCKER_GROUP_ID := `id -g`

# Run `docker-compose` configured with the correct files and environment
dc *args:
docker-compose {{ DOCKER_FILE }} {{ args }}

# Build all (or specified) services
build *args:
docker-compose {{ DOCKER_FILE }} build {{ args }}
just dc build {{ args }}

# Bring all Docker services up
up flags="":
docker-compose {{ DOCKER_FILE }} up -d {{ flags }}
just dc up -d {{ flags }}

# Take all Docker services down
down flags="":
docker-compose {{ DOCKER_FILE }} down {{ flags }}
just dc down {{ flags }}

# Recreate all volumes and containers from scratch
recreate:
Expand All @@ -55,7 +59,7 @@ recreate:

# Show logs of all, or named, Docker services
logs services="" args=(if IS_CI != "" { "" } else { "-f" }):
docker-compose {{ DOCKER_FILE }} logs {{ args }} {{ services }}
just dc logs {{ args }} {{ services }}

# Attach to the specificed `service`. Enables interacting with the TTY of the running service.
attach service:
Expand Down