Skip to main content
This section covers how to dockerize Cuehand projects for production deployment. This is useful for deploying Cuehand projects on platforms like Railway.
1

Create a Dockerfile

Dockerfile
# 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"]
2

Create a .dockerignore file

Create a .dockerignore file in the root of your project.
.dockerignore
node_modules
npm-debug.log
.git
.gitignore
.env*
.DS_Store
*.log
3

Create a docker-compose.yml file

Create a docker-compose.yml file in the root of your project.
docker-compose.yml
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:
docker-compose.yml
volumes:
  - ./userData:/app/userData
4

Build and run the container

Build and run the container.
docker-compose up --build
I keep mentioning Railway, but you can use any platform that supports Docker.