Skip to content

Fix docker-compose problems#2

Merged
28Pollux28 merged 1 commit into
28Pollux28:masterfrom
SenequeZ:master
Jun 2, 2026
Merged

Fix docker-compose problems#2
28Pollux28 merged 1 commit into
28Pollux28:masterfrom
SenequeZ:master

Conversation

@SenequeZ

@SenequeZ SenequeZ commented Jun 1, 2026

Copy link
Copy Markdown

Multi-service / Docker Compose challenges

For challenges that need more than one container (databases, sidecars, custom
networks/volumes), drop a standard Docker Compose file next to your
challenge.yml:

data/challenges/web/my-chall/
├── challenge.yml
└── docker-compose.yml

Galvanize auto-detects the first of compose.yaml, compose.yml,
docker-compose.yaml, or docker-compose.yml in the challenge directory,
validates it, and deploys it. When a compose file is present, playbook_name
defaults to custom_compose, so a minimal challenge.yml is enough:

name: my-chall
author: YourName
category: web
type: zync

deploy_parameters:
  unique: false

This lets you develop and test the stack locally with a plain
docker compose up, then ship the file unchanged.

Exposing services (expose)

Compose challenges no longer need hand-written Traefik labels, manual network
wiring, or hand-picked host ports. Declare an expose block and Galvanize wires
the networking for you — the same automation the http/tcp playbooks provide
for single containers:

deploy_parameters:
  unique: false
  expose:
    - service: web      # HTTP via Traefik → auto domain + SSL
      port: 80
      type: http
    - service: ssh      # raw TCP → published host port
      port: 22
      type: tcp
      scheme: ssh       # optional, only affects the rendered connection URL

For each entry Galvanize will, on deploy:

  • type: http — attach the service to the external Traefik network, add the
    traefik.enable + router/service labels, and route
    https://<project>.<instancer_host>/ to it (when more than one HTTP service
    is exposed, each gets a <service>-<project>.<instancer_host> subdomain).
    Requires traefik_network in instancer.extra_deployment_parameters.
  • type: tcp — publish the container port. With
    instancer.randomize_published_ports enabled, the host port is randomized per
    team and persisted, so instances don't collide.

Connection info is returned automatically from the resulting Traefik route or
published port.

@28Pollux28

Copy link
Copy Markdown
Owner

I'll fix the CI in a dedicated PR

@28Pollux28
28Pollux28 merged commit 25c5906 into 28Pollux28:master Jun 2, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants