Deploying
Docker Compose import
Turn a Docker Compose file into stackd apps and managed databases, from Apps → New app → Docker Compose.
Importing
Give it the file and a prefix: names are <prefix>-<service>, and
every one must be free, or nothing is made. The plan shows what the file
comes to, service by service, before anything is made.
API: POST /api/compose/plan ({yaml, prefix}) says what the file comes
to, making nothing; POST /api/compose/import (also project_id,
deploy) makes it.
Someone limited to projects imports into one of theirs.
What's brought over
- Databases: services whose image is PostgreSQL (
postgres,postgis,pgvector), MySQL (mysql,mariadb,percona), Redis (redis,valkey) or MongoDB (mongo,mongodb) become managed databases, single (on one server), in the version stackd runs, not the image's tag. Their data isn't: they start empty. - Apps: the other services with an
image, with its first published or exposed container port (80 without one), itsenvironment(a map or a list) anddeploy.replicas. - Links: an app is linked to the databases it
depends_on, its variables prefixed by the service's name (dbgivesDB_URL,DB_HOST,DB_PORT…; see Databases). The links wait until the databases are ready, and withdeploythe app deploys then; an app with no database deploys at once.
What isn't
Said in the plan, service by service, rather than guessed at:
build:without an image: make that service an app built from its repo;commandandentrypoint: the image's run; a worker is better as a process of the app it works for;- volumes, named or bind: add volumes where they're needed;
- published host ports: apps are reached through their domains;
env_file, and${…}interpolation from a.envfile;- variables naming a database service as a host (
postgres://…@db/…): point them at the link's variables,${{DB_HOST}}and the like.