Skip to content

Commit

Permalink
Merge pull request ericciarla#7 from vishwamartur/add-docker-support
Browse files Browse the repository at this point in the history
Add Docker support
  • Loading branch information
ericciarla authored Jan 2, 2025
2 parents dbd8223 + adecefa commit d2f3db4
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Use node:22 as the base image
FROM node:22

# Set the working directory
WORKDIR /app

# Copy package.json and package-lock.json
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the application code
COPY . .

# Build the application
RUN npm run build

# Set the command to run the application
CMD ["npm", "start"]
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ _Spend less time hunting for trends and more time creating impactful campaigns._

- Node.js (v14 or higher)
- npm or yarn
- Docker
- Docker Compose
- Slack workspace with webhook permissions
- API keys for required services

Expand Down Expand Up @@ -112,6 +114,30 @@ SLACK_WEBHOOK_URL=https://hooks.slack.com/services/YOUR/WEBHOOK/URL
npm run build
```

## Using Docker

1. **Build the Docker image:**
```bash
docker build -t trend-finder .
```

2. **Run the Docker container:**
```bash
docker run -d -p 3000:3000 --env-file .env trend-finder
```

## Using Docker Compose

1. **Start the application with Docker Compose:**
```bash
docker-compose up --build -d
```

2. **Stop the application with Docker Compose:**
```bash
docker-compose down
```

## Project Structure

```
Expand Down
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: '3.8'

services:
app:
build:
context: .
dockerfile: Dockerfile
environment:
- TOGETHER_API_KEY=${TOGETHER_API_KEY}
- FIRECRAWL_API_KEY=${FIRECRAWL_API_KEY}
- X_API_BEARER_TOKEN=${X_API_BEARER_TOKEN}
- SLACK_WEBHOOK_URL=${SLACK_WEBHOOK_URL}
ports:
- "3000:3000"

0 comments on commit d2f3db4

Please sign in to comment.