Skip to content

Commit

Permalink
Update image
Browse files Browse the repository at this point in the history
  • Loading branch information
orguetta committed Nov 26, 2024
1 parent 830ad27 commit 32bd193
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 33 deletions.
18 changes: 6 additions & 12 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
FROM python:3.9-slim

# Install Redis
RUN apt-get update && apt-get install -y redis-server && apt-get clean && rm -rf /var/lib/apt/lists/*
FROM python:3.10-alpine

# Set the working directory
WORKDIR /app

# Copy requirements.txt if you have one
COPY requirements.txt .

# Install dependencies
RUN pip install --no-cache-dir -r requirements.txt

# If you don't have a requirements.txt, you can install directly
# RUN pip install --no-cache-dir python-telegram-bot>=20.0
# Upgrade pip and setuptools, then install dependencies
RUN pip install --upgrade pip setuptools && pip install --no-cache-dir -r requirements.txt

# Copy the rest of your application code
COPY . .
COPY bot.py .

# Start Redis and run the bot
CMD ["sh", "-c", "redis-server --daemonize yes && python bot.py"]
# Start the bot
CMD ["python", "bot.py"]
18 changes: 0 additions & 18 deletions docker-compose-build.yml

This file was deleted.

9 changes: 6 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
name: linkwarden-telegram-bot
name: linkwarden
services:

linkwarden-telegram-bot:
container_name: telegram-linkwarden-bot
build:
context: .
dockerfile: Dockerfile
image: ghcr.io/orguetta/linkwarden-telegram-bot:latest
networks:
- linkwarden-internal
- internal
environment:
- TELEGRAM_TOKEN=${TELEGRAM_TOKEN}
- LINKWARDEN_API_URL=${LINKWARDEN_API_URL}
Expand All @@ -14,4 +17,4 @@ services:
restart: unless-stopped

networks:
linkwarden-internal:
internal:

0 comments on commit 32bd193

Please sign in to comment.