Skip to content

What not to do

The deploy stops with an error saying which service and why:

  • privileged: true
  • network_mode: host, pid: host, ipc: host, uts: host
  • devices: (host devices)
  • Host bind mounts: ./data:/data, /var/run/docker.sock:/var/run/docker.sock, any host path. Use a named volume.
  • cap_add beyond Docker’s default capabilities, security_opt values that loosen the sandbox, and sysctls outside a small safe list
  • build: without a connected repo
  • A size over your plan’s limits, or more than 15 services in one project

Accepted, but not applied as written. The check (and the deployment’s Compose tab) lists each one:

  • Services behind profiles: are not deployed.
  • CPU-sharing and swap settings (cpu_shares, cpuset, memswap_limit, mem_swappiness, oom_score_adj, …): each service has its own VM.
  • The host side of a port mapping: "8080:80" is reached at its own HTTPS address, not on port 8080.

These are not read today, so don’t rely on them:

  • entrypoint: put what you need in command, or in the image.
  • env_file: only the compose file is sent. Use project variables.
  • healthcheck: not used to decide anything. (To show visitors a Starting page, CargoForge checks whether a published port answers.)
  • user, working_dir, hostname, extra_hosts, tmpfs, read_only, ulimits, shm_size, init, labels, container_name
  • secrets: and configs:: use project variables.
  • deploy.replicas (one copy of each service runs), deploy.placement
  • A database without a volume. Its data goes on the next redeploy. Add one.
  • fragile: false on a database. Two copies on one data directory corrupt it. See Fragile.
  • Secrets written in the file. The file is stored and shown on the Compose tab. Use project variables.
  • latest tags. A redeploy or failover may pull a newer image than the one you tested. Pin a version (postgres:17.2).
  • A tiny stop_grace_period on a database. It needs time to flush on every stop. 30-60 s is typical.
  • Relying on the container filesystem. Anything not in a volume is gone on the next redeploy, restart on another host, or failover.