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
# 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: appFile details
Download from the command line
curl -L -o compose.yaml https://files.samplefiles.com/config/docker-compose/compose.yamlwget https://files.samplefiles.com/config/docker-compose/compose.yamlhttps://files.samplefiles.com/config/docker-compose/compose.yamlprintf '%s %s\n' e9a71c0a6db56167c41626a061d939f95980d20646a60838f2a342e2a5ee0665 compose.yaml | shasum -a 256 -cOr check the download in your browser with the checksum calculator.