An open API service indexing awesome lists of open source software.

https://github.com/veupathdb/vdi-compose-stack

VDI service stack compose files and configuration.
https://github.com/veupathdb/vdi-compose-stack

Last synced: 4 months ago
JSON representation

VDI service stack compose files and configuration.

Awesome Lists containing this project

README

          

= VDI Service Docker Compose Stack
:toc:
:source-highlighter: highlight.js
:highlightjs-theme: github
:compose-ref: https://docs.docker.com/reference/cli/docker/compose
:gh-org-url: https://github.com/VEuPathDB

== Local Development

For developer use, this repository includes makefiles with shortcuts for
performing the standard docker compose operations, including a full-stack
rebuild.

=== Quick Start

==== Using Remote App DB

. Navigate to link:dev/local-with-remote-appdb/[].
. From that directory run `make prep-stack` to create a copy of the appropriate
stack config file and environment file. +
_The stack config copy will be named `stack-config.yml`._ +
_The environment file copy will be named `.env`._
. Edit the `.env` file and fill in the `APP_DB_*` environment variables with the
actual target DB details.
. Follow the `ssh-compose` section of the
{gh-org-url}/util-infra-dev-tools?tab=readme-ov-file#ssh-compose[util-infra-dev-tools]
readme to create a `docker-compose.ssh.yml` file.
. Run `make up` to start up the VDI stack.
. Run `make logs` to tail the stack logs and ensure the SSH tunnels
are successfully established.

==== Fully Local

. Navigate to link:dev/fully-local/[].
. From that directory run `make prep-stack` to create a copy of the appropriate
stack config file and environment file. +
_The stack config copy will be named `stack-config.yml`._ +
_The environment file copy will be named `.env`._
. Run `make up` to start the VDI stack.

=== Make Targets

'{BLANK}'::
+
--
Simply running `make` with no target prints out all the available targets.
--

==== Common Targets

prep-stack::
Copies the files necessary to run a VDI stack into the working directory that
`make` was called from.

build::
Performs a full service stack build from source. This will used cached build
layers from the host machine if they are available. Use `OPTIONS` to change
that behavior if desired.

build-db::
Builds only the local Postgres App DB image.

up::
Runs {compose-ref}/up[`docker compose up`], expecting a `.env` file in the
project root directory by default.

down::
Runs {compose-ref}/down[`docker compose down`].

start::
Runs {compose-ref}/start[`docker compose start`].

stop::
Runs {compose-ref}/stop[`docker compose stop`].

restart::
Runs {compose-ref}/restart[`docker compose restart`].

logs::
Runs {compose-ref}/logs[`docker compose logs`].

log-service::
Runs {compose-ref}/logs[`docker compose logs service`], printing out only the
logs from the HTTP REST server.

log-\{plugin-name}::
+
--
Prints logs from only the specific target plugin container.

.Example
[source,shell]
----
# Show only the biom container logs
make log-biom
----
--

cmd::
Prints docker compose commands. May be combined with input parameters to
generate custom commands to run outside of make.

=== Compose Parameters

`ENV_FILE`::
Path to the environment file to use with the docker compose command.
+
Default value is `${PWD}/.env`
+
.Example
[source, shell]
----
# runs docker compose top
make compose ENV_FILE="/home/me/my/top/secret/variables.env"
----

`COMPOSE_FILES`::
Paths to additional docker compose config files that should be included in the
compose command.
+
.Example
[source, shell]
----
# adds docker-compose.ssh.yml to the compose file list
make compose COMPOSE_FILES=docker-compose.ssh.yml
----

`COMMAND`::
Docker compose command to execute.
+
Default value is dependent on make target, for the `compose` target, the default
value is `--help`
+
.Example
[source, shell]
----
# runs docker compose top
make compose COMMAND="top"
----

`OPTIONS`::
Additional CLI options that will be passed to the specific compose command.
+
.Example
[source, shell]
----
# remove volumes as part of the compose down command
make down OPTIONS=-v
----

`SERVICES`::
Limit the compose command to the provided target services.
+
.Example
[source, shell]
----
# (re)create the wrangler and noop plugin containers
make up SERVICES="plugin-wrangler plugin-noop"
----

== License

Copyright 2025 VEuPathDB

Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.

See the License for the specific language governing permissions and limitations
under the License.