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

# Dockerizing Cuehand

> Dockerizing Cuehand projects for production deployment.

This section covers how to dockerize Cuehand projects for production deployment.
This is useful for deploying Cuehand projects on platforms like **Railway**.

<Steps>
  <Step title="Create a Dockerfile">
    ```dockerfile Dockerfile expandable theme={"theme":"vesper"}
    # Use the official Playwright image
    FROM mcr.microsoft.com/playwright:v1.56.1-jammy

    # Set working directory
    WORKDIR /app

    # Copy package files
    COPY package*.json ./

    # Install dependencies
    RUN npm ci

    # Copy source code
    COPY . .

    # Run the application
    CMD ["npm", "start"]
    ```
  </Step>

  <Step title="Create a .dockerignore file">
    Create a .dockerignore file in the root of your project.

    ```dockerignore .dockerignore theme={"theme":"vesper"}
    node_modules
    npm-debug.log
    .git
    .gitignore
    .env*
    .DS_Store
    *.log
    ```
  </Step>

  <Step title="Create a docker-compose.yml file">
    Create a docker-compose.yml file in the root of your project.

    ```yml docker-compose.yml theme={"theme":"vesper"}
    services:
      cuehand:
        build:
          context: .
        env_file:
          - .env
        environment:
          - GOOGLE_GENERATIVE_AI_API_KEY
    ```

    Optionally, if you want to store user data in a volume, you can add the following:

    ```yml docker-compose.yml theme={"theme":"vesper"}
    volumes:
      - ./userData:/app/userData
    ```
  </Step>

  <Step title="Build and run the container">
    Build and run the container.

    ```bash theme={"theme":"vesper"}
    docker-compose up --build
    ```
  </Step>
</Steps>

I keep mentioning [Railway](https://railway.com), but you can use any platform that supports Docker.
