> ## Documentation Index
> Fetch the complete documentation index at: https://phalanetwork.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Write the dstack deployment manifest

> Create a docker-compose.yml file

## Step 2

Create a `docker-compose.yml` file to define your application:

```yaml theme={null}
# docker-compose.yml
version: '3.8'

services:
  web:
    build: .
    # Or use a pre-built image:
    # image: your-dockerhub-username/your-app:latest
    ports:
      - "8080:8080"
    environment:
      - DSTACK_ENV=production
      - LOG_LEVEL=info
    healthcheck:
      test: ["CMD", "curl", "-f", "http://localhost:8080/health"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 40s
    restart: unless-stopped
```

#### if you were curious, yes you can deploy a Multi-container application too

For applications with multiple services:

```yaml theme={null}
version: '3.8'

services:
  web:
    build: ./web
    ports:
      - "8080:8080"
    environment:
      - DATABASE_URL=postgresql://user:pass@db:5432/mydb
    depends_on:
      - db
      
  db:
    image: postgres:15-alpine
    environment:
      - POSTGRES_USER=user
      - POSTGRES_PASSWORD=pass
      - POSTGRES_DB=mydb
    volumes:
      - db_data:/var/lib/postgresql/data

volumes:
  db_data:
```
