Config Files · 1 file

Sample Docker Compose File

Compose files define multi-container apps: services, networks, volumes and secrets. Our sample is realistic and valid for its tool, with fake hosts and secrets.

Docker Compose · 927 B

Docker Compose file

A Compose file with a web app, PostgreSQL and Redis: build args, health checks, depends_on conditions, named volumes and a secrets file. All hosts, keys and secrets are fake.

CC0 · free for any use · Verified by an independent tool · Report a problem

compose.yaml — first linesYAML
# Sample compose.yaml — samplefiles.com
name: sample-app

services:
  web:
    build:
      context: .
      args:
        NODE_VERSION: "22"
    ports:
      - "8080:3000"
    environment:
      DATABASE_URL: postgres://app:app@db:5432/app
      REDIS_URL: redis://cache:6379/0
    depends_on:
      db:
        condition: service_healthy
      cache:
        condition: service_started
    restart: unless-stopped

  db:
    image: postgres:17
    environment:
      POSTGRES_USER: app

File details

Size
927 B (927 bytes)
MIME type
application/yaml
SHA-256
e9a71c0a6db56167c41626a061d939f95980d20646a60838f2a342e2a5ee0665
MD5
8176051fcaf7a54f36976f0b21fd23c8

Download from the command line

curl -L -o compose.yaml https://files.samplefiles.com/config/docker-compose/compose.yaml

Or check the download in your browser with the checksum calculator.